diff options
author | Chris <[email protected]> | 2021-03-16 21:03:54 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2021-03-16 21:03:54 -0400 |
commit | 1bcb1fd6edd02b804f7704c5ef70c1e7c34db0a5 (patch) | |
tree | fb376c202591557934557785f435c6f93c2aac2b /vimscript/nv-commentary | |
parent | 570d317285b929d9462f65539d9f8e5f6a470b49 (diff) |
also this
Diffstat (limited to 'vimscript/nv-commentary')
-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\ */} + |