diff options
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -296,6 +296,15 @@ function Base_foldtext(...) let foldmarkers = split(&foldmarker, ',') let line = substitute(line, '\V\s\?' . foldmarkers[0] . '\s\?', ' ', '') + " remove comments that we know about + let comment = split(&commentstring, '%s') + if comment[0] != '' + let line = substitute(line, '\V' . comment[0], ' ', '') + endif + if comment[1] != '' + let line = substitute(line, '\V' . comment[1], ' ', '') + endif + " remove any remaining leading or trailing whitespace let line = substitute(line, '^\s*\(.\{-}\)\s*$', '\1', '') |