Sublime Forum

Vintage mode, retain column position

#1

In vi if you move the cursor up or down rows your column position will be maintained. If you move to a row with fewer characters than your original column position the cursor will move to the end of the line, but if you then move to another line long enough to have your original column position the cursor will move to that column.

I.e. if you were working on the following 4 line document and your cursor started at the capital X, as you moved down your cursor would be at column 3, 2, 1, and finally 3 on the last line.

xxXx
xx

xxxxx

Without Vintage enabled Sublime has the same behavior. But when Vintage is enabled your cursor position is 3,2,1,1 when scrolling through the same document. I.e. a a short line resets the saved column position to the length of that line.

Another user mentioned this in a forum post on a different topic (link below), I wanted to start a separate post to ensure this was tracked as an issue.

0 Likes

#2

To further clarify, this only happens in Vintage command mode. In Vintage insert mode column position is retained, as it is when Vintage is not enabled.

0 Likes

#3

I am guessing you never got an answer to this problem :slight_smile:

I am struggling with a plugin of my own where I move the cursor to a new column but the move by lines command in sublime doesn’t recognize that a new column has been set. I am not sure how to get that to work. In the past I have done it by performing a move by character forward and then backward …

0 Likes

#4

as mentioned in the thread below, you could try manually setting the xpos of the Region:

1 Like