LunarVim/vimscript/nv-commentary/init.vim

12 lines
314 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()
2021-03-17 03:06:38 +01:00
autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript
"autocmd FileType javascriptreact setlocal commentstring={/*\ %s\ */}
2021-03-17 02:03:54 +01:00