adarsh / dotfiles

my dotfiles - configurations for developing in OS X
8 stars 4 forks source link

Possible redundant vimrc line? #2

Closed captbaritone closed 10 years ago

captbaritone commented 10 years ago

Near the beginning of your vimrc you have the following code which ignores gitcommit file types:

" When editing a file, always jump to the last known cursor position.
" Don't do it for commit messages, when the position is invalid, or when
" inside an event handler (happens when dropping a file on gvim).
autocmd BufReadPost *
        \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
        \   exe "normal g`\"" |
        \ endif

Then you have this line near the end:

" Always start on first line of commit message
autocmd FileType gitcommit call setpos('.', [0, 1, 1, 0])

Maybe I'm missing something, but I think that gitcommit autocmd may be unnecessary.

P.S. Nice dots!

adarsh commented 10 years ago

Good catch. Fixed in https://github.com/adarsh/dotfiles/commit/d890a9179024ed8f29dc9219f7e5110df0ae8d42