8000 Support subword cursor navigation by nathansobo · Pull Request #7612 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Support subword cursor navigation #7612

Merged
merged 8 commits into from
Jul 1, 2015
Merged

Support subword cursor navigation #7612

merged 8 commits into from
Jul 1, 2015

Conversation

nathansobo
Copy link
Contributor

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 forward
  • ctrl-alt-b Move subword backward
  • ctrl-alt-d Delete subword forward
  • ctrl-alt-h Delete subword backward
  • ctrl-alt-shift-F Select subword forward
  • ctrl-alt-shift-B Select subword backward

dsandstrom and others added 7 commits March 1, 2015 17:17
- 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.
@benogle
Copy link
Contributor
benogle commented Jul 1, 2015

ctrl-alt-f Move subword forward

Are these the defaults in any other editor? They are strange on a qwerty keyboard because the f key is left of the b key. If there are default bindings, my vote would be for arrow key chord defaults.

@nathansobo
Copy link
Contributor Author

@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.

@benogle
Copy link
Contributor
benogle commented Jul 1, 2015

I would definitely leave the arrow bindings

Noted

nathansobo pushed a commit that referenced this pull request Jul 1, 2015
Support subword cursor navigation
@nathansobo nathansobo merged commit b957735 into master Jul 1, 2015
@nathansobo nathansobo deleted the add-subword-cursors-4 branch July 1, 2015 17:47
@dsandstrom
Copy link
Contributor

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 :not([mini]) selectors.

Btw, congrats on 1.0.

@benogle
Copy link
Contributor
benogle commented Jul 1, 2015

🎉 glad to have this in

@nathansobo
Copy link
Contributor Author

I have not tried building this version, but does subword navigation work on mini editors? If not, the keymaps should be under the :not([mini]) selectors.

I just confirmed that the bindings and commands work in mini-editors, as I think they should.

8AEF

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0