From ab43821bb1b084228146c47eb5f529415e617392 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Jan 2023 01:05:26 +0100 Subject: tv vim: remember last position --- tv/2configs/vim.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 2c17fbc74..8aee31082 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -173,5 +173,11 @@ with import ./lib; nnoremap nnoremap endif + + # remember last position + autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif ''; } -- cgit v1.2.3