Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vim Auto Comment
augroup commentcmds
autocmd!
autocmd FileType python nnoremap <buffer> ,c I#<esc>
autocmd FileType sh nnoremap <buffer> ,c I#<esc>
autocmd FileType cpp nnoremap <buffer> ,c I//<esc>
autocmd FileType c nnoremap <buffer> ,c I//<esc>
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment