diff options
-rw-r--r-- | tv/2configs/vim.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 2c17fbc..8aee310 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -173,5 +173,11 @@ with import ./lib; nnoremap <C-S-ScrollWheelUp> <PageUp> nnoremap <C-S-ScrollWheelDown> <PageDown> endif + + # remember last position + autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif ''; } |