Skip to content

Instantly share code, notes, and snippets.

@copenhas
Created November 11, 2010 21:27
Show Gist options
  • Select an option

  • Save copenhas/673232 to your computer and use it in GitHub Desktop.

Select an option

Save copenhas/673232 to your computer and use it in GitHub Desktop.
" When we fold or unfold a block of text determine the block
" delimiters via syntax. You can use 'za' to toggle a fold.
" There are several other commands as well.
" 'zM' to close all folds
" 'zR' to open all folds
set foldmethod=syntax
" Lets map 'za' to spacebar while in NORMAL mode
nnoremap <space> za<space>
" By default I like to see all the code, but the first time
" you try to fold something this will get toggled and all folding
" well be on.
set nofoldenable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment