robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
aa1d8a2702
master
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" ) 10finish 11endif 12let b: did_ftplugin = 1 13 14if exists ( 'b:undo_ftplugin' ) 15let b: undo_ftplugin .= "|setl cms< com< fo< flp<" 16else 17let 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 () 27let l: depth = match ( getline ( v: lnum ), '\(^\*\+\)\@<=\( .*$\)\@=' ) 28if l: depth > 0 && synIDattr ( synID ( v: lnum , 1 , 1 ), 'name' ) =~# '\m^orgHeadline' 29return ">" . l: depth 30endif 31return "=" 32endfunction 33 34if has ( "folding" ) && get ( g:, 'org_folding' , 0 ) 35setl foldexpr = OrgFoldExpr () 36setl foldmethod = expr 37let b: undo_ftplugin .= "|setl foldexpr< foldmethod<" 38endif 39 40" vim: ts=8 sts=2 sw=2 et