From 6e0c2f1927eea59a3f8b8e58bfdc9193fc20d324 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 2c17fbc..8aee310 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