I have a vim config entry to return to the last position in a file. Is there a way to ignore git commit messages?
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
I have a vim config entry to return to the last position in a file. Is there a way to ignore git commit messages?
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
Perhaps like this:
autocmd BufReadPost *
\ if expand('%:p') !~# '\m/\.git/' && line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif