On 17-May-2011 03:42, [email protected] wrote: > 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. > > I was thinking of a simple extension: key off the 'iskeyword' option > in-addition with a 'camelcase_keyword_movement' boolean option which > would treat the 'iskeyword' as separate character sets.
I am the author of camelcasemotion (http://www.vim.org/scripts/script.php?script_id=1905), which is a vimscript implementation based off the mentioned Vim tip. The plugin supports both CamelCaseWords and underscore_notation, which I think is a crucial requirement, also for any native solution, because: 1. both notations complement each other, sometimes are even used together (e.g. CamelCase_MixedNotation) 2. both overloading the default w/e/b mappings or providing additional ones (the plugin defaults to ,w/,e/,b) covers / consumes a lot of mappings, and therefore should be as general and applicable as possible. The many users who have downloaded the plugin seem to be quite happy with it, even though there are some rare corner cases where it won't work right. I agree with you that for something so common as CamelCaseWords and underscore_notation, a native implementation built into Vim would be beneficial. However, I would argue that such an implementation would have to be general (i.e. covering at least CamelCaseWords and underscore_notation), configurable (e.g. override / additional mappings, select underscore separators [_-], stuff like 'iskeyword'), and complete (covering motions as well as new text objects). If someone is motivated to invest the huge effort that such a full implementation would comprise (and Bram signals that he'd consider including such an enhancement), I'd be happy to provide feedback and reviews. -- 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
