Tuesday, March 3, 2015

Re: How to cancel [count] prefix?

Hi Tim!

On Di, 03 Mär 2015, Tim Chase wrote:

> On 2015-03-03 19:42, Christian Brabandt wrote:
> > > > The only solution for Visual mode i've found so far is to press
> > > > '@_'. Is there a better way?
> > >
> > > I generally just hit <esc> and then use "gv" to re-highlight the
> > > previously-selected region. The "@_" is a nice trick though
> > > (files that away)
> >
> > Another (less-hackish) way is to use Ctrl-O (:h v_CTRL-O)
>
> While I didn't know about this, it sounds like this only applies in
> Selection mode, not Visual mode. I seem to recall that the OP was
> talking about Visual mode.

It works in both modes and switches to visual mode from select mode but
if you are already in visual mode it cancels the count, if one was given
and it will also beep

> >> That said, I don't believe I've heard of anything that will clear
> >> the count without also clearing the command.
> >
> > I don't know any. Is there a need for such a key? "gC" perhaps?
>
> I don't feel a strong need for it to be added, and one could
> theoretically just
>
> :vnoremap <esc> <esc>gv
>
> allowing you to use <esc> with one keypress (and if you wanted to
> cancel Visual mode, you can still use control+C)

Yeah I feel the same. I have never felt the need for such a command.
Canceling and redoing with the correct count usually is usually fast
enough.

Best,
Christian
--
Was ist praedestinatio?

Antwort.
Gott ist mächtiger und weiser als wir; darum macht er es mit uns nach
seinem Gefallen.
-- Goethe, Maximen und Reflektionen, Nr. 542

--
--
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: