From f1f0fea75fdab72ad740098e6a6167ce37d8626d Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 11 Jan 2013 20:15:49 +0100 Subject: [PATCH] do not remember cursor position for gitcommit --- vimrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 53183df..9a611f1 100644 --- a/vimrc +++ b/vimrc @@ -95,8 +95,10 @@ if has("autocmd") " (happens when dropping a file on gvim). " Also don't do it when the mark is in the first line, that is the default " position when opening a file. + " blacklist certain filetype, you can get a file type with :echo &ft + let blacklist = ['gitcommit'] autocmd BufReadPost * - \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ if index(blacklist, &ft) < 0 && line("'\"") > 1 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif -- 2.48.1