[vim] Fix BufferScrolling

pull/28/head
Alpha Chen 10 years ago
parent 9be4ab88cb
commit d000286f47

@ -96,7 +96,7 @@ if v:version >= 700
augroup BufferScrolling augroup BufferScrolling
au! au!
au BufLeave * if !&diff | let b:winview = winsaveview() | endif au BufLeave * if !&diff | let b:winview = winsaveview() | endif
au BufEnter * if exists('b:winview') && !&diff | call winrestview(b:winview) | endif au BufEnter * if exists('b:winview') && !&diff | call winrestview(b:winview) | unlet! b:winview | endif
augroup END augroup END
endif endif
@ -108,8 +108,8 @@ set foldlevel=3
" view " view
set viewdir=$HOME/.vim_view// set viewdir=$HOME/.vim_view//
" " au BufWinLeave ?* mkview " " au BufWinLeave ?* mkview
au BufWritePost,BufLeave,WinLeave ?* mkview " for tabs " au BufWritePost,BufLeave,WinLeave ?* mkview " for tabs
au BufWinEnter ?* silent loadview " au BufWinEnter ?* silent loadview
" jump to last cursor position when opening a file " jump to last cursor position when opening a file
autocmd BufReadPost * autocmd BufReadPost *

Loading…
Cancel
Save