Tuesday, November 20, 2018

Re: C-v to toggle between v-block/visual ?

On Di, 20 Nov 2018, M Kelly wrote:

> Anyone know of a way to vnoremap <C-v> to toggle between visual and
> v-block modes ? As it is now for me, <C-v> from visual mode goes to
> v-block mode (which is great), but press <C-v> again and it exits all
> visual modes, I would like it to just toggle it back to visual mode
> and update the selection.

Something along this perhaps?

xnoremap <expr> <c-v> mode()=="\<c-v>"?"V":"\<c-v>"


Best,
Christian
--
Warum ist der Schwanz des Eichhörnchens hinten?
Weil vorne schon das Eichhörnchen ist.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: