On 2013-01-13, Aggelos Kolaitis wrote:
> Hey, I 'm trying to implement a "control all" mapping with the
> following command at my .vimrc
>
> :map <c-a> <esc>ggvG
>
> (The escape is to get out of insert mode if needed).
>
> However, that way the last line of the file is not selected, which
> apparently is how G works. So, is there a key to use instead of G
> to reach the end of the file (EOF)?
G does move to the last line. The problem is probably that you're
using v (characterwise) instead of V (linewise). Try this:
:map <c-a> <esc>ggVG
If for some reason you would rather select characterwise, you could
use this:
:map <c-a> <esc>gg^vG$
Regards,
Gary
--
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
Sunday, January 13, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment