codekingpro/portable-devtools
114k
1" Vim filetype plugin file2" Language: Org3" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>4" Maintainer: This runtime file is looking for a new maintainer.5" Last Change: 2025 Aug 056 7 8if exists("b:did_ftplugin")9 finish10endif11let b:did_ftplugin = 112 13if exists('b:undo_ftplugin')14 let b:undo_ftplugin .= "|setl cms< com< fo< flp<"15else16 let b:undo_ftplugin = "setl cms< com< fo< flp<"17endif18 19setl commentstring=#\ %s20setl comments=fb:*,fb:-,fb:+,b:#,b:\:21 22setl formatoptions+=nql23setl formatlistpat=^\\s*\\(\\(\\d\\|\\a\\)\\+[.)]\\|[+-]\\)\\s\\+24 25function OrgFoldExpr()26 let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')27 if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^orgHeadline'28 return ">" . l:depth29 endif30 return "="31endfunction32 33if has("folding") && get(g:, 'org_folding', 0)34 setl foldexpr=OrgFoldExpr()35 setl foldmethod=expr36 let b:undo_ftplugin .= "|setl foldexpr< foldmethod<"37endif38 39" vim: ts=8 sts=2 sw=2 et40 