sublimehq/Vintage — pull request #27 by guillermooo (2011-12-18 23:45:13+00:00)
Title: j,k remember carets' col positions between invocations

Tentative solution to copy Vim's behavior. This is an **incomplete patch**. If accepted, all key bindings performing horizontal caret movement should be modified so that the correct col positions for existing carets are tracked. For now, I've only tweaked a couple of them as an example.

The carets' col positions are stored in a global variable. Horizontal move commands should clear this variable so that vertical move commands can update it. The new commands are `ViHorizontalMove` --which simply wraps `move` to clear `CARETS_COL_OFFSET`--, and `ViVerticalMove`, where all the column bookkeeping is done.