From 3a2e8c8502e85b65488c4b5f57e8e64e0c8c3854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sat, 7 Mar 2015 17:36:32 +0100 Subject: [PATCH] Added "remember last edited line" stuff --- cfg/80-restore-line.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cfg/80-restore-line.vim diff --git a/cfg/80-restore-line.vim b/cfg/80-restore-line.vim new file mode 100644 index 0000000..acea637 --- /dev/null +++ b/cfg/80-restore-line.vim @@ -0,0 +1,13 @@ +" Return to last edited line when a file is re-opened +augroup RememberLine + autocmd! + autocmd BufReadPost * + \ if line( "'\"" ) > 0 && line( "'\"" ) <= line( "$" ) + \ && &filetype != "svn" + \ && &filetype != "gitcommit" + \ && &filetype != "gitrebase" + \ && &filetype != "hgcommit" + \ && &filetype != "cvs" | + \ execute 'normal! g`"zvzz' | + \ endif +augroup END