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

Feature request: Similar to bindable preview() action, a bindable preview-window() action #2666

Closed
5 of 10 tasks
bcgraham opened this issue Nov 22, 2021 · 2 comments
Closed
5 of 10 tasks
Assignees
Labels

Comments

@bcgraham
Copy link

  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

I love, love, love the new preview-window options (base scroll/offset/denom). I've been adding them to my workflow. I find myself sometimes not using them when I'd like to because I have an alternate preview() action bound, but the preview window settings are different for them.

As an example, imagine using fzf to explore a merge conflict. Your preview window jumps to the offset in the file with the merge conflict: --preview-window=+{2}/2. You've bound keys to change the preview to show other indices, however - something like --bind=ctrl-l:preview(git show :1:({1}),ctrl-r:preview(git show :2:{1}). But the field index expression in your preview-window hasn't changed. Even if your search result has the desired lines for each index, you can't change the preview-window option to use different field index expressions.

Let me know if this hasn't been clear, and I can put together a more concrete example.

If this doesn't match your vision for the tool, that's great too - I trust your vision for the tool much more than my own. Thanks for making something that brings so much joy to my development experience, dozens of times a day!

@junegunn
Copy link
Owner

Thanks for the suggestion. I agree that this is needed. We could also use it to change the position or size of the preview window.

@junegunn junegunn self-assigned this Nov 25, 2021
@bcgraham
Copy link
Author

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants