When I open a new line (via ‘o’) my cursor jumps to a correctly indented position on the next line. On the other hand, entering insert mode while my cursor is on a blank line doesn’t move my cursor to the correctly indented location.
How do I make vim correctly indent my cursor when entering insert mode (via i) on a blank line?
ccwill replace the contents of the current line and enter insert mode at the correct indentation – so on a blank line will do exactly what you’re after.I believe that the behaviour of
iyou describe is correct because there are many use cases where you want to insert at that specific location on a blank line, rather than jumping to wherever vim guesses you want to insert.