mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 11:31:30 +01:00
vim: do not return to previous edit position for files in .git
This commit is contained in:
parent
7005372b5a
commit
782accd7ae
|
@ -84,7 +84,10 @@ if has('persistent_undo')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Return to last edit position when opening files (from amix's vimrc)
|
" Return to last edit position when opening files (from amix's vimrc)
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
au BufReadPost * if ! exists('b:dotgitFolder') | if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
" set a marker to avoid returning to the previous position in .git folders
|
||||||
|
" (avoids returning to previous position for COMMIT_EDITMSG etc )
|
||||||
|
au BufReadPost */.git/* let b:dotgitFolder = 1
|
||||||
|
|
||||||
" Bash like keys for the command line
|
" Bash like keys for the command line
|
||||||
cnoremap <C-A> <Home>
|
cnoremap <C-A> <Home>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user