LunarVim/vimscript/nv-commentary/init.vim
2021-03-16 21:03:54 -04:00

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