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

<number>g to jump to tab #390

Closed
phoerious opened this issue Aug 14, 2011 · 9 comments
Closed

<number>g to jump to tab #390

phoerious opened this issue Aug 14, 2011 · 9 comments

Comments

@phoerious
Copy link

Feature request: use <number>g to jump to tab <number>. So 1g would jump to the first tab from the left, 5g to the fifth tab etc. -1g, -2g, -3g etc. could jump to the first/second/third etc. tab from the right.

@wizonesolutions
Copy link

Yeah, currently this simply emulates hitting ctrl + tab <N> times, where <N> is whatever you type before gt.

@bernardobarreto
Copy link
Contributor

in Chrome you can use "Ctrl + Number", if the number is 1 it goes to the first tab, 2 to the second, etc.
But as a VIM user I don't like to press Ctrl, so I would to have what you suggested.
But I didn't like the "-1g"..
What I think that should be done is "g1", "g2".. instead of "1g", "2g".. just it.

But lets see other's opinions, and I'll see if I can be able to help on this issue.

@int3
Copy link
Collaborator

int3 commented Jan 27, 2012

g<num> is definitely more appropriate than <num>g -- a preceding number is already being used to indicate command repetition. I think this might be a good solution to issue #314.

@philc
Copy link
Owner

philc commented Feb 13, 2012

@ilya suggested "g0" for the first tab, but we need to be careful not to introduce annoying inconsistencies with Chrome's native shortcuts. I've tended to default to be more like Chrome than Vim when there's a direct conflict between the two. I'm not sure which is best for this feature.

@int3
Copy link
Collaborator

int3 commented Feb 13, 2012

A little more context: @ilya's suggestion was made in response to my original statement that g$ was awkward to press, and that we could try g0 for the last tab and g1 for the first tab.

I agree with @philc that the inconsistency isn't very pleasant. Moreover, it's nice to have the keyboard layout mirror that of the tabs -- i.e. to have numbers on the left of the keyboard map to leftmost tabs. How just doing what the OP of this bug describes? g-1 would then be the last tab. It's not the most elegant key combo, but given that g$ is already three keystrokes, this doesn't seem to make it much worse -- in fact, since none of the three keystrokes in g-1 is a modifier, there is less hand-contortion required. More importantly, this switching strategy gives us the flexibility to jump to a bigger range of tabs.

@bernardobarreto
Copy link
Contributor

@philc and @int3, g0 and g$ already exist, I did it.
@int3, my english is not that good, but for what I read you're suggesting g-1 for the last tab, correct? and for other tabs, like the fourth tab?

@philc
Copy link
Owner

philc commented Aug 16, 2014

Closing due to inactivity -- I haven't heard this feature request in a few years and I don't think it's urgent given that Chrome has its own shortcuts.

@philc philc closed this as completed Aug 16, 2014
@CaldwellYSR
Copy link

I think this is still useful especially for non-chrome users. I got used to Chrome's ctrl# shortcut but Firefox doesn't have it. g$ and g0 are helpful but not quite what I'm looking for.

@smblott-github
Copy link
Collaborator

2g0 takes you to the second tab. 3g0 the third. And so on.

Remap firstTab if you want a different key binding.

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

7 participants