On 01/13/2013 05:20 PM, neoaggelos@yahoo.gr wrote:
> Hey I'm trying to create a control all mapping with this:
>
> :map <c-a> <esc>ggvG
>
> However, the last line isn't selected. I know that G is the
> problem, what I would like to know is the key to get to EOF
> instead of the last line
If you really want a character-wise selection, you can add "$"
to the end of your mapping. This will take you to the end of
the last line.
But you might want to have a look at the mappings found in the
"mswin.vim" file distributed with Vim. For example, the "Select
all" mappings are:
" CTRL-A is Select all
noremap <C-A> gggH<C-O>G
inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
cnoremap <C-A> <C-C>gggH<C-O>G
onoremap <C-A> <C-C>gggH<C-O>G
snoremap <C-A> <C-C>gggH<C-O>G
xnoremap <C-A> <C-C>ggVG
These use linewise selections which many people prefer.
Michael Henry
--
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