Question

What is the name of the option which keeps the indentation when moving to a new row.

Example

Subject
    This is indented and now i press enter
    I would like indentation to happen automatically

Subject
    This is indented and now i press enter
I currently start here here and indent manually
Was it helpful?

Solution

From the manual (:help indent.txt):

autoindent uses the indent from the previous line

...so:

:set autoindent

If this does not work for you try starting Vim without plugins and skipping .vimrc initializations:

vim -u NONE -N
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top