Update vim config

This commit is contained in:
ItsDrike 2021-08-16 03:19:56 +02:00
parent 49b1fb917e
commit 1de5142b86
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
3 changed files with 28 additions and 12 deletions

View file

@ -2,7 +2,7 @@
"set viminfofile=$XDG_CACHE_HOME/vim/viminfo
" Disable automatic commenting on newline
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
autocmd FileType * setlocal formatoptions-=cro
" Have Vim jump to the last position when reopening a file
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
@ -10,3 +10,6 @@ autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "norm
" Automatically deletes all trailing whitespace on save
autocmd BufWritePre * %s/\s\+$//e
" Enable spellcheck for certain file types
autocmd FileType tex,latex,markdown,gitcommit setlocal spell spelllang=en_us