diff options
author | Gharbi Mohamed <[email protected]> | 2020-07-15 03:03:47 +0100 |
---|---|---|
committer | Gharbi Mohamed <[email protected]> | 2020-07-15 03:03:47 +0100 |
commit | f3ba68b3cc03cbd07b5145c62b885db5a1ba0177 (patch) | |
tree | c9836e82fbed395a16ca733b46b40ea74454288e | |
parent | bd30daefeaf23b206ab778e8123c8a08d524ccc8 (diff) |
create a function to handle multi line comment
-rw-r--r-- | plug-config/vim-commentary.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plug-config/vim-commentary.vim b/plug-config/vim-commentary.vim index c9637e69..f672715d 100644 --- a/plug-config/vim-commentary.vim +++ b/plug-config/vim-commentary.vim @@ -1,3 +1,4 @@ +" this function check whether vim is in normal mode or not and comment appropriately function! Comment() if (mode() == "n" ) execute "Commentary" @@ -5,5 +6,5 @@ function! Comment() execute "'<,'>Commentary" endif endfunction -vnoremap <silent> <space>/ :call Comment() +vnoremap <silent> <space>/ :call Comment() autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */} |