Created
May 17, 2010 21:58
-
-
Save troynt/404282 to your computer and use it in GitHub Desktop.
.vimrc for code folding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Folding | |
hi Folded guibg=red guifg=Red cterm=bold ctermbg=DarkGrey ctermfg=lightblue | |
hi FoldColumn guibg=grey78 gui=Bold guifg=DarkBlue | |
set foldclose= | |
set foldmethod=indent | |
set foldnestmax=10 | |
set foldlevel=0 | |
set fillchars=vert:\|,fold:\ | |
set foldminlines=2 | |
let php_folding = 1 | |
" Toggle fold state between closed and opened. | |
" | |
" If there is no fold at current line, just moves forward. | |
" If it is present, reverse it's state. | |
fu! ToggleFold() | |
if foldlevel('.') == 0 | |
normal! l | |
else | |
if foldclosed('.') < 0 | |
. foldclose | |
else | |
. foldopen | |
endif | |
endif | |
echo | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment