LunarVim/plug-config/vim-commentary.vim

10 lines
240 B
VimL
Raw Normal View History

2020-07-15 03:59:35 +02:00
function! Comment()
if (mode() == "n" )
execute "Commentary"
else
execute "'<,'>Commentary"
endif
endfunction
vnoremap <silent> <space>/ :call Comment()
autocmd filetype javascript.jsx setlocal commentstring={/*\ %s\ */}