zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
42.12k stars 2.21k forks source link

ctrl-a doesn't move to beginning of line #11129

Open algesten opened 2 months ago

algesten commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

On macOS, when I press ctrl-a to "Move to beginning of line", Zed jumps to the first non-whitespace character. Only if I press ctrl-a again does it jump to the actual beginning of line. What's worse is that if I press ctrl-a when I am at the (true) beginning, it jumps forward to the non-whitespace character again.

VSCode (correct behavior):

vscode

Zed jumping to beginning of non-whitespace (wrong behavior): zed1

Zed jumping back/forth on ctrl-a (pathological): zed2

Environment

Zed: v0.132.3 (Zed) OS: macOS 13.6.6 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

Moshyfawn commented 2 months ago

This behaviour seems to be described in this enhancement ticket. Let me know if it'd be fair to close this issue in favour of #7863.

failable commented 2 months ago

Isn't that desired behavior??? In other editors, one would even require an extension to achieve the same effect (e.g. https://github.com/alezost/mwim.el for Emacs). I've thought this feature is built in Zed.

algesten commented 2 months ago

@Moshyfawn I don't know. That other issue seems to be about deletion. I talk about moving. Maybe they are the same underlying problem?

@failable I don't mind some people want this behavior. I've used code editors since the early 90s and ctrl-a/e for beginning/end of line is so deep in my muscle memory that it stopped me going further with Zed currently.