zed
zed copied to clipboard
Flash.nvim style search in a document.
Check for existing issues
- [X] 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.
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?
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.
I'm using flash.nvim quite actively and supporting something similar on Zed would be amazing.
-
Search integration is great, it allows to jump anywhere on the screen very fast!
-
I found treesitter way to select objects very fast as well, with a key press you can select objects
Howdy! π
I wanted to share some further "prior art" on this style of (n)vim navigation:
- vim-easymotion https://github.com/easymotion/vim-easymotion
- VSCodeVim configuration setting to emulate easymotion https://github.com/VSCodeVim/Vim?tab=readme-ov-file#vim-easymotion
Would love to see it in Zed β€οΈ and thank you for this awesome editor π
As awesome as zed already is, integrating something like this, even as an extension, would lift it to another level :) Hope it happens.
Is this possible to add via an extension? Would prefer core ideally but I'd be happy to look into writing a plugin
also wait this feature
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
for start - we can create 1 feature - "jump in all creen"
As it seems, extensions don't support this kind of functionality
As it seems, extensions don't support this kind of functionality
why ? i don't undeerstand
Not sure but see the other related issues, they denied a PR for this functionality too
Sulaiman Khan Ghori ( https://skg.gg/ ) | X ( https://x.com/sulaimanghori )
On Sun, Nov 24 2024 at 1:27 AM, Kirill Novgorodtsev < @.*** > wrote:
As it seems, extensions don't support this kind of functionality
why ? i don't undeerstand
β Reply to this email directly, view it on GitHub ( https://github.com/zed-industries/zed/issues/14801#issuecomment-2495888848 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AGZNIXGHVRL3GR4JLBURVOL2CGLZZAVCNFSM6AAAAABLEJGF3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVHA4DQOBUHA ). You are receiving this because you commented. Message ID: <zed-industries/zed/issues/14801/2495888848 @ github. com>
As far as I'm concerned it isn't possible for extensions to implement this -- at least we need to be able to read user input in some way (for the input of search pattern and follow-up label) and update text on the screen (this is somewhat doable via lsp capabilities but the implementation would be awkward). In the end we still need the devs to come up with other solutions -- either to provide more apis for the extensions (which may benefit other kinds of extensions as well, I personally would love some sort of fzf-lua equivalent) or a native implementation for this feature.
+1, seems pretty useful.
I really want to switch to using Zed as my daily, but not having this functionality just makes me so much slower. Until then I'll stick to Rider
Would love this!
Any updates on supporting flash like movements? I was surprised coming from VSCode that something like flash isnβt either built-in or could be added by extension in Zed.
I believe this is the only missing piece of the puzzle to finally get nvim users to switch to Zed as their primary daily driver.
Same, this would be absolutely amazing, 137 thumbs up on the original post and counting!
Big please πβ€οΈ!
Just pitching in - what's missing for this to make its way to zed? Can we help at all?
This is easily the biggest feature I miss from other editors. Let's make it happen.
YES!
are there any plans to support these features? would be really useful to improve navigation
Doesnt helix also support this type of searching put of the box? Seems like it would also be needed to support the helix bindings.
instead of spamming comments of "yes / +1" just react to the issue please! It's enough for the maintainers to understand that people want it
Howdy! Commenting to add my voice to the rumble!
Really excited to see how much progress has been made on Zed's vim mode! flash.nvim is something I lean heavily on in nvim, and it would be nice to see this in Zed as well!
vscode has the same feature through extension called "cvim". hope Zed can has this feature soon as many people lean on it.
This hinging on better extension support really highlights how much a better extension API is needed
I would suggest leap instead of flash. It's:
- more popular (4.9K start vs 3.5k)
- it improves on
vim-sneak(so you can crossvim-sneakoff the list of alternative implementations, IMO) - more ergonomic (allows editing query, eg. backspace lets you adjust/fix queries, and is easy to trigger, with one key)
- it's written in Fennel (LISP for Lua, might be harder to port, but technically AI should be able to parse it more easily)
- it's the default for LazyVim (https://www.lazyvim.org/extras/editor/leap#leapnvim)
- replaces
sandSin vim mode, which aren't all that useful or used, so it wouldn't need to take any other key binds.
@paul-manole
more ergonomic (allows editing query, eg. backspace lets you adjust/fix queries, and is easy to trigger, with one key)
I think flash also gives you the same feature. You can press backspace to edit your query. (Or, I may have misunderstood what you meant)
t's the default for LazyVim (https://www.lazyvim.org/extras/editor/leap#leapnvim)
No it's not, it is added as an "extra" plugin the default is flash.nvim (https://www.lazyvim.org/plugins/editor#flashnvim) flash is added in the core plugin list.