Skip to content

Why were focus_workdir and focus_stage removed? #594

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

Closed
terhechte opened this issue Mar 20, 2021 · 5 comments
Closed

Why were focus_workdir and focus_stage removed? #594

terhechte opened this issue Mar 20, 2021 · 5 comments

Comments

@terhechte
Copy link
Contributor

Describe the bug
The recent merge of #575 removed the ability to quickly switch between stage and workdir. I rely on these in my daily work, for example when I accidentally stage something and want to unstage it. Now I have to scroll to the bottom of the unstaged which takes forever.
I understand that the s key is used for stage / onstage lines now but it would have been great to keep focus_workdir / focus_stage at least in the key_config.ron so I can use it. If needed I can help out with a simple PR that reintroduces it via the old, removed functions from #575.

@extrawurst
Copy link
Collaborator

Hi @terhechte I am not a fan of duplicated functionality, if find myself and users I talked to mostly use the up/down keys to navigate. if you have a very long list of items to scroll down to switch to the stage there is Shift+Down to go to the bottom right away. Are you sure this won't work for you?

Iff we re-add these special keys, we are going to need a fitting shortcut: [s]tage is taken, [I]ndex is taken. Any ideas?

@terhechte
Copy link
Contributor Author

The downside of Shift+Down is that I am loosing my current position / selection in Unstaged. Example: I'm staging a whole file as a series of some files. But then I realize I want to onstage it and only stage some lines. So I need to go to staging, unstage it, then go back to Unstaged and continue what I was doing. I'd prefer going back to where I was, not first having to go to the bottom of Unstaged because then I maybe have to hit arrow up 5-10 times until I'm back at the original position.

I do get that not everybody works this way, after all we're all peculiar in our own ways. This function doesn't even need two shortcuts, does it? In the end the user is just going back and forth between Workdir and Stage, so it could be one key that toggles. What about g for "Go" (sadly, t for toggle is used for tags). Or w for Switch?

@extrawurst
Copy link
Collaborator

The 'not losing where I was'-part makes sense me!
I like the toggle idea, lets take g for that. I am happy to accept a PR from a fellow Hamburger on this :)

@terhechte
Copy link
Contributor Author

Didn't know you were from Hamburg too! Somehow I had been thinking it was Berlin. I always wanted to attend the Rust meetup here but then Covid came and the remote meetups are not my cup of tea (after a workday in Slack and Zoom).

I created a PR with the functionality here #595

@jamesb93
Copy link

jamesb93 commented Apr 7, 2021

This feels really weird. I don't want to change my workflow - I just want a key that takes me directly to the staging area. Is this coming back or settable?

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

3 participants