On Mon, May 16, 2011 at 7:10 PM, Marc Weber <[email protected]> wrote:

> Excerpts from [email protected]'s message of Tue May 17 03:42:19
> +0200 2011:
> > For the record, I have gone through the solutions at this wiki:
> > http://vim.wikia.com/wiki/Moving_through_camel_case_words; however, I
> was
> > still left wondering if there has been an attempt to solve the camel case
> > word movement natively in Vim, as a lot of code does use this convention.
>
> Why do it natively if you can do it with some lines of VimL?
>
> Also am I right that those mappings jump to the next upper char only?
>
> Eg |TryThisExample ..
>
> If | is curser I prefer fE rather than 2<whatever mapping>
> For more complicated things I always use search.
>
> I don't expect the implementation to be complicated.
> orobably the most important question is which mappings to choose.
> Probably the most important question is which mappings to choose.
>
> Do you suggest those c-left c-right mappings?
>
> However I'd like to have a native camel case matching for completion to
> speed it up. vim-addon-completion implements a regex solution.
> Its not urgent enough to take action.
>
> Marc Weber
>


Vim has "word" and "WORD" movements. In a typical coding setup, there is not
much of a distinction between the two (except you can remove '_' for help
with unix style convention).

The definition of "word" can be changed by modifying "iskeyword" option;
however, its quite limiting, you can only pick what characters can be part
of a "word". What I'm proposing is that we add more definition to "word"
that it can be naturally extended to camelcase through the use of multiple
character sets. Moving from one character set to another is equivalent to
moving between "words". The mappings remain the same, "w", "b", "e", "ge".
And, implicitly, all other movement mappings move through "camelcase" words.

What should be built-in or extended through vimL is definitely a
philosophical question. IMHO, I feel something like camelcase as a standard
toggle-able feature would be nice.

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