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

Allow count prefix for close tabs commands #4296

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

philc
Copy link
Owner

@philc philc commented Aug 13, 2023

This allows the user to close "just one tab on the right" by adding a prefix to their closeTabsOnRight command.

This has been requested in #2970, #3518, #3345 and probably others.

map cl closeTabsOnRight

# Close all tabs on right
cl

# Close just two tabs on the right.
2cl

# Always close one tab on the right
map cl closeTabsOnRight count=1

This PR is a continuation of #2971 and replaces #3853.

Note that it's a bit strange that the default count of closeTabsOnRight is infinity, rather than 1. This was done to preserve existing behavior, and so that users don't have to append count=9999 to their config to implement probably the most common desired behavior which is "close all tabs on right".

This is so we can distinguish when a count has actually been given by the user, vs. not.
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

1 participant