Skip to content

JetBrains keymap: Add CamelHump subword navigation - #51540

Merged
tomhoule merged 7 commits into
zed-industries:mainfrom
loadingalias:editor-camelhump-alt-arrows
Aug 14, 2026
Merged

JetBrains keymap: Add CamelHump subword navigation#51540
tomhoule merged 7 commits into
zed-industries:mainfrom
loadingalias:editor-camelhump-alt-arrows

Conversation

@loadingalias

@loadingalias loadingalias commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Closes #21054

Summary

• make the JetBrains base keymap use subword motions for Alt+Left/Right and Shift+Alt+Left/Right in editors
• keep Zed's default keymaps and the underlying word/subword primitives unchanged
• document word vs. subword navigation in the key bindings docs
• document the JetBrains default in the IntelliJ, WebStorm, PyCharm, and RustRover migration guides

Testing

• ./script/check-keymaps
• cargo fmt --all -- --check
• ./script/clippy -p editor
• cd docs && pnpm dlx prettier@3.5.0 src/key-bindings.md src/migrate/intellij.md src/migrate/webstorm.md src/migrate/pycharm.md src/migrate/rustrover.md --check

Related to #12816 and #34090, but does not actually address the configurable word separators or broader subword semantics. Intentionally scoped to JetBrains keymap defaults & docs.

Release Notes:

  • Improved JetBrains keymap behavior by adding CamelHump-style subword navigation in editors.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 14, 2026
@ConradIrwin

Copy link
Copy Markdown
Member

@loadingalias thanks! In the docs can you give people the actual snippets they need to copy paste to make this work please?

@loadingalias

loadingalias commented Mar 14, 2026

Copy link
Copy Markdown
Contributor Author

@loadingalias thanks! In the docs can you give people the actual snippets they need to copy paste to make this work please?

Added copy/paste keymap.json snippets to the key bindings docs, with an example for non-JetBrains users who want CamelHump style subword motions and an override for JetBrains users who want to restore tab navigation in the editor. Cool?

@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 19, 2026
@tomhoule tomhoule assigned as-cii and tomhoule and unassigned ConradIrwin Mar 19, 2026
@github-actions github-actions Bot added size/M and removed size/M labels Mar 19, 2026
@tomhoule

Copy link
Copy Markdown
Contributor

Thanks for the contribution! We felt that the new section in a very prominent spot in the keybindings page needed more planning, but the change itself is very welcome, let's merge!

@loadingalias

Copy link
Copy Markdown
Contributor Author

Thanks for the contribution! We felt that the new section in a very prominent spot in the keybindings page needed more planning, but the change itself is very welcome, let's merge!

I totally understand and - in a way - agree. Let's talk it over? I think it's important that we get the docs updated to start closing the issue/s attached to the misinformation or misunderstanding, yeah?

Anyone can ping me on the Guild Slack channel and we can plan it out? I think my core goal is to remove the ambiguity and close the issue/potential for new issues for good. Let me know what I can do to help!

@tomhoule

Copy link
Copy Markdown
Contributor

@loadingalias let's discuss here (I'm not on the Guild slack). Looking at the docs page again, what do you think of moving the paragraph to the "Tips and Tricks" section?

@loadingalias

Copy link
Copy Markdown
Contributor Author

Hey, @tomhoule. Seems totally reasonable. I think the most important thing is that Zed's Docs are incredibly clear about it. While working out the fix, there are a handful of people that just didn't realize it was possible to do.

I think my only concerns are - is this something that's easily found, or is it going to require a deep dive to find it - and is it general enough for 'Tips and Tricks'?

If you decide you want that moved; just ask! I'm happy to help.

@tomhoule

Copy link
Copy Markdown
Contributor

My current thinking is that it should be included, it's useful documentation, but there's no section in the keybindings docs that clearly fits, so "Tips and tricks" was just the closest. Subword navigation is very specific, it doesn't fit as a top level section. So maybe we can start in tips and tricks, and when there are enough items like this to make a grouping, we can move them to their own section. I think the tips and tricks section is pretty discoverable as is, especially with the links in the migration guides, so I would be satisfied with that solution. What do you think?

@loadingalias

Copy link
Copy Markdown
Contributor Author

Yeah, this seems like the best plan. I'm mobile and can't check - what's the search infra for Zed's docs? Algolia or something?

@zelenenka zelenenka removed the size/M label Apr 9, 2026
@tomhoule

Copy link
Copy Markdown
Contributor

what's the search infra for Zed's docs? Algolia or something?

I have to say I don't know.

@smitbarmase smitbarmase added the area:docs This is a PR label! For issues use issue type 'Docs' instead. label May 29, 2026
@loadingalias
loadingalias force-pushed the editor-camelhump-alt-arrows branch from 0810bc1 to 720953c Compare June 29, 2026 17:45
@loadingalias

Copy link
Copy Markdown
Contributor Author

I've rebased to main.

I resolved the WebStorm migration-doc conflict and kept the subword/CamelHump docs aligned with the rest of the JetBrains migration pages.

I also moved the general subword navigation guidance into key-bindings.md under “Tips and Tricks”, following the earlier review/idea.

I want to see this closed/merged. I'm here and ready if I'm needed.

@tomhoule
tomhoule force-pushed the editor-camelhump-alt-arrows branch from 720953c to 3601df6 Compare August 14, 2026 11:20

@tomhoule tomhoule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay; looks good to me. Thank you for the contribution!

@tomhoule
tomhoule added this pull request to the merge queue Aug 14, 2026
Merged via the queue into zed-industries:main with commit 30f806c Aug 14, 2026
34 checks passed
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
)

Closes zed-industries#21054

## Summary
• make the JetBrains base keymap use subword motions for
`Alt+Left/Right` and `Shift+Alt+Left/Right` in editors
• keep Zed's default keymaps and the underlying `word`/`subword`
primitives unchanged
 • document word vs. subword navigation in the key bindings docs
• document the JetBrains default in the IntelliJ, WebStorm, PyCharm, and
RustRover migration guides

## Testing
 • `./script/check-keymaps`
 • `cargo fmt --all -- --check`
 • `./script/clippy -p editor`
• `cd docs && pnpm dlx prettier@3.5.0 src/key-bindings.md
src/migrate/intellij.md src/migrate/webstorm.md src/migrate/pycharm.md
src/migrate/rustrover.md --check`

Related to zed-industries#12816 and zed-industries#34090, but does not actually address the
configurable word separators or broader subword semantics. Intentionally
scoped to JetBrains keymap defaults & docs.

Release Notes:

- Improved JetBrains keymap behavior by adding CamelHump-style subword
navigation in editors.

---------

Co-authored-by: Tom Houlé <tom@tomhoule.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
@loadingalias
loadingalias deleted the editor-camelhump-alt-arrows branch August 31, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs This is a PR label! For issues use issue type 'Docs' instead. cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CamelHump treatment for alt-[arrows] keys

7 participants