summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGharbi Mohamed <[email protected]>2020-07-15 02:59:35 +0100
committerGharbi Mohamed <[email protected]>2020-07-15 02:59:35 +0100
commitbd30daefeaf23b206ab778e8123c8a08d524ccc8 (patch)
treef09ff6fd4965a09e91b04d13fc81f500559636fe
parentb178b332dd191d606ea50762563434edc2f8ea54 (diff)
add a config file for vim commentary
-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\ */}