On 17-Aug-2011 21:07, Jean-Rene David wrote:
> * Bram Moolenaar [2011.08.17 14:50]:
>> Jean-Rene David wrote:
>>
>>> I often use the_underscore_convention for naming
>>> [...]
>>
>> It's a nice idea, but it doesn't select "convention" in the example you
>> gave.

FYI, I have implemented such text objects (and corresponding motions, and also
for CamelCase) in Vimscript:
    http://www.vim.org/scripts/script.php?script_id=1905

I would welcome inclusion of such text objects in Vim itself, but based on past
discussions, I suspect that very soon there will be additional requests for

1. underscore_notation movement commands like w e b (this isn't an issue for the
a" a' etc. text objects strings, but in identifier names one very frequently
wants to move to a particular hunk, e.g. to replace it).

2. handling of CamelCaseNotation (both coding conventions exist, and everything
that applies to underscore_notation is useful for CamelCaseNotation, too).

There's already such an item in todo.txt:
> 8   Add text object for part of a CamelHumpedWord and under_scored_word.
>     (Scott Graham)  "ac" and "au"?

I would appreciate it if you would consider such support, or at least do your
implementation in a way that this can later be added without much duplication.

-- regards, ingo

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui