]> git.rmz.io Git - dotfiles.git/commitdiff
do not remember cursor position for gitcommit
authorSamir Benmendil <samir.benmendil@gmail.com>
Fri, 11 Jan 2013 19:15:49 +0000 (20:15 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Fri, 11 Jan 2013 22:01:31 +0000 (23:01 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 53183df21e21a7fbf941c120a0015bab0d2bc73c..9a611f15d60b9c144ccf7675ccf9dc4c7a41d804 100644 (file)
--- 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