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

Make instructions to open file in editor clearer #273

Closed
wants to merge 3 commits into from

Conversation

jjant
Copy link

@jjant jjant commented Oct 22, 2022

Description

It took me a while to understand how to actually set up a binding to open the selected file from the linked issue in the readme, so I thought it'd be clearer to show an example with the actual code that will do it.

@PatrickF1
Copy link
Owner

Hi @jjant, thanks for opening up this PR! The readme is more for documentation and the cookbook is more for implementing customizations. Do you mind if I copy your example/code into the Cookbook instead?

@PatrickF1
Copy link
Owner

PatrickF1 commented Oct 22, 2022

Ah I did have it in the Wiki but in the Troubleshooting instead of Cookbook, where it fits better. My bad!
I added it here https://github.com/PatrickF1/fzf.fish/wiki/Cookbook#how-can-i-configure-search-directory-to-open-up-the-current-file-in-editor.

@PatrickF1 PatrickF1 closed this Oct 22, 2022
# set -gx $EDITOR "nvim" # or "vim", or "code", etc.

# Ctrl-o will open the selected file/directory in your editor of choice.
set fzf_dir_opts --bind "ctrl-o:execute($EDITOR {} &> /dev/tty)"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case anyone is referencing this in the future, fzf_dir_opts has been renamed to fzf_directory_opts.

@jjant
Copy link
Author

jjant commented Oct 25, 2022

@PatrickF1 Thanks for taking a look at the PR!
I hadn't seen the cookbook (tho admittedly, GH wikis are not that discoverable 😅).

@jjant jjant deleted the patch-1 branch October 25, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants