Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Increment/Decrement integer in URL using C-a and C-x #216
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.