Ryan Rueger

ryan@rueg.re / picture / key / home
aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorrrueger <rrueger@ethz.ch>2024-08-09 10:11:05 +0200
committerrrueger <rrueger@ethz.ch>2024-08-09 10:11:05 +0200
commitda666602adb5be5ca803165645c30a79399f462d (patch)
treea9e52aefec476f7425e69f2d5d7481c1faa9a7a2 /plugin
parentcac4489fb51348ae828564389ddbf621693997e9 (diff)
downloadstatusryne-da666602adb5be5ca803165645c30a79399f462d.tar.gz
statusryne-da666602adb5be5ca803165645c30a79399f462d.tar.bz2
statusryne-da666602adb5be5ca803165645c30a79399f462d.zip
Add g:statusryne_adaptive_padding option
When set to 1, statusryne will pad the names of items in the tabline so that they are all the same width. Else, only some constant padding is added.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/statusryne.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/statusryne.vim b/plugin/statusryne.vim
index 4b48024..c0ea3d8 100644
--- a/plugin/statusryne.vim
+++ b/plugin/statusryne.vim
@@ -377,7 +377,12 @@ function! TabLine()
" Number of buffers in tab.
let t:bcount = len(tabpagebuflist(t+1))
" Total amount of whitespace to fill, after considering curent tab label.
- let t:remainder = g:maxlabellen - len(g:tablabels[t])
+ if exists("g:statusryne_adaptive_padding") && g:statusryne_adaptive_padding == "1"
+ " Total amount of whitespace to fill, after considering curent tab label.
+ let t:remainder = g:maxlabellen - len(g:tablabels[t])
+ else
+ let t:remainder = 0
+ endif
let t:pad = t:remainder /2 + g:padding
" Iter over buffers in tab.