From: martin f. krafft Date: Sat, 22 Aug 2009 11:52:03 +0000 (+0200) Subject: set marks on save and idle X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e38e8fc6fe28799c4a5aad2521e5085833597915?ds=sidebyside;hp=-c set marks on save and idle --- e38e8fc6fe28799c4a5aad2521e5085833597915 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