abhibeckert/Dux — Issue #1: Hold control to move by subword
Author: abhibeckert
Created: 2011-11-19 21:21:56+00:00
State: open

When pressing the left/right buttons while holding the control key, Dux should move by "subword".

Instead, it moves to the start/end of the current line.

This behaviour also needs to be added to delete/forward delete and extending the selection by holding the shift key.

A "subword" is any point where the case changes in a word, or where there is an underscore. Non-alphanumeric characters other than underscore are jumped over as if they weren't there if the cursor begins moving next to them (see example 4).

**Examples**:

1) `initWithString`: offsets 0, 4, 8, 14
2) `NSURLConnection`: offsets 0, 5, 15 — _5 is before the C, not after it!_
3) `NS_DEPRECATED`: offsets 0, 2, 3, 14
4) `if (!self.fileURL)`: when moving right: offsets 2, 9, 14, 17. When moving left: offsets 14, 10, 5, 0 — _notice it does not stop at the end of the line when moving right, because the second last character is non-alphanumeric. Instead it jumps to the end of the first subword on the next line_