Stefan Haller wrote:
Jacob Rus jrus@hcs.harvard.edu wrote:
- Control-RightArrow should jump by CamelCaps sub-words
You can write a macro for this too
The closest I could get is a macro that searches for the regex [A-Z][a-z], and then types left-arrow. (Actually, the real macro is a bit more complicated, but you get the idea.)
This is already pretty good, but the problem is that it doesn't work with the shift key down, which should extend the selection by CamelCapsSubWords. I see no way to achieve that, I think it needs support in the editor core so that anchor handling is done right.
Yeah, it requires some cleverness. This macro I've attached is kind of slow, but it gets the job done. This one does a forward selection, but you can do one for backwards selection as well. The one problem is that I'm not sure I can make commands which will take into account where the selection is anchored, and shrink the selection from one end. To really solve this problem we'll need some real scripting in TextMate, and that's only on the long-term todo from what I understand.
-Jacob