How to go back to the "smart-indent" in vim from the start of a line

Viewed 226

When I press o or O it indents to the necessary level since I have smartindent on. However, what happens when I'm at the start of a line and want to go to where the 'smartindent' for that line would be. Is there a way to do that? Here is an example video of what I'm trying to do:

https://gyazo.com/da4351def5a0af93df5f7fff0d462adb

I suppose dd ShiftO is the best way I have thought up so far.

2 Answers

the most simple thing you can do is press S, it works just like pressing cc

In insert mode, CTRL-F is the default key for re-indenting the current line. See :h i_ctrl-f for more information.

Related