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

Page/scroll up & down the right diff pane: needs keybinding configurability and in-app exposure #2

Closed
ronjouch opened this issue May 31, 2020 · 7 comments

Comments

@ronjouch
Copy link

ronjouch commented May 31, 2020

When viewing a commit or a file in a commit (viewed with delta + bat), I couldn't find how to scroll down/up the diff in the right side of the screen (to view more than the first page of the diff). Here's what I intuitively tried:

  • PgDown, but it pages down the fzf cursor in the list of commits (left side)
  • Space/n/p/j/k, but it edits the query
  • Enter (thinking maybe I'd enter a mode of acting on the diff?), but it comes back to the main menu.

I'm sure there is a keyboard binding, but I couldn't find it, neither in the tool itself nor in the readme. It would be nice if it was explicitly listed in the top-left summary of the bindings (near∆ working copy Ctrl-P, ∆ merge-base Alt-P, etc.)

Thanks for the nifty tool! In particular, lack of delta/diff-so-fancy support in tig makes me like git-fuzzy 🙂.

@zatnas
Copy link

zatnas commented Jun 2, 2020

Shift-Up & Shift-Down

@ronjouch
Copy link
Author

ronjouch commented Jun 2, 2020

Shift-Up & Shift-Down

@zethnest thanks! Notes to maintainer or passerbys:

  1. I cannot use these bindings, in my terminal both are bound to move between terminal panes...
  2. ... so, I'd love to be able to configure bindings ...
  3. ... and it might still be useful to explicitly list these kinda-unusual bindings in the top-left "self-documenting" summary (near ∆ working copy Ctrl-P, ∆ merge-base Alt-P, etc.).

@ronjouch ronjouch changed the title How to page/scroll up/down the right (diff) side? Page/scroll up & down the right diff pane: needs keybinding configurability and in-app exposure Jun 2, 2020
@dandavison
Copy link

I found that mouse/trackpad scroll also does it.

@sprytnyk
Copy link

sprytnyk commented Jun 10, 2020

These shotcuts work too:
Ctrl + e - scroll up
Ctrl + y - scroll down

Navigation:
Ctrl + k - go up
Ctrl + j - go down

@yermulnik
Copy link

@vald-phoenix Kudos for ctrl + e and ctrl + y.

And +1 for an option to re-define these.

Also are there any keybinding to move right pane left and right as it doesn't wrap long lines.

@sprytnyk
Copy link

sprytnyk commented Jun 11, 2020

As for now, it looks like it's possible to redefine keybindings manually in the following files:

  • lib/modules/reflog.sh
  • lib/modules/log.sh
  • lib/modules/branch.sh
  • lib/modules/status.sh
  • lib/modules/hub/pr.sh
  • lib/core.sh

Also are there any keybinding to move right pane left and right as it doesn't wrap long lines.

As for that, this seems to be a primary limitaion of fzf by itself: junegunn/fzf#756

@bigH
Copy link
Owner

bigH commented Feb 13, 2021

the project has been updated to make the key bindings configurable. example

@bigH bigH closed this as completed Feb 13, 2021
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

No branches or pull requests

6 participants