summaryrefslogtreecommitdiff
path: root/vimscript/nv-commentary/init.vim
blob: 284e6286c491469d36ec89174fcf5685368cf295 (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.jsx
autocmd FileType javascriptreact setlocal commentstring={/*\ %s\ */}