summaryrefslogtreecommitdiff
path: root/vimscript/nv-commentary/init.vim
blob: 76e32b21b5f21e135ce390c5da70e4ce1c314c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
function! Comment()
  if (mode() == "n" )
    execute "Commentary"
  else    
    execute "'<,'>Commentary"
  endif
 endfunction
vnoremap <silent> <space>/ :call Comment()
autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript
"autocmd FileType javascriptreact setlocal commentstring={/*\ %s\ */}