Syntax highlight and correctly format/manipulate lists

Adds support for syntax highlighting and formatting both ordered and
unordered lists (excluding unordered lists delimited with `*`, as they
conflict with headings and are generally not recommended).

e.g.

    1. Foo
    2. Bar
       1) Biz
       2) Baz

    - Foo
      - Bar
    + Biz
      + Baz
This commit is contained in:
Alex Vear
2020-02-15 02:12:12 +00:00
parent b24dfe0762
commit d671e862e4
3 changed files with 11 additions and 1 deletions

View File

@@ -11,6 +11,9 @@
" Web: <https://orgmode.org/manual/index.html>
setlocal commentstring=#%s
setlocal comments=fb:*,fb:-,fb:+,b:#,b:\:
setlocal formatoptions+=ncqlt
let &l:formatlistpat = '^\s*\(\d\+[.)]\|[+-]\)\s\+'
setlocal foldexpr=org#fold_expr()
setlocal foldmethod=expr