vim一段很好的折叠代码

     24 " 用空格键来开关折叠      
     25 set foldenable
     26 set foldmethod=manual
     27 nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>
     28
     29
     30
     31 "-------------------------------  
     32 " 代码折叠  
     33 "---------------------------  
     34 set foldmarker={,}
     35 set foldmethod=marker
     36 set foldmethod=syntax
     37 set foldlevel=100       " Don't autofold anything   
     38 set foldopen-=search   " don't open folds when you search into them  
     39 set foldopen-=undo     " don't open folds when you undo stuff  
     40 set foldcolumn=4


你可能感兴趣的:(vim一段很好的折叠代码)