Skip to content

Keybinding adjustments and debugging default improvements #29

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yves-biener
Copy link

This PR addresses my main two issues with this otherwise awesome project.

  1. The creation of a debug.log file when running diffnav serves no purpose for the end-user, as this is pretty early software, I can see the need. Hence it is now united with the tea debug log using the environment variable check too.
  2. I'm too used to scroll pagers using j and k (and others too - see Change jk keybinds or make them configurable #12), hence I changed the keybindings to the following:
    t: Toggle file tree
    /: Search
    J: Down in file tree
    K: Up in file tree
    j,k,ctrl+d,ctrl+u support for embedded delta view (viewport)

t: Toggle file tree
/: Search
J: Down in file tree
K: Up in file tree
j,k,ctrl+d,ctrl+u support for embedded delta view (viewport)
@dlvhdr
Copy link
Owner

dlvhdr commented Oct 3, 2024

Thanks for the PR @yves-biener!
I think this is a matter of what you're used to, I personally don't really like J/K for navigation. I think introducing a config file for overriding keys is the best approach here, as everyone has their own preferences.
Who knows, maybe I'll switch someday to your method of navigation :)

Another option I considered is having a notion of "focused widget" where j/k control the focused widget, whether it's the file tree or diff viewer.

The debug.log changes are nice, we can probably merge those. If you could split it to its own PR, that would make it easier.

@dlvhdr
Copy link
Owner

dlvhdr commented Oct 5, 2024

I've fixed the debugging mistake in #34

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