mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
create a function to handle multi line comment
This commit is contained in:
parent
bd30daefea
commit
f3ba68b3cc
1 changed files with 2 additions and 1 deletions
|
@ -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\ */}
|
||||
|
|
Loading…
Reference in a new issue