I am using a vim plugin called tComment
It allows me to comment a line by pressing gc
or <c-_><c-_>
Also, it works on the shortcut <c-/><c-/>
but the visual selection
is lost.
So, I tried:
<c-/>
My attempts :
inoremap <c-/> gc
vnoremap <c-/> gc gv
nnoremap <c-/> gc
=========
imap <c-/> gc
vmap <c-/> gc gv
nmap <c-/> gc
=========
imap <c-/> gc$
vmap <c-/> gc$ gv
nmap <c-/> gc$
=========
inoremap <c-/> <c-_><c-_>
vnoremap <c-/> <c-_><c-_> gv
nnoremap <c-/> <c-_><c-_>
=========
imap <c-/> <c-_><c-_>
vmap <c-/> <c-_><c-_> gv
nmap <c-/> <c-_><c-_>
( Non of the above seems to work )
Note:
tComment
on native vim
(Ubuntu) lands you to my setup.:map
, not :noremap
.<Plug>PluginName...
for that. Read :help g:tcommentMaps
for instructions for this particular plugin, then place your overrides into your ~/.vimrc
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With