Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top