philc/vimium — pull request #1113 by elevengu (2014-08-03 07:19:08+00:00)
Title: Add goIncrement / goDecrement

This allows changing the current URL by modifying its number. It's quite robust and only four lines of code sans comments. There are some subtle nuances, so here are some examples of behavior:

http://123.com/?p=99 -> goIncrement(1) -> http://123.com/?p=100
http://123.com/?p=100 -> goDecrement(1) -> http://123.com/?p=99

http://123.com/?p=009 -> goIncrement(1) -> http://123.com/?p=010
http://123.com/?p=010 -> goDecrement(1) -> http://123.com/?p=009

http://123.com/?p=009 -> goIncrement(1000) -> http://123.com/?p=1009
http://123.com/?p=009 -> goDecrement(9999) -> http://123.com/?p=001
http://123.com/?p=1009 -> goDecrement(9999) -> http://123.com/?p=1