Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make foldtext indicate sidebar/figure.

  • Loading branch information...
commit 7ca14914edb864cecdbaccd53b46c36dfc50a170 1 parent 03e1f49
@nelstrom authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 ftplugin/pml.vim
View
8 ftplugin/pml.vim
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.