summaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/vimrc b/vimrc
index 059fee7..65dc4c1 100644
--- a/vimrc
+++ b/vimrc
@@ -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