I have an HTML file with the CSS in the head. Usually I open the file in 2 tabs, so I can switch between the HTML and CSS easily, but I would also like to fold most of the code (especially the font-face declarations.) Unfortunately, whenever I open a second tab, every single fold is undone.
I can re-fold everything just fine afterwards, but if I open another tab it's all undone again.
I have code folding set up like this in my .vimrc:
set foldmethod=indent " fold based on indent
set nofoldenable " don't fold by default
set foldlevel=1 " only close/open one foldlevel at a time
au BufWinLeave * silent! mkview " save view when closing buffer
au BufWinEnter * silent! loadview " load view when opening buffer