Skip to content

Instantly share code, notes, and snippets.

@ubermajestix
Last active December 15, 2015 09:49
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 ubermajestix/5240898 to your computer and use it in GitHub Desktop.
Save ubermajestix/5240898 to your computer and use it in GitHub Desktop.
Vim bindings for the TComment plugin: https://github.com/tomtom/tcomment_vim
" Use tcomment instead of Nerd_commenter
if has("gui_macvim") && has("gui_running")
inoremap <D-/> <Esc>:TComment<CR>i
nnoremap <D-/> :TComment<CR>
vnoremap <D-/> :TComment<CR>
else
inoremap <leader>/ <Esc>:TComment<CR>i
nnoremap <leader>/ :TComment<CR>
vnoremap <leader>/ :TComment<CR>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment