JetBrains keymap: Add CamelHump subword navigation - #51540
Conversation
|
@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? |
|
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! |
|
@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? |
|
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. |
|
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? |
|
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? |
I have to say I don't know. |
0810bc1 to
720953c
Compare
|
I've rebased to 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 I want to see this closed/merged. I'm here and ready if I'm needed. |
Co-authored-by: Antonio Scandurra <me@as-cii.com>
720953c to
3601df6
Compare
tomhoule
left a comment
There was a problem hiding this comment.
Sorry for the delay; looks good to me. Thank you for the contribution!
) 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>
Closes #21054
Summary
• make the JetBrains base keymap use subword motions for
Alt+Left/RightandShift+Alt+Left/Rightin editors• keep Zed's default keymaps and the underlying
word/subwordprimitives 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 --checkRelated 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: