FZF like vim in Zed #44094
ZaharChernenko
started this conversation in
Show and tell
FZF like vim in Zed
#44094
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I think some of the guys switched to zed not from neovim, but from vim, so I want to share my tasks that do similar things to
RG,Rg,Filesin fzf.vim. The only thing is, I slightly changed the behavior ofRg, it does a fuzzy search only by the contents of files, and not by their names, to make the behavior identical, you can remove--nth {4..}.Here is an example of the work:
https://github.com/user-attachments/assets/d2a2c8cf-69fb-4a14-a7ad-c377e18e467f
And here code:
{ "label": "RG", "command": "zed \"$(fzf --bind 'start:reload:rg --column --line-number --no-heading --color=always --smart-case \"\"' --bind 'change:reload:rg --column --line-number --no-heading --color=always --smart-case {q} || true' --bind 'enter:become(echo {1}:{2})' --ansi --disabled --delimiter : --preview 'bat -n --color=always --highlight-line {2} {1}' --preview-window '+{2}-/2' --style full --layout reverse)\"", "hide": "always", "allow_concurrent_runs": true, "use_new_terminal": true, "reveal_target": "center" }, { "label": "Rg", "command": "zed \"$(rg --column --line-number --no-heading --color=always --smart-case \"\" | fzf --bind 'enter:become(echo {1}:{2})' --ansi --delimiter : --nth {4..} --preview 'bat -n --color=always --highlight-line {2} {1}' --preview-window '+{2}-/2' --style full --layout reverse)\"", "hide": "always", "allow_concurrent_runs": true, "use_new_terminal": true, "reveal_target": "center" }, { "label": "Files", "command": "zed \"$(rg --files | fzf --preview 'bat -n --color=always {}' --style full --layout reverse)\"", "hide": "always", "allow_concurrent_runs": true, "use_new_terminal": true, "reveal_target": "center" }Beta Was this translation helpful? Give feedback.
All reactions