A new line in VIM/MacVIM

How to make a line break in Vim was aligned as a string with where I stand. Perhaps explain incorrectly, I'll try to explain with an example

function test() {<br> func1(); func2();<br> }<br>

There is such code, I want func2(); on a separate line, I press enter after func1(); and func2(); is transferred to the next line but vnachalo empty string and I want it to be aligned under func1();.

Just starting to use Vim so the question is probably very simple but this little thing is very unnerving.

Thank you!
October 8th 19 at 02:53
1 answer
October 8th 19 at 02:55
Solution
Carefully read habrahabr.ru/blogs/vim/64224/
Discover new things for themselves.
autoindent - simeon_Fay commented on October 8th 19 at 02:58
well or direct in the editor:
:set autoindent - simeon_Fay commented on October 8th 19 at 03:01

Find more questions by tags Vim