From e38e8fc6fe28799c4a5aad2521e5085833597915 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 22 Aug 2009 13:52:03 +0200 Subject: [PATCH] set marks on save and idle --- .vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.vimrc b/.vimrc index b0a86f8..40ad50d 100644 --- a/.vimrc +++ b/.vimrc @@ -1453,6 +1453,15 @@ autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/* " jump to last known position in file (:he last-position-jump) autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g`\"zz" | endif +" leave the w mark whenever a file is written +autocmd BufWrite * normal mw + +" leave the i mark whenever we go idle (after updatetime) +augroup markidle + autocmd CursorHold * normal mi + autocmd CursorHoldI * normal mi +augroup end + " disable list mode when inserting stuff, otherwise keep it enabled, it's " useful (see also setting lcs) augroup listinsert -- 2.39.2