Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to easily jump to the beginning of any visible word in the active buffer #5289

Closed
damoonrashidi opened this issue Jul 15, 2022 · 8 comments
Labels
enhancement [core label]

Comments

@damoonrashidi
Copy link

damoonrashidi commented Jul 15, 2022

Before you begin
I tried searching for jump / cursor etc but didn't find anything relevant, so hopefully this isn't a dupe, sorry if it is. Also I recognise that this is a pretty low priority request!

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I'd love for a way to move the cursor to the beginning of any visible word in the active buffer using only keyboard shortcuts.

Describe alternatives you've considered
The closest thing currently available is hitting cmd+shift+o to open the outline viewer and go to a declaration in close proximity to where you want to go to minimise the number of arrow key presses necessary. Unfortunately this doesn't work if there isn't a declaration close to where you want to jump.

Another alternative is hitting ctrl+g and jump to the beginning of specific line and then hitting ⌥ + → until you hit your destination.

Screenshots
There are extensions for sublime/vs code that achieve this by overlaying a character sequence over every word when a keyboard shortcut is hit as shown below.

before hitting cmd+shift+;
image

after hitting cmd+shift+;
image

after typing any highlighted character / pair of characters (e.g. u vk nd etc) the cursor jumps to the highlighted location.

@damoonrashidi damoonrashidi added enhancement [core label] triage Maintainer needs to classify the issue labels Jul 15, 2022
@kungfusheep
Copy link

Great suggestion - A good working reference for this is the AceJump plugin for sublime. This is the thing I miss most when I'm using zed, currently.

@damoonrashidi
Copy link
Author

Great suggestion - A good working reference for this is the AceJump plugin for sublime. This is the thing I miss most when I'm using zed, currently.

Ye sorry, forgot to mention, AceJump for sublime and EasyMotion for VS Code are some editor specific extensions that do this.

@rkusa
Copy link

rkusa commented Jul 15, 2022

Big +1! If it helps, here is another example. Amp has this built-in and calls it Jump Mode: https://amp.rs/docs/usage/#jump-mode

@alejandrovrojas
Copy link

Doesn't this seem way out of scope at this point in Zed's development? In terms of code navigation a better start would be further improvements to the vim mode.

@kungfusheep
Copy link

It depends on the target audience - does Zed simply wish to emulate vim or does it wish to define itself as a serious contender in the text editor market with its own ideals, benefits and control schemes?

Personally if I wanted to use something that controlled like vim I would use vim, or neovim, for example.

I’m here testing Zed because the developers genuinely seemed enthusiastic about creating something special. If we just aim for “sublime but better plugins” or “vscode but fast” then I feel it will have been a missed opportunity.

@JosephTLyons
Copy link
Collaborator

JosephTLyons commented Jul 15, 2022

Doesn't this seem way out of scope at this point in Zed's development? In terms of code navigation a better start would be further improvements to the vim mode.

Doesn't this seem way out of scope at this point in Zed's development? In terms of code navigation a better start would be further improvements to the vim mode.

Yeah for sure, having foundational Vim stuff is going to help Vim users transfer over; Rest assure that the team is working on bringing Vim mode up to speed with what Vim users expect.

@damoonrashidi
Copy link
Author

damoonrashidi commented Jul 15, 2022

Doesn't this seem way out of scope at this point in Zed's development?

Ye for sure at this point, just throwing it out there to see if there is any chance further down the line. It's a very reasonable take that this is a low priority feature right now, if it should be implemented at all.

@JosephTLyons JosephTLyons removed the triage Maintainer needs to classify the issue label Dec 13, 2022
@clo4 clo4 mentioned this issue Mar 18, 2023
1 task
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@notpeter
Copy link
Member

notpeter commented Oct 13, 2024

Closing in favor of:

There is also a separate request for UI navigation using similar motions:

Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label]
Projects
None yet
Development

No branches or pull requests

6 participants