Permalink
Browse files

Make foldtext indicate sidebar/figure.

  • Loading branch information...
nelstrom committed Jun 25, 2011
1 parent 03e1f49 commit 7ca14914edb864cecdbaccd53b46c36dfc50a170
Showing with 7 additions and 1 deletion.
  1. +7 −1 ftplugin/pml.vim
View
@@ -70,7 +70,13 @@ function! PmlFoldText()
endif
" Build the string that will be displayed as foldtext
- let metadata = printf("%4s lines (%s) ", foldedlinecount, v:foldlevel)
+ if match(getline(v:foldstart), "<sidebar") >= 0
+ let metadata = printf("%4s lines (%s) ", foldedlinecount, 'sidebar')
+ elseif match(getline(v:foldstart), "<figure") >= 0
+ let metadata = printf("%4s lines (%s) ", foldedlinecount, 'figure')
+ else
+ let metadata = printf("%4s lines (%s) ", foldedlinecount, v:foldlevel)
+ endif
return "+" . v:folddashes . v:folddashes . metadata . title
endfunction

0 comments on commit 7ca1491

Please sign in to comment.