Skip to content

Instantly share code, notes, and snippets.

@laktek
Created November 8, 2009 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laktek/229044 to your computer and use it in GitHub Desktop.
Save laktek/229044 to your computer and use it in GitHub Desktop.
if has("folding")
set foldenable
set foldmethod=syntax
set foldlevel=1
set foldnestmax=2
set foldtext=strpart(getline(v:foldstart),0,50).'\ ...\ '.substitute(getline(v:foldend),'^[\ #]*','','g').'\ '
" automatically open folds at the starting cursor position
" autocmd BufReadPost .foldo!
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment