문제

When I include the line:

au BufWinEnter * silent! loadview "load folds

Which resumes my saved folds, it breaks the syntax highlighting... but only in files named specifically "prototypes.h"... which is what I always name my .h files, so it must be some saved data breaking it.

Where are folds saved?

도움이 되었습니까?

해결책

It is stated in help, used the following sequence: :help :loadview: “… the view stored with ":mkview" is loaded.”, then :h :mkview (really <C-]> on :mkview in the text): “… a name is generated and 'viewdir' prepended …”, :h 'viewdir' (same, <C-]>): “default for … and Win32: "$VIM/vimfiles/view", for Unix: "~/.vim/view"…”. I was unable to find the description of how name is generated, but simple test has shown that for /usr/share/vim/vim73/doc/starting.txt it generated =+usr=+share=+vim=+vim73=+doc=+starting.txt=.

If you want to use vim efficiently you should know how to use its help system.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top