LunarVim/vimscript/nv-commentary/init.vim
2021-03-16 22:06:38 -04:00

11 lines
314 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
"autocmd FileType javascriptreact setlocal commentstring={/*\ %s\ */}