vimrc: jump to last position after opening

This commit is contained in:
xfnw 2022-04-12 16:53:43 -04:00
parent 54570f8c34
commit 6f1739f345
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
bin/dhook.*
dep.sh
.netrwhist

View File

@ -55,4 +55,8 @@ set formatoptions-=t
" 2 space tabbing for nix files
autocmd Filetype nix setlocal ts=2 sw=2 expandtab
" jump to last position after opening
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif