diff options
author | rrueger <rrueger@ethz.ch> | 2024-08-09 10:11:05 +0200 |
---|---|---|
committer | rrueger <rrueger@ethz.ch> | 2024-08-09 10:11:05 +0200 |
commit | da666602adb5be5ca803165645c30a79399f462d (patch) | |
tree | a9e52aefec476f7425e69f2d5d7481c1faa9a7a2 /plugin/statusryne.vim | |
parent | cac4489fb51348ae828564389ddbf621693997e9 (diff) | |
download | statusryne-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/statusryne.vim')
-rw-r--r-- | plugin/statusryne.vim | 7 |
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. |