Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== folding tests ====== These tests are just to play with some folding ideas to see how different things can be done. ===== how to use ===== - load an example file of the specified language into vim - type :new to split the window with an empty buffer - type this to map the F5 key (or pick another one) to execute our test syntax and folding in the opposite window<code> :map <F5> ggVGy<C-w><C-w>:@"<CR> </code> - copy the corresponding code block from below into the new empty buffer - while in the empty buffer, press F5 to execute the code block on the opposite buffer window ===== html ===== <code> syn clear syn case ignore syn region html start=/<\z\(html\)>/ end=/<\/\z1.*>/ contains=ALL fold syn region head start=/<\z\(head\)>/ end=/<\/\z1.*>/ contains=ALLBUT,html,body fold syn region body start=/<\z\(body\)\s*.*>/ end=/<\/\z1.*>/ contains=ALLBUT,html,head,body fold syn region element start=/<\z\(style\|script\|form\|table\|ul\|ol\|div\).*>/ end=/<\/\z1.*>/ contains=ALLBUT,html,head,body fold syn region comment start=/<!--/ end=/-->/ contains=ALLBUT,comment set fen set foldnestmax=20 set foldlevel=0 set foldmethod=syntax syn sync fromstart </code> docs/vim/folding_tests.txt Last modified: 2009/03/06 00:20by billh