autoindent
オプションを有効にしてみてください:
:set autoindent
また:
:set ai
Vim マニュアルからの説明:
'autoindent' 'ai' boolean (default off)
local to buffer
Copy indent from current line when starting a new line (typing <CR>
in Insert mode or when using the "o" or "O" command).