robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

master
1.0 KiB40 linesraw
1" Vim filetype plugin file
2" Language:	Org
3" Previous Maintainer:  Luca Saccarola <github.e41mv@aleeas.com>
4" Maintainer:	This runtime file is looking for a new maintainer.
5" Last Change:	2025 Aug 05
6" 2026 Sep 07 by Vim project: fix escape in formatlistpat
7
8
9if exists("b:did_ftplugin")
10    finish
11endif
12let b:did_ftplugin = 1
13
14if exists('b:undo_ftplugin')
15    let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
16else
17    let b:undo_ftplugin = "setl cms< com< fo< flp<"
18endif
19
20setl commentstring=#\ %s
21setl comments=fb:*,fb:-,fb:+,b:#,b:\:
22
23setl formatoptions+=nql
24setl formatlistpat=^\\s*\\(\\(\\d\\\|\\a\\)\\+[.)]\\\|[+-]\\)\\s\\+
25
26function OrgFoldExpr()
27    let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
28    if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^orgHeadline'
29        return ">" . l:depth
30    endif
31    return "="
32endfunction
33
34if has("folding") && get(g:, 'org_folding', 0)
35    setl foldexpr=OrgFoldExpr()
36    setl foldmethod=expr
37    let b:undo_ftplugin .= "|setl foldexpr< foldmethod<"
38endif
39
40" vim: ts=8 sts=2 sw=2 et