Saturday, May 12, 2012

Re: How to delete a string between spaces?

On Sat, May 12, 2012 at 9:49 AM, Tim Chase <vim@tim.thechases.com> wrote:
> 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("

Most plugins do not change isk. If I want to customize isk as you
pointed without modifying the plugins (for different file type) that I
installed. Where I should put the setlocal command? Thanks!

Also da( does not work for me. Is there anything wrong with this command?

--
Regards,
Peng

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