From ccaab803a5fd58ef45b3c8227b4c5a5c830407b2 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 10 Feb 2021 18:04:04 +0100 Subject: [PATCH] config/nvim: update formatoptions --- .config/nvim/init/general.vim | 5 ++--- .config/shell/functions | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/nvim/init/general.vim b/.config/nvim/init/general.vim index 6feeeb4..b5874ab 100644 --- a/.config/nvim/init/general.vim +++ b/.config/nvim/init/general.vim @@ -44,7 +44,7 @@ set foldopen+=jump " Automatically open folds on jump syntax on filetype plugin on " comments -autocmd Filetype * setlocal formatoptions-=o | setlocal formatoptions+=qn12jr " Change comment behavior +autocmd Filetype * setlocal formatoptions-=o | setlocal formatoptions+=qjln12r " Change comment behavior autocmd Filetype json syntax match Comment +\/\/.\+$+ " Comment highlighting in JSON autocmd Filetype markdown let &comments = "b:*,b:-,b:+," . &comments " custom hardcoded types @@ -57,8 +57,7 @@ autocmd BufNewFile *.sh,$HOME/.local/bin/* execute 'silent! 1s/.*/#!\/bin\/sh\r\ "autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif set spelllang=en_us,de_de -autocmd BufEnter *.txt setlocal ts=4 sw=4 formatoptions+=t -autocmd BufEnter *jrnl*.txt setlocal formatoptions+=a +autocmd BufEnter *.txt,*jrnl* setlocal formatoptions+=b textwidth=78 ts=4 sw=4 autocmd FileType markdown setlocal wrap spell colorcolumn= " Spell checking & no guiding columns in markdown " Center on insert mode diff --git a/.config/shell/functions b/.config/shell/functions index 58120bb..d5446e9 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -135,7 +135,7 @@ alias loc='noglob locate --basename' alias uloc='noglob sudo updatedb && locate --basename' alias syslog='less +F /var/log/syslog' alias println='printf "\n"' -alias graphics='lspci -vnn | grep VGA --color=never' +alias graphics='lspci -vnn | grep VGA --color=never && xrandr --listproviders' alias vlch="vlc -H | ${PAGER:-less}" alias usergroups="cat /etc/passwd | cut -d':' -f1 | xargs -n 1 id" alias omd="(echo '#+OPTIONS: tags:nil'; xclip -o -selection clipboard) | pandoc -f org-auto_identifiers -t markdown --wrap preserve | xclip -filter"