diff options
Diffstat (limited to 'vimscript/nv-commentary/init.vim')
-rw-r--r-- | vimscript/nv-commentary/init.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vimscript/nv-commentary/init.vim b/vimscript/nv-commentary/init.vim new file mode 100644 index 00000000..284e6286 --- /dev/null +++ b/vimscript/nv-commentary/init.vim @@ -0,0 +1,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\ */} + |