diff options
author | ZeLibertineGamer <zlg@zelibertinegamer.me> | 2016-06-16 10:21:59 -0700 |
---|---|---|
committer | ZeLibertineGamer <zlg@zelibertinegamer.me> | 2016-06-16 10:21:59 -0700 |
commit | 20cb01f2bace954883264002ae31849c9176ee55 (patch) | |
tree | 3a8dd54b66638940f1c1accb65780a579fb2fce0 | |
parent | Ensure trailing spaces are always highlighted (diff) | |
download | vimrc-20cb01f2bace954883264002ae31849c9176ee55.tar.gz vimrc-20cb01f2bace954883264002ae31849c9176ee55.tar.bz2 vimrc-20cb01f2bace954883264002ae31849c9176ee55.tar.xz vimrc-20cb01f2bace954883264002ae31849c9176ee55.zip |
Correct foldtext function
No clue why it didn't take indent into account before...
-rw-r--r-- | vimrc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -69,11 +69,13 @@ set foldmethod=expr set foldtext=MyFoldText() function! MyFoldText() - let line = getline(v:foldstart) + let indent = repeat(' ', indent(v:foldstart)) + let line = substitute(getline(v:foldstart), '\v^\s+', '', '') let folded_lines = v:foldend - v:foldstart - return line . ' (' . folded_lines . 'L)' + return indent . line . ' (' . folded_lines . 'L)' endfunction + " Autocommands {{{1 if has("autocmd") filetype plugin indent on |