From bd30daefeaf23b206ab778e8123c8a08d524ccc8 Mon Sep 17 00:00:00 2001 From: Gharbi Mohamed Date: Wed, 15 Jul 2020 02:59:35 +0100 Subject: add a config file for vim commentary --- plug-config/vim-commentary.vim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plug-config/vim-commentary.vim 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 / :call Comment() +autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */} -- cgit v1.2.3