diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index e3b600ad1..dabfef856 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -36,8 +36,8 @@ function! SpaceVim#autocmds#init() abort \ exe "normal! g`\"" | \ endif autocmd BufNewFile,BufEnter * set cpoptions+=d " NOTE: ctags find the tags file from the current path instead of the path of currect file - autocmd BufLeave * let b:winview = winsaveview() - autocmd BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif + autocmd BufLeave * let b:_winview = winsaveview() + autocmd BufEnter * if(exists('b:_winview')) | call winrestview(b:_winview) | endif autocmd BufEnter * :syntax sync fromstart " ensure every file does syntax highlighting (full) autocmd BufNewFile,BufRead *.avs set syntax=avs " for avs syntax file. autocmd FileType c,cpp,java,javascript set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://