Vim syntax highlighting breaking for prototypes.h file due to folds. Where are folds saved?

StackOverflow https://stackoverflow.com/questions/13104687

سؤال

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