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

Increment/Decrement integer in URL using C-a and C-x #216

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@rspeicher
Contributor

rspeicher commented Sep 24, 2010

For a long time in my browser I've had two bookmarklets that increment or decrement the last digit in a URL. This is useful for browsing things like forums where the last number in the URL is usually the current page number for the thread, so you can go forward/back a page without using any links.

Vim has a feature that lets you increment or decrement the integer under the cursor using C-a and C-x, so I figured this might be a good addition to Vimium.

Currently it modifies the last digits in the URL, even if there's non-digits after it. Incrementing "http://myforum.com/?f=2" will change the 2 to a 3; decrementing "http://myforum.com/users/300-tsigo" will change the URL to "http://myforum.com/users/299-tsigo" which, depending on the site's underlying route handler, may or may not work.

@tedzhu

This comment has been minimized.

Show comment
Hide comment
@tedzhu

tedzhu Nov 17, 2010

sounds good, but wouldn't c-a c-x conflict with built-in shortcuts?

tedzhu commented Nov 17, 2010

sounds good, but wouldn't c-a c-x conflict with built-in shortcuts?

@rspeicher

This comment has been minimized.

Show comment
Hide comment
@rspeicher

rspeicher Feb 9, 2011

Contributor

I'm on a Mac so Control isn't used in my shortcuts, but even so the current build of Vimium overrides c-f (Find), so I'm not sure about a conflict being an issue.

Contributor

rspeicher commented Feb 9, 2011

I'm on a Mac so Control isn't used in my shortcuts, but even so the current build of Vimium overrides c-f (Find), so I'm not sure about a conflict being an issue.

@ilya

This comment has been minimized.

Show comment
Hide comment
@ilya

ilya Feb 9, 2011

Collaborator

We now have commands that'll follow next/prev links for forums and such. I think that covers most of the use cases for incrementing/decrementing an integer and does so in a friendlier way.

That said, thanks for the pull request!

Collaborator

ilya commented Feb 9, 2011

We now have commands that'll follow next/prev links for forums and such. I think that covers most of the use cases for incrementing/decrementing an integer and does so in a friendlier way.

That said, thanks for the pull request!

@mruwek

This comment has been minimized.

Show comment
Hide comment
@mruwek

mruwek Aug 25, 2013

ilya wrote:

I think that covers most of the use cases

Most, but not all of them. This is really useful feature (especially for photo galleries), so please merge it :)

mruwek commented Aug 25, 2013

ilya wrote:

I think that covers most of the use cases

Most, but not all of them. This is really useful feature (especially for photo galleries), so please merge it :)

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment