LunarVim/vimscript/nv-commentary/init.vim

12 lines
318 B
VimL
Raw Normal View History

2021-03-17 02:03:54 +01:00
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\ */}