Skip to content

Make instructions to open file in editor clearer#273

Closed
jjant wants to merge 3 commits into
PatrickF1:mainfrom
jjant:patch-1
Closed

Make instructions to open file in editor clearer#273
jjant wants to merge 3 commits into
PatrickF1:mainfrom
jjant:patch-1

Conversation

@jjant

@jjant jjant commented Oct 22, 2022

Copy link
Copy Markdown

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
Copy Markdown
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

PatrickF1 commented Oct 22, 2022

Copy link
Copy Markdown
Owner

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
Comment thread README.md
# 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
Copy Markdown
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

jjant commented Oct 25, 2022

Copy link
Copy Markdown
Author

@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.

2 participants