fix fold indentation for tabs

This commit is contained in:
Ray Elliott 2020-07-31 13:41:57 +01:00
parent 8fa8075e6f
commit 877df2f084
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,14 @@ function! MyFoldText()
" don't display vim comment quotation marks
" TODO other comment markers
let l:line = substitute(l:line, "\^\"\\s\\?", '', '')
" TODO replace spaces with tabs if appropriate
" replace tabs with spaces if expandtab
if &expandtab == 0
let l:tabwidth = &tabstop
let l:tabspace = ' '[1:l:tabwidth]
let l:line = substitute(l:line, ' ', l:tabspace, 'g')
endif
" let l:postfix = l:linecount . ' ' . substitute(v:folddashes, '-', '•', 'g')
let l:postfix = l:linecount . ' ' . substitute(v:folddashes, '-', '↓', 'g')