Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create an array of elements to be folded.

  • Loading branch information...
commit 31d7ff96499dc71ec21cb678adfe0d8a3c406789 1 parent 1bf43c4
Drew Neil authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  ftplugin/pml.vim
3  ftplugin/pml.vim
@@ -22,6 +22,7 @@ if exists('loaded_taglist') && loaded_taglist != 'no'
22 22 endif
23 23
24 24 " PML specific folding {{{1
  25 +let s:elements = ['sidebar', 'figure']
25 26 function! PmlFolds()
26 27 if match(getline(v:lnum), "<sect1") >= 0
27 28 return ">1"
@@ -71,7 +72,7 @@ function! PmlFoldText()
71 72
72 73 " Use foldlevel as entity text for sections, or element name otherwise
73 74 let entity = v:foldlevel
74   - let pattern = '<\zs\(sidebar\|figure\)\>'
  75 + let pattern = '<\zs\(' . join(s:elements, '\|') . '\)\>'
75 76 if match(getline(v:foldstart), pattern) >= 0
76 77 let entity = matchstr(getline(v:foldstart), pattern)
77 78 endif

0 comments on commit 31d7ff9

Please sign in to comment.
Something went wrong with that request. Please try again.