Let's say we have the following YAML file:
lorem:
- ipsum: dolor
sit:
- amet
- blandit
Now, let's open it with the command
vi -u NONE --clean
...then place the cursor on the 4th line and press o:
...which is a bit disappointing since I have to go two spaces back to insert a new item.
Now let's open it with the command
vi -u NONE +'filetype plugin indent on' +'set autoindent' +'set smartindent'
...and then repeat the same operation, first :4, then o:
And that's something very different now, right? :)
The question is, why?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The question is, why?
Because :filetype on only applies to files that were read afterwards.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Ah! You are right, @matveyt, thanks.
So, it just my testing was faulty, and this [additional] indenting when entering list items is OK and suits everybody, I guess?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
That's a feature. If you type "minus" the line will be dedented automatically. See :help indentkeys-format.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #11944 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Damn! Used auto de-indentation so many times and somehow never thought it will also work here.
Thanks :)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()