Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bind enter to view diff (but not jump into diff view) ? #83

Closed
fkater opened this Issue · 4 comments

2 participants

@fkater

Hi,

I would like to rebind the enter key: Instead of showing the diff and placing the cursor into the diff view I would like to show the diff view without placing the cursor there.

So, in ~/.tigrc, I tried: bind main enter view-diff

However, this opens the diff-view in full-screen mode. I would like to keep the split-screen, though. Is there something like:

bind main enter view-diff-in-split-screen ?

Thank you for the wonderful app
Felix

@jonas
Owner

You are not the first one to request this, but I have never gotten around to actually do the needed refactoring to allow this sort of thing. The current navigation mode is somewhat hardwired with the behavior of 'Enter' making it difficult to just add a new keybinding.

I've made a quick prototype, which I think actually works pretty natural. Enter will open the diff as you proposed, and pressing enter again on the same commit will scroll the diff view, which is similar to the behavior of the current navigation mode.

@fkater

I have compiled the lazy-nav branch. Yeah, completely sufficiant for me!

Thanks a lot
Felix

@jonas
Owner

Thanks for testing this Felix. I merged the lazy-nav branch into master. To enable the lazy mode you need to add the following to ~/.tigrc:

set focus-child = no
@jonas jonas closed this
@jonas
Owner

Oh, yeah, and if you have comments, such as a better name for this option, please don't hesitate to send me a note.

@afb afb referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.