Fix jump to last position

This commit is contained in:
ItsDrike 2021-07-23 19:14:04 +02:00
parent a6ad237b7c
commit b573f98e14
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD

View file

@ -5,11 +5,8 @@
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Have Vim jump to the last position when reopening a file
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\""
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Automatically deletes all trailing whitespace on save
autocmd BufWritePre * %s/\s\+$//e
" Vertically center document when entering insert mode
"autocmd InsertEnter * norm zz