From 82dd79d74f67711f96946ef51165e9525b0c5fe6 Mon Sep 17 00:00:00 2001 From: Am Laher Date: Sun, 8 Mar 2020 20:10:04 +1300 Subject: [PATCH] make separator char configurable --- plugin/buftabline.vim | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugin/buftabline.vim b/plugin/buftabline.vim index 091a5f7..8d30a83 100644 --- a/plugin/buftabline.vim +++ b/plugin/buftabline.vim @@ -34,11 +34,12 @@ hi default link BufTabLineActive PmenuSel hi default link BufTabLineHidden TabLine hi default link BufTabLineFill TabLineFill -let g:buftabline_numbers = get(g:, 'buftabline_numbers', 0) -let g:buftabline_indicators = get(g:, 'buftabline_indicators', 0) -let g:buftabline_separators = get(g:, 'buftabline_separators', 0) -let g:buftabline_show = get(g:, 'buftabline_show', 2) -let g:buftabline_plug_max = get(g:, 'buftabline_plug_max', 10) +let g:buftabline_numbers = get(g:, 'buftabline_numbers', 0) +let g:buftabline_indicators = get(g:, 'buftabline_indicators', 0) +let g:buftabline_separators = get(g:, 'buftabline_separators', 0) +let g:buftabline_separator_char = get(g:, 'buftabline_separator_char', nr2char(0x23B8)) +let g:buftabline_show = get(g:, 'buftabline_show', 2) +let g:buftabline_plug_max = get(g:, 'buftabline_plug_max', 10) function! buftabline#user_buffers() " help buffers are always unlisted, but quickfix buffers are not return filter(range(1,bufnr('$')),'buflisted(v:val) && "quickfix" !=? getbufvar(v:val, "&buftype")') @@ -50,7 +51,7 @@ function! buftabline#render() let show_num = g:buftabline_numbers == 1 let show_ord = g:buftabline_numbers == 2 let show_mod = g:buftabline_indicators - let lpad = g:buftabline_separators ? nr2char(0x23B8) : ' ' + let lpad = g:buftabline_separators ? g:buftabline_separator_char : ' ' let bufnums = buftabline#user_buffers() let centerbuf = s:centerbuf " prevent tabline jumping around when non-user buffer current (e.g. help)