This commit is contained in:
Gabe Venberg 2018-08-26 14:07:12 -05:00
commit a7ed70cb4d

View file

@ -24,7 +24,7 @@ filetype plugin on
set number
"makes the ruler show how many lines away a given line is from your cursor
"set relativenumber
set relativenumber
"displays the coordinates of your cursour in the statusbar
set ruler
@ -87,7 +87,7 @@ filetype plugin on
"folding stuff TODO: implement other folding methods.
"give a bit of margin space for fold number
set foldcolumn=3
set foldcolumn=4
set foldenable
@ -105,14 +105,14 @@ filetype plugin on
"make sure that comment are counted in indent folding!
set foldignore=
set fillchars="fold:-"
"set the fold text for this method, in most cases, the line just above our fold is what we want, so we wont put any text into it. just level and linecount. TODO
"set the fold text for this method, in most cases, the line just above our fold is what we want, so we wont put any text into it. just level and linecount.
function! Minimal_foldtext()
let lines_count = v:foldend - v:foldstart
let lines_count_text = '+' . v:folddashes . '| ' . printf("%10S" , lines_count) . ' lines |'
let line_level_text = '| ' . printf("%5S" , 'level ' . v:foldlevel) . ' |'
let line_level_text = '| ' . printf("%8S" , 'level ' . v:foldlevel) . ' |'
let fold_text_end = line_level_text . repeat('-',8)
let fold_text_length = strlen(lines_count_text . fold_text_end) + &foldcolumn
return lines_count_text . repeat('-' , winwidth(0) - fold_text_length) . fold_text_end
return lines_count_text . repeat('-' , winwidth(0) - fold_text_length - 4) . fold_text_end
endfunction
set foldtext=Minimal_foldtext()
endif