Skip to content

Instantly share code, notes, and snippets.

@towerhe
Created March 20, 2012 13:21
Show Gist options
  • Save towerhe/2135479 to your computer and use it in GitHub Desktop.
Save towerhe/2135479 to your computer and use it in GitHub Desktop.
Enable folding in vim
" Folding
set foldenable
set foldmethod=indent
set foldlevel=99999
" Folding expand/collapse mappings
map + zo
map - zc
map ++ zR
map -- zM
nnoremap <space> @=((foldclosed(line(".")) < 0) ? 'zc' : 'zo')<cr>
set cursorline " Highlight current line
set cursorcolumn " Highlight current column
set colorcolumn=80 " Right margin indicator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment