How can one move vertically, staying in the same column (implicitly adding spaces), regardless of line lengths? (If the next line is shorter than the current, j will move the cursor to the last character of the next line.) This would be useful when adding comments.
1 Answer
You can consider set ve=insert
if you just want to do virtual edit in insert mode.
set ve=all
if you want to do virtual editing in all modes. This may break some macro or plugin (if the plugin doesn't check the ve
option).
:h 've'
to know more about virtualedit
option.
You can add a mapping, easily setting the ve
option to all
and back for your requirements, just like toggling line numbers.
set virtualedit=all
(but read about it first::h virtualedit
)