Gestures to aid editing

I frequently find myself saying a few choice words while navigating code. Placing the insertion point is a pain. The forward/back keys are a big help but I think that gestures might be a better solution.

Example: A 2-finger swipe left/right to move to the beginning/end of the previous word

One problem I see with swiping is that it has the chance of being error prone (you might end up scrolling or your swipe might not count, for example). Some buttons for word movement could be handy, but tapping in the code should currently place you either at the beginning or end of a word (at least I’m pretty sure that’s the default behavior of iOS text views - might not apply to the Codea editor) which you can then adjust if you need to using the character movement buttons, so that’s sort of covered already. That said, there’s room for improvement.

If a way to move around in the code word by word (or I guess token by token, since I would count symbols as words when moving between 'em in code) is necessary, then buttons would probably be the ideal solution. Buttons are obvious, they don’t really require explanation, and they’re unambiguous (whereas a swipe is neither unambiguous or intuitive). I think that sort of thing is ideal for all people, both beginning and regular coders.

Anyway, that’s my silly little coder rambling. It’s ultimately up to what Two Lives Left decides is best.

I’d like to see up/down arrows (I often tap at the right place, wrong line).

I’d also like to see shortcuts for [ and ] - I use them frequently, but each is 3 keystrokes now.

Finally - an option to just make it all bigger would be neat. I can see it fine - but my ham-hands have giant fingers on them, and it’s hard to hit teensy buttons.

It would definitely be nice to have up/down arrows…

bortels, you can insert [] from the math button which makes it a bit easier.

I like the idea of up and down buttons, too.

How about a floating circle navigator over the keyboard to control cursor movement? Also zoom in/out gesture to get bigger/smaller font for the editor?

Two finger swipe is fairly easy to add, do you think the best thing for two-finger swipe is navigating by word? Or would start/end of line be better?

How about 3-fingers for the beginning/end of lines (ah… scope creep)?

Swiping up/down could be a single line for 2 fingers and 3 fingers for top/bottom of the document.

I was trying to avoid adding more buttons and thought multiple fingers would be easy since on iOS devices we’re already touching the screen to handle text.

Possibly…

  1. Having the magnifying glass come up instantly and be wider would help with placement

For button navigation…

  1. Hold down on “character forward” to start moving forward, then accelerate by word (like delete but for movement)

  2. Double tap “character forward” for word forward

Or we could just go vi :slight_smile:

You might want to check out the gestures for cursor control in Apple’s Pages. I think that will become the standard

matt: what are these gestures? Do you have a link?

Yes, spoilers would be appreciated :slight_smile:

(I will get Pages to check them out, just haven’t had the time yet)