Saturday, May 12, 2012

Re: How to delete a string between spaces?

On 05/12/12 08:22, Peng Yu wrote:
> I want to delete a word in the context of the file that I'm editing
> using the same command. daW will delete the whole string, which is
> undesirable for perl. How to customize a dw command that can correctly
> delete a word depending on the context?
>
> word1($word2)

You can tweak the 'iskeyword' setting to include other characters if
it makes sense to you. So you could do

:setlocal isk+=$

to make it consider "$" part of a "word". Or, as Christian
suggests, in your particular use-case, use "di("

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