Skip to content

Instantly share code, notes, and snippets.

@dhruvasagar
Forked from kshenoy/FoldAllBut.vim
Last active December 15, 2015 18:49
Show Gist options
  • Save dhruvasagar/5307173 to your computer and use it in GitHub Desktop.
Save dhruvasagar/5307173 to your computer and use it in GitHub Desktop.
function! FoldAllBut( foldminlines )
folddoclosed
\ if ( (foldclosed(".") >= 0 ) && ( foldclosedend(".") - foldclosed(".") + 1 < a:foldminlines ))
\ exe "normal! zO"
\ endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment