Modifying Zed's Default Keystrokes
source link: https://fuzzyblog.io/blog/zed/2022/07/12/modifying-zed-s-default-keystrokes.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Modifying Zed's Default Keystrokes
Jul 12, 2022
I'm now deep into my week of using the Zed editor, a new code editor written in Rust. In this blog post, I'll document how to change the default keystrokes.
Commands
This happens from the Zed menu, the Preferences command. There are two commands you need:
- Open Default Key Bindings
- Open Key Bindings
What you want to do is:
- Zed menu => Preferences => Open Default Key Bindings. This gives you a giant JSON file in a buffer which you can CMD+A, CMD+C.
- Zed menu => Preferences => Open Key Bindings. You can then paste this in and make changes.
For example, I am used to these keystrokes which I use constantly:
- CMD+T – fuzzy file finder; By default this is CMD+P in Zed
- CMD+L – goto line
- SHIFT+CMD+F – Global Cross File Search (already the same in Zed!)
- CMD+/ – block comment the selected region or line
Once I knew the keystrokes I wanted, I simply needed to search the json file and then make changes as needed. I did notice that CMD+/ was already defined as a commenting feature and it simply didn't work which is why I thought I needed to change it.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK