summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plug-config/vim-commentary.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/plug-config/vim-commentary.vim b/plug-config/vim-commentary.vim
new file mode 100644
index 00000000..c9637e69
--- /dev/null
+++ b/plug-config/vim-commentary.vim
@@ -0,0 +1,9 @@
+function! Comment()
+ if (mode() == "n" )
+ execute "Commentary"
+ else
+ execute "'<,'>Commentary"
+ endif
+ endfunction
+vnoremap <silent> <space>/ :call Comment()
+autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */}