2021-07-23 16:08:03 +00:00
|
|
|
" Move ~/.viminfo to XDG_CACHE_HOME
|
|
|
|
"set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
|
|
|
|
|
|
|
" Disable automatic commenting on newline
|
2021-08-16 01:19:56 +00:00
|
|
|
autocmd FileType * setlocal formatoptions-=cro
|
2021-07-23 16:08:03 +00:00
|
|
|
|
|
|
|
" Have Vim jump to the last position when reopening a file
|
2021-07-23 17:14:04 +00:00
|
|
|
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
2021-07-23 16:08:03 +00:00
|
|
|
|
|
|
|
" Automatically deletes all trailing whitespace on save
|
|
|
|
autocmd BufWritePre * %s/\s\+$//e
|
|
|
|
|
2021-08-16 01:19:56 +00:00
|
|
|
" Enable spellcheck for certain file types
|
|
|
|
autocmd FileType tex,latex,markdown,gitcommit setlocal spell spelllang=en_us
|
|
|
|
|