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

Add navigate next method #3

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

kevinrambaud
Copy link
Contributor

Hey, me again.

I have a workflow with neovim and tmux where I would like to just be able to go the next window/pane depending if I'm in neovim or in a tmux pane. I thought other people might be interested in such a workflow.

By default, I set the Ctrl + Space key binding as this is what I use.

@alexghergh
Copy link
Owner

I will be honest, I never heard about this kind of workflow. Could you please give an example on how you would use this functionality?

I have nothing against the idea of the PR, if people find it useful, I will accept it. I just never had the need of using more than up/down/left/right + previous window.

@kevinrambaud
Copy link
Contributor Author

It's a combination of the Ctrl w + w in vim and the Ctrl b + o in tmux. It enables you to go to the next window/pane with a common key binding. It's the same as doing Ctrl + Tab in Chrome/Firefox to go to the next tab.

Does that help?

@alexghergh
Copy link
Owner

I understand what it does, I just don't see how you would use it in practice. That's why I asked for an example.

I will take a look at the PR today. At first glance it looks good. However I want to make a clear distinction between last "current window" (what is currently called "previous") and the next window by number.

If you introduce next as in "next by number", there might be confusion as to what "previous" means.

In Tmux man page, "next" and "previous" are used for windows by numbers, while "last" is used for the last (previously current) window.

Do you think we should also change this here? I.e. change "previous" to "last"..

@kevinrambaud
Copy link
Contributor Author

Considering what you've described, changing "previous" by "last" would make more sense I think.

README.md Outdated
@@ -39,6 +39,7 @@ The default keybinds are (in tmux):
- `Ctrl + k`: move up
- `Ctrl + l`: move right
- `Ctrl + \`: move to previous pane
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to: "- Ctrl + \: move to the last (previously active) pane".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

README.md Outdated
@@ -39,6 +39,7 @@ The default keybinds are (in tmux):
- `Ctrl + k`: move up
- `Ctrl + l`: move right
- `Ctrl + \`: move to previous pane
- `Ctrl + Space` move to the next pane
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this to: "- Ctrl + Space move to the next pane (by pane number)".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@alexghergh
Copy link
Owner

For now, I will keep the naming as it is, though I just want to make it clear for the user what each command does.

@alexghergh alexghergh merged commit 51e5ad0 into alexghergh:main Sep 13, 2021
alexghergh added a commit that referenced this pull request Sep 17, 2021
Pull request #3 introduced a "navigate next" feature.
This increased ambiguity as to what "previous" means.
This commit aims to fix this by changing "previous" to
"last active" for increased clarity.

Closes #4.
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.

None yet

2 participants