Saturday, February 5, 2011

Re: command to select a line from the cursor point

On 02/05/2011 06:35 PM, vineeth wrote:
> What is the way to select till the end of the line starting from the
> cursor point?

As AK notes, you want the "$" motion. However *selecting* alone
is rarely useful -- usually you want to *do* something with that
selection: copy it to a register/clipboard, delete it, change
(delete and start insert-mode) it, transform it, etc. Thus you'd
want to use the motion in concert with the command. In the list
above, you could

yank it: y$ "+y$
delete it: d$
change it: c$
transform it: gu$ gU$ g?$ g~$

-tim

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