diff options
author | Adam Hovorka <[email protected]> | 2020-06-05 17:11:23 -0600 |
---|---|---|
committer | Adam Hovorka <[email protected]> | 2020-06-05 17:11:23 -0600 |
commit | 424a5386b0392ffe4377f4009f01ddf520a7bc64 (patch) | |
tree | e2b72cec3fc6edb1863f2b8c7010644d705e4774 /base/vimrc | |
parent | 65560e4b22a84b3dea0cb806613214f26086e8af (diff) |
Make Vim reopen to last position in file
Diffstat (limited to 'base/vimrc')
-rw-r--r-- | base/vimrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -243,6 +243,12 @@ nnoremap <leader>N :call NumberToggle()<cr> "autocmd InsertEnter * :set norelativenumber "autocmd InsertLeave * :set relativenumber +" Open to last position ====---- + +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +endif + " Custom functions ====---- if filereadable(expand("~/.vimrc.local")) |