1
0
Fork 0
mirror of synced 2024-12-25 08:13:20 -05:00

update Vim jump to the last position config

This commit is contained in:
Tiande 2016-01-16 22:34:20 +08:00
parent 8093a5d271
commit 5dbfe3f26a

View file

@ -12,7 +12,7 @@ let g:solarized_italic=0 " 1 | 0
" let g:solarized_bold=0 " let g:solarized_bold=0
" let g:solarized_underline=0 " let g:solarized_underline=0
set background=light " dark set background=dark " dark
:colorscheme solarized " ir_black mayansmoke :colorscheme solarized " ir_black mayansmoke
" syntastic " syntastic
@ -95,13 +95,11 @@ let NERDTreeAutoDeleteBuffer=1
map <M-n> :lnext<cr> map <M-n> :lnext<cr>
map <M-p> :lprevious<cr> map <M-p> :lprevious<cr>
" Return to last edit position when opening files (You want this!) " Uncomment the following to have Vim jump to the last position when reopening a file
autocmd BufReadPost * silent! normal! g`"zv if has("autocmd")
\ if line("'\"") > 0 && line("'\"") <= line("$") | au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\ exe "normal! g`\"" | \| exe "normal! g`\"" | endif
\ endif endif
" Remember info about open buffers on close
set viminfo^=%
" multi_cursor " multi_cursor
" Default mapping " Default mapping