Shougo/vinarise — pull request #1 by s-yukikaze (2012-02-21 08:20:47+00:00)
Title: - Implemented relative move.

I implemented the feature to move the cursor relative to the current position.

The implementation is placed in autoload/vinarise/mappings.vim#s:move_by_input_offset function.
It is mapped to the keymapping "go <Plug>(vinarise_move_by_input_offset)."

The specification is as follows:
Running the command, Vim waits for a user to enter a moving offset.
This value must be a hexadecimal number(e.g. 0x19, -0x69), or a percentage of a file size(e.g. 19%, -69%).
When it is a negative number, the cursor moves by the absolute value to upper address direction, and vice versa.

The internal behavior is as follows:
1. Wait for a user to entering a moving offset.
2. Calculate the absolute address from the input.
3. Clamp the address to a range [0, file size - 1].
4. Call s:move_to_input_address function with the address.