diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-20 22:24:03 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-20 22:24:03 -0500 |
commit | bc2932b70cdcb1b89c9c1c1dec3a97ac37e77e6d (patch) | |
tree | e0cabde9f3d20a2f283ff991a666f4d1c09b5391 /vimrc | |
parent | 7c77077867266e23fc0d83dc65cf4b3e1ff0884c (diff) | |
download | conf-bc2932b70cdcb1b89c9c1c1dec3a97ac37e77e6d.tar.gz conf-bc2932b70cdcb1b89c9c1c1dec3a97ac37e77e6d.zip |
use the commentstring option to filter out most comment strings from our display
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -330,6 +330,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', '') |