diff --git a/init.fold-text.vim b/init.fold-text.vim index a80b900..a8994b1 100644 --- a/init.fold-text.vim +++ b/init.fold-text.vim @@ -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')