1
0
mirror of https://github.com/xlogerais/config-vim synced 2024-09-19 22:29:58 +02:00

Added configuration to save and restore the cursor position

This commit is contained in:
Xavier Logerais 2015-03-01 21:05:31 +01:00
parent 9417cc6479
commit 8fe81ff622

14
vimrc
View File

@ -66,6 +66,20 @@ set laststatus=2
" n... : where to save the viminfo files
set viminfo='10,\"100,:100,%,n~/.vim/viminfo
" ------[ Restauration de la position du curseur ] ----------------------------------------------
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
" ------ [ Gestion de la coloration syntaxique ] ----------------------------------------------
syntax on