-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Conversation
- Add commands for moving, selecting, and deleting camelCase words
Conflicts: spec/text-editor-spec.coffee
Use the structure of the regex plus a fix to text-buffer instead.
Are these the defaults in any other editor? They are strange on a qwerty keyboard because the |
@benogle We already have very similar character and word movement bindings (derived from Emacs). I would definitely leave the arrow bindings, but I think it makes sense to provide Emacs equivalents since we already have Emacs word and character bindings. |
Noted |
Support subword cursor navigation
Awesome, thanks. I have not tried building this version, but does subword navigation work on mini editors? If not, the keymaps should be under the Btw, congrats on 1.0. |
🎉 glad to have this in |
I just confirmed that the bindings and commands work in mini-editors, as I think they should. |
Continuation of #5806 in preparation to merge.
@dsandstrom I've changed the regular expression a little bit so we don't need a hack to move the cursor to the beginning of the buffer. It also required a change to text-buffer to allow regex matches at the beginning of the scan range.
One of the tests changed slightly in behavior, but it's still seeming reasonable and things are working intuitively in all my tests.
I'm considering adding the following emacs-style bindings for those of us who are averse to the arrow keys:
ctrl-alt-f
Move subword forwardctrl-alt-b
Move subword backwardctrl-alt-d
Delete subword forwardctrl-alt-h
Delete subword backwardctrl-alt-shift-F
Select subword forwardctrl-alt-shift-B
Select subword backward