diff options
author | tv <tv@krebsco.de> | 2023-01-17 01:05:26 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-01-18 17:23:38 +0100 |
commit | 6e0c2f1927eea59a3f8b8e58bfdc9193fc20d324 (patch) | |
tree | 37adebfec2f47ac7428b69c500c07d21ec540166 /tv/2configs | |
parent | 3dad353ecb8e0b4b87b171eca8b091f62f28c17c (diff) |
tv vim: remember last position
Diffstat (limited to 'tv/2configs')
-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 ''; } |