From 455fc99aa7f6e1f7ae048076063d62078239828b Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Fri, 17 Aug 2018 18:34:50 -0500 Subject: [PATCH] pedantics in the neovim fold text --- neovim/.config/nvim/init.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index a313dc3..b40790c 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -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