From 1bcb1fd6edd02b804f7704c5ef70c1e7c34db0a5 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 16 Mar 2021 21:03:54 -0400 Subject: also this --- vimscript/nv-commentary/init.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 vimscript/nv-commentary/init.vim (limited to 'vimscript/nv-commentary/init.vim') 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 / :call Comment() +"autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript.jsx +autocmd FileType javascriptreact setlocal commentstring={/*\ %s\ */} + -- cgit v1.2.3