When I'm in a markdown file creating a task list, I want it to insert a task list not a list item.
Output:
- [ ] **A task** - A task list <Enter>
- Inserted just a dash
Would like this:
- [ ] **A task** - A task list <Enter>
- [ ] Inserts a task list
I already setlocal fo+=n
and looked into formatlistpat
but I can't even
seem to insert numbers let alone do what I want to even if I add to the
default pattern ^\s*\d\+[\]:.)}\t ]\s*
.
I know I can probably just hack it with a function or autocomand, just wondering if
there's an option like indentexpr
or formatlistpat
that could help me with
this. What is the option that does this behavior to automatically insert stuff?
:help fo-table
suggests theo
option is responsible for automatic insertion, maybe? But that's for comments; I would have thoughn
with the right pattern would work, but perhaps it's too specific to numbers.