When using plain text I write bullet lists like this (second and further lines indented with two spaces):
* blah blah blah
blah blah
* yadda yadda yadda
Problem is, when I start out a new bullet item:
* blah blah blah
and then press Enter
, the second line isn't automatically indented like I want it to be:
* blah blah blah
blah
Since I have autoindent
set, once I correct the indentation of the second line the third and subsequent lines indent correctly. Also, if I use gq
to format the bullet list item it will format it the way I want. But I want vim to automatically handle it.
Also, I want the indentation mechanism to indent two spaces further if I hit Enter
when the first non-whitespace character on the line is a *
, to deal with nested bullet items. For instance, if I have:
* blah blah
* yadda yadda
When I hit Enter
at the end of the "yadda"s I want the indentation to be at 4 spaces instead of 2, so when I type more "yadda"s it comes out like this:
* blah blah
* yadda yadda
yadda yadda
formatexpr
is unset and formatoptions
is tcq