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

Flash.nvim style search in a document. #14801

Open
1 task done
stephen776 opened this issue Jul 19, 2024 · 12 comments
Open
1 task done

Flash.nvim style search in a document. #14801

stephen776 opened this issue Jul 19, 2024 · 12 comments
Labels
enhancement [core label] search / project search Feedback for in-file search, multi-buffer global search, etc vim

Comments

@stephen776
Copy link

stephen776 commented Jul 19, 2024

Check for existing issues

  • Completed

Describe the feature

Flash lets you search and jump to Text inside a file by appending jump labels as you type search text.

it is an incredibly fast way to jump the cursor to specific places and would be an excellent addition to vim mode in Zed.

@stephen776 stephen776 added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Jul 19, 2024
@stephen776 stephen776 changed the title Flash.vim style search in a document. Flash.nvim style search in a document. Jul 19, 2024
@notpeter
Copy link
Member

Hi @stephen776, interesting. So as I understand this, when searching in vim mode it dynamically creates "labels" which are appended inline following matches to allow you to quickly jump to that match if you type those letters rather than typing the vim pattern. These labels appear to be generated dynamically to not conflict with any characters that could following your current pattern. Additionally, it appears to support having the same labels for block starts/end (I assume using tree-sitter)?

What happens if you hit a typo that matches a label? Would this only be possible in vim mode or do you thin kit would be possible to support this in non-vim modes?

Can you say a little bit more about how you use this feature and why you find it so powerful?

@notpeter notpeter added vim search / project search Feedback for in-file search, multi-buffer global search, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 19, 2024
@stephen776
Copy link
Author

Yep that's correct. As for the typo/tag question, as soon as you press a tag it jumps to it. However, I think that it will attempt to avoid tags that are legitimate next character matches for potential overall matches to reduce the chance of accidental jumps. It work quite well in practice.

These types of navigation plugins are popular in the neovim/vim community. Other plugins with similar goals/ux include:

I imagined this working in vim mode but perhaps it could work in non-vim mode with a keybind.

@zebede22
Copy link

I'm using flash.nvim quite actively and supporting something similar on Zed would be amazing.

  1. Search integration is great, it allows to jump anywhere on the screen very fast!
    image

  2. I found treesitter way to select objects very fast as well, with a key press you can select objects
    image

@aegatlin
Copy link

Howdy! 😄

I wanted to share some further "prior art" on this style of (n)vim navigation:

Would love to see it in Zed ❤️ and thank you for this awesome editor 🙏

@machin3io
Copy link

As awesome as zed already is, integrating something like this, even as an extension, would lift it to another level :) Hope it happens.

@djmango
Copy link

djmango commented Nov 11, 2024

Is this possible to add via an extension? Would prefer core ideally but I'd be happy to look into writing a plugin

@Dev-cmyser
Copy link

also wait this feature

@Dev-cmyser
Copy link

Is this possible to add via an extension? Would prefer core ideally but I'd be happy to look into writing a plugin

yeah, maybe try to do this ?
I don't have ex in rust but i think you , me and chatgpt can create this

@Dev-cmyser
Copy link

Dev-cmyser commented Nov 23, 2024

for start - we can create 1 feature - "jump in all creen"

@djmango
Copy link

djmango commented Nov 23, 2024

As it seems, extensions don't support this kind of functionality

@Dev-cmyser
Copy link

As it seems, extensions don't support this kind of functionality

why ? i don't undeerstand

@djmango
Copy link

djmango commented Nov 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] search / project search Feedback for in-file search, multi-buffer global search, etc vim
Projects
None yet
Development

No branches or pull requests

7 participants