LunarVim/plug-config/vim-commentary.vim

11 lines
315 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
2020-07-15 09:42:33 +02:00
vnoremap <silent> <space>/ :call Comment()
2021-03-10 17:51:40 +01:00
autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript.jsx
autocmd FileType javascript.jsx setlocal commentstring={/*\ %s\ */}