LunarVim/plug-config/vim-commentary.vim
2021-03-10 11:51:40 -05:00

10 lines
315 B
VimL

function! Comment()
if (mode() == "n" )
execute "Commentary"
else
execute "'<,'>Commentary"
endif
endfunction
vnoremap <silent> <space>/ :call Comment()
autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript.jsx
autocmd FileType javascript.jsx setlocal commentstring={/*\ %s\ */}