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

Go to line <n> doesn't work as expected #2078

Open
heliostatic opened this issue Apr 11, 2022 · 7 comments
Open

Go to line <n> doesn't work as expected #2078

heliostatic opened this issue Apr 11, 2022 · 7 comments
Labels
A-documentation Area: Documentation improvements

Comments

@heliostatic
Copy link
Contributor

I believe, based on the g menu, that g11 should go to line 11 in a file. However, this doesn't work currently. Typing :11 does go to line 11, so the functionality seems to be present, but not implemented for the g11 case

2022-04-11 at 12 37 34 - Alacritty - CleanShot@2x

2022-04-11.at.12.35.00.-.Alacritty.-.CleanShot.mp4

.

@the-mikedavis
Copy link
Member

g11⏎ doesn't jump to l11 but g11g or 11gg will. The menu text is a bit confusing because it suggests you hit g to goto line but that's actually the second g (the first opens the goto menu). You can also use 11G or as you say :11⏎ works too

@heliostatic
Copy link
Contributor Author

Ah, I understand. Here's an attempt to clarify what's happening.

@anzhi0708
Copy link

The menu text is a bit confusing <- I agree ;)

@kirawi kirawi closed this as completed Apr 16, 2022
@David-Else
Copy link
Contributor

David-Else commented Oct 26, 2022

@the-mikedavis Could this be reopened? It is more than confusing, it is plain wrong. Something as basic as going to a line should not have false information presenting itself to you!

gg(line number) is broken, it goes to the start, and then only when you make a down movement it goes to the intended line.

g(line number)g is OK, this should be obvious in the popup hint wording and be in the docs.

Can g(line number)(enter) be made to work as well/instead?

@the-mikedavis
Copy link
Member

It is more than confusing, it is plain wrong.

To rehash my comment above, I see this as potentially confusing since it may not be clear that <n> is the count and it's easy to miss that g is a separate keypress since you just hit g to enter this menu. I think it's a stretch to call the docs false information 😕

gg(line number) is broken... g(line number)g is OK, this should be obvious in the popup hint wording and be in the docs.

A PR would be welcome to make this clearer. Aside from changing <n> to be <count>, I genuinely don't know how to improve this without making it a big paragraph that won't fit in the auto-info box. I'll re-open this issue for that.

Can g(line number)(enter) be made to work as well/instead?

Probably but there are already four ways of going to a line number: g<n>g, <n>gg, <n>G, :<n>⏎. I would rather eliminate the gg ones than add a new way. Plus, I can't think of any other key sequence that needs <ret> to finish the sequence - that behavior usually belongs to the prompt, as with :<n>⏎.

@the-mikedavis the-mikedavis reopened this Oct 26, 2022
@the-mikedavis the-mikedavis added the A-documentation Area: Documentation improvements label Oct 26, 2022
@David-Else
Copy link
Contributor

@the-mikedavis Maybe false information was too strong, it just seems to say something to me that is not true, but others might understand it in a different way.

I will try and think more about this issue...

@humphreylee
Copy link

Bumped here as I was confused as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation improvements
Projects
None yet
Development

No branches or pull requests

6 participants