X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/966b9444bb93aab229e2b6b03d183fed700e1762..2dfe83c7844a274ea83df9525d785e0c3b2fbafd:/.vimrc?ds=sidebyside diff --git a/.vimrc b/.vimrc index 1030ac6..40ad50d 100644 --- a/.vimrc +++ b/.vimrc @@ -1108,6 +1108,7 @@ set dir=.,$TMPDIR//,/var/tmp//,/tmp// " updatetime " time in msec after which the swap file will be updated " set ut=4000 +set ut=10000 " maxmem " maximum amount of memory in Kbyte used for one buffer @@ -1450,7 +1451,16 @@ autocmd BufNewFile,BufRead /etc/logcheck/*.d*/* set tw=0 autocmd BufNewFile,BufRead /home/madduck/debian/pkg/logcheck/*/rulefiles/linux/*.d*/* set tw=0 " jump to last known position in file (:he last-position-jump) -autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"zz" | endif +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)