" Vim filetype plugin file (GUI menu, folding and completion) if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) if !exists("g:debchangelog_fold_disable") setlocal foldmethod=expr endif setlocal foldexpr=DosiniFold(v:lnum) setlocal comments=:# " Clean unloading let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<" " }}}1 if exists("g:did_dosini_ftplugin") finish endif " Don't load another plugin (this is global) let g:did_dosini_ftplugin = 1 " {{{1 folding function! DosiniFold(lnum) let line = getline(a:lnum) let prevl = getline(a:lnum - 1) if line =~ '^ *\[' return '>1' endif if line == '' && prevl == '' return '>0' endif return '=' endfunction " }}} silent! normal zo " vim: set foldmethod=marker: