Skip to content

Open selected line in $EDITOR #7

Pinned Answered by lpnh
zoomlin asked this question in Q&A
Discussion options

You must be logged in to vote

Add the following to your ~/.config/yazi/init.lua file:

require("fr"):setup {
	fzf = "--bind 'ctrl-o:execute:$EDITOR {1} +{2}'",
}

This allows you to use ctrl + o to open the selected file in your default editor, placing the cursor on the corresponding line.
After exiting the editor, you'll return to the fzf interface.

You can replace ctrl + o with any other key that fzf supports.
You could even override the default behavior of the enter key using this option: --bind 'enter:execute:$EDITOR {1} +{2}'.

Let me know if this works for you!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zoomlin
Comment options

Answer selected by zoomlin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants