Wednesday, October 27, 2010

RE: For languages that end statements with semicolons: d$-1

Dotan Cohen wrote:
> How about not including the last N characters? For instance,
> in C# there may be a statement in which I wish to delete all
> but the last 3 characters, such as:
> Console.WriteLine("Lots of text here that I want to delete");

Before looking at your request, are you aware of text objects?

Say the cursor is on the 'x' in "Lots of text..." in the above,
and you want to change the message. You type ci" (change inner
quotes) then type the new message.

Or, if wanting to change everything in the parentheses: ci(

Or, by movement, to change everything upto the next quote: ct"

John

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

Post a Comment