Wednesday, November 30, 2011

Re: Why I'm not switching to command mode?

* Alexander Kostikov [2011.11.29 21:40]:
> After some retries I figure out command that does the thing I want:
>
> snoremap <C-C> <ESC>gv"*ygv<ESC>
>
> Few lessons learned:
> 1) if vnoremap is used I'm not able to return to command mode for some reason

There is no "command" mode in vim. One may think
you are referring to "command-line" mode, but you
seem to be referring to "normal" mode. That's the
mode where h,j,k,l move the cursor around in the
text.

If you don't return to normal mode after your
original command, what mode *are* you in?

> The question is - could this command be written
> easier?

Sure.

:vnoremap <c-c> "*y`>

--
JR

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

No comments: