diff options
author | Christian Chiarulli <[email protected]> | 2020-07-14 22:26:05 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-14 22:26:05 -0400 |
commit | 337e7b55c8807e505ee9273467092d38bbe75a51 (patch) | |
tree | 21a5f81dcac94db41f3a3c966225132d44f97a18 /plug-config/vim-commentary.vim | |
parent | b178b332dd191d606ea50762563434edc2f8ea54 (diff) | |
parent | 51d9b8841d45992d7d0e66d51844f50ac428541a (diff) |
Merge pull request #37 from ghmhd/@ghmhd/feature/add-multiline-comment-support
Add multi line comment
Diffstat (limited to 'plug-config/vim-commentary.vim')
-rw-r--r-- | plug-config/vim-commentary.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plug-config/vim-commentary.vim b/plug-config/vim-commentary.vim new file mode 100644 index 00000000..f672715d --- /dev/null +++ b/plug-config/vim-commentary.vim @@ -0,0 +1,10 @@ +" this function check whether vim is in normal mode or not and comment appropriately +function! Comment() + if (mode() == "n" ) + execute "Commentary" + else + execute "'<,'>Commentary" + endif + endfunction +vnoremap <silent> <space>/ :call Comment() +autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */} |