config/nvim: update formatoptions

This commit is contained in:
xerus2000 2021-02-10 18:04:04 +01:00
parent c0fa7576ef
commit ccaab803a5
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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"