vim-commentary.vim 240 B

123456789
  1. function! Comment()
  2. if (mode() == "n" )
  3. execute "Commentary"
  4. else
  5. execute "'<,'>Commentary"
  6. endif
  7. endfunction
  8. vnoremap <silent> <space>/ :call Comment()
  9. autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */}