From 1ea5a39637b3dcb9c14fc33b44772ec6a56a4643 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Wed, 5 Mar 2025 12:39:35 +0100 Subject: updated dotfiles --- .bashrc | 23 +++++++++-------------- .inputrc | 9 +++++++++ .newsboat/cache.db | Bin 1740800 -> 2101248 bytes .newsboat/history.cmdline | 1 + .newsboat/urls | 2 ++ .vimrc | 45 ++++++++++++++++++++++++++++++++++----------- 6 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 .inputrc diff --git a/.bashrc b/.bashrc index 99bf4cf..8828853 100644 --- a/.bashrc +++ b/.bashrc @@ -43,7 +43,7 @@ esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt -#force_color_prompt=yes +force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then @@ -85,7 +85,7 @@ if [ -x /usr/bin/dircolors ]; then fi # colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert @@ -111,23 +111,18 @@ if ! shopt -oq posix; then fi fi +# Set vi mode as the default mode set -o vi +# Set options for some frequently used programs export LS_OPTIONS='-lha --color=auto' -alias ls='ls $LS_OPTIONS' -alias r='ranger' -alias obs='nohup /usr/bin/obsidian &' -alias vrc='vim ~/.vimrc' -alias brc='vim ~/.bashrc && source $_' -alias cts='ssh root@rabiega.xyz' -alias ctg='ssh git@rabiega.xyz' -alias nb='newsboat' -alias nb-add='cat >> ~/.newsboat/urls << EOF' -alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" -alias obsidian="/usr/bin/git --git-dir=$HOME/obsidian --work-tree=$HOME/obsidian" +export MKDIR_OPTIONS='-p' +# Groff shenanigans groffe(){ - groff -e $1.ms -ms -Tpdf > $1.pdf + groff -Kutf8 -Tpdf -mec -ms $1.ms > $1.pdf } +# Bind Esc to CapsLock and vice versa +export MANPAGER="vim -M +MANPAGER - " setxkbmap -option caps:swapescape diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..4a659e4 --- /dev/null +++ b/.inputrc @@ -0,0 +1,9 @@ + set editing-mode vi + set vi-ins-mode-string \1\e[6 q\2 + set vi-cmd-mode-string \1\e[2 q\2 + + set keymap vi-insert + "jk": vi-movement-mode + "kj": vi-movement-mode + + set keymap vi-command diff --git a/.newsboat/cache.db b/.newsboat/cache.db index b558bcd..7e576b4 100644 Binary files a/.newsboat/cache.db and b/.newsboat/cache.db differ diff --git a/.newsboat/history.cmdline b/.newsboat/history.cmdline index 81da3bd..73a6bfd 100644 --- a/.newsboat/history.cmdline +++ b/.newsboat/history.cmdline @@ -2,3 +2,4 @@ q !vim .newsboat/config q q +q diff --git a/.newsboat/urls b/.newsboat/urls index 3b8353a..7e5ce16 100644 --- a/.newsboat/urls +++ b/.newsboat/urls @@ -16,3 +16,5 @@ https://boards.4chan.org/his/index.rss https://boards.4chan.org/lit/index.rss http://www.kendo.pl/?format=feed&type=rss https://blog.linuxmint.com/?feed=rss2 +https://security.stackexchange.com/feeds +https://math.stackexchange.com/feeds diff --git a/.vimrc b/.vimrc index bfa3417..24e6d3a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,4 @@ +runtime ftplugin/man.vim set number set relativenumber set title @@ -15,9 +16,14 @@ set autoindent set cindent set smartindent set nowrap +set ignorecase +set smartcase +" Use pathogen (plugin manager) +filetype off execute pathogen#infect() +execute pathogen#helptags() syntax on filetype plugin on filetype plugin indent on @@ -27,7 +33,19 @@ autocmd BufWritePost ~/website/*.html !bash ~/.local/bin/update_website autocmd BufWritePost ~/website/*.css !bash ~/.local/bin/update_website " Automatically use black on a Python file -autocmd BufWritePost *.py !black % +autocmd BufWritePost *.py !black --line-length=79 % + +" Pymode config +let g:pymode = 1 +let g:pymode_warnings = 0 +let g:pymode_trim_whitespaces = 1 +let g:pymode_options = 1 +let g:pymode_options_max_line_length = 79 +let g:pymode_options_colorcolumn = 1 +let g:pymode_indent = 1 +let g:pymode_indent_hanging_width = &shiftwidth +let g:pymode_indent_hanging_width = 4 +let g:pymode_doc = 1 " Automatically source .vimrc after saving autocmd BufWritePost ~/.vimrc source $MYVIMRC @@ -41,19 +59,24 @@ autocmd BufWritePre * %s/\s\+$//e autocmd BufWritePre * %s/\n\+\%$//e autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) -map dB -map s o -map S ok -map Y y$ -map Z o +" Mappings +noremap dBx +nnoremap s o +nnoremap S ok +nnoremap Y y$ +nnoremap - ddp +nnoremap _ ddkP +nnoremap "+yy +nnoremap "+p +nnoremap i nnoremap :tabnew ~/.vimrc nnoremap :TlistToggle nnoremap :NERDTree - -" Keybindings to simulate system shortcuts -:nnoremap "+yy -:nnoremap "+p - +vnoremap sb "zdiz : to do końca nie działa +vnoremap sp "zdi

z

+inoremap ddi +inoremap yyi +inoremap pi inoremap /<++>"_c4l " show existing tab with 4 spaces width -- cgit v1.2.3