Reputation: 759
General text editors can jump to a specific column number of a file by either using movement keybindings or mouse click.
This can only happen if there is already character or whitespace on that column, otherwise the cursor will be lock to the last column which contains that character or whitespace.
For example, in the following line:
1 2 3 4 5
012345678901234567890123456789012345678901234567890
The quick brown fox jumps over the lazy dog
I want to jump to column 35, just before the word lazy, I can click on the mouse to that column or use 8 words movement to get to that position.
If I want to jump to column 50 I can only get to column 43 because that is the newline character and there are no more characters after that.
Now I remember I used a text editor that I could click on the column 50 and automatically will insert the whitespaces and move the newline character to that column, but could not remember which text editor was.
So, I am wandering which text editor is able to do that, or a script for vim that can actually achieve the same effect.
Thank you
Upvotes: 0
Views: 110
Reputation: 3351
:set virtualedit=all
Afterwards 50|
will jump to the 50th column, even when the actual line is shorter than that.
More information: :help 'virtualedit'
Upvotes: 6