From 2f6947d79b5db1c114cb696268569287ad39a5db Mon Sep 17 00:00:00 2001 From: Th3Whit3Wolf Date: Fri, 26 Jun 2020 19:29:14 +0100 Subject: [PATCH 1/3] Fixed inconsistent double quotes --- plugin/buffet.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/buffet.vim b/plugin/buffet.vim index 60f89e7..6bc391b 100644 --- a/plugin/buffet.vim +++ b/plugin/buffet.vim @@ -109,7 +109,7 @@ endfor function! s:GetHiAttr(name, attr) let vim_mode = "cterm" let attr_suffix = "" - if has("gui") || has('termguicolors') + if has("gui") || has("termguicolors") let vim_mode = "gui" let attr_suffix = "#" endif From 85cc03568045663f8229b1503e76768fb03d4530 Mon Sep 17 00:00:00 2001 From: Th3Whit3Wolf Date: Fri, 26 Jun 2020 19:30:48 +0100 Subject: [PATCH 2/3] Added Feature - Bubble Index --- autoload/buffet.vim | 7 ++++++- plugin/buffet.vim | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/buffet.vim b/autoload/buffet.vim index 7203b66..67de571 100644 --- a/autoload/buffet.vim +++ b/autoload/buffet.vim @@ -272,6 +272,7 @@ function! s:Render() let buffer_padding = 1 + (g:buffet_use_devicons ? 1+1 : 0) + 1 + sep_len let elements = s:GetAllElements(capacity, buffer_padding) + let index_number= ['➊','➋','➌','➍','➎','➏','➐','➑','➒','➓','⓫','⓬','⓭','⓮','⓯','⓰','⓱','⓲','⓳','⓴','㉑', '㉒', '㉓' ,'㉔', '㉕','㉖','㉗','㉘','㉙','㉚','㉛','㉜','㉝','㉞','㉟','㊱','㊲','㊳','㊴','㊵','㊶','㊷','㊸','㊹','㊺','㊻','㊼','㊽','㊾','㊿'] let render = "" for i in range(0, len(elements) - 2) @@ -289,7 +290,11 @@ function! s:Render() let render = render . highlight if g:buffet_show_index && s:IsBufferElement(elem) - let render = render . " " . elem.index + if g:buffet_bubble_index + let render = render . " " . index_number[elem.index-1] + else + let render = render . " " . elem.index + endif endif let icon = "" diff --git a/plugin/buffet.vim b/plugin/buffet.vim index 6bc391b..3e03b3b 100644 --- a/plugin/buffet.vim +++ b/plugin/buffet.vim @@ -29,6 +29,8 @@ endif let g:buffet_show_index = get(g:, "buffet_show_index", 0) +let g:buffet_bubble_index = get(g:, "buffet_bubble_index", 0) + let g:buffet_max_plug = get(g:, "buffet_max_plug", 10) if get(g:, "buffet_use_devicons", 1) From c90f781b7fe01ca261ed54bbf2ab42f8b1eac187 Mon Sep 17 00:00:00 2001 From: Th3Whit3Wolf Date: Fri, 26 Jun 2020 19:33:53 +0100 Subject: [PATCH 3/3] Added Documentation for Bubble Index --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b8b593f..7b15985 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,14 @@ Vimrc file, using `let = `: let g:buffet_show_index = 0 ``` +* `g:buffet_bubble_index` - If set to `1`, shows bubbled numbers index before each buffer name +* (➊ ➋ ➌ ➍ ➎ instead of 1 2 3 4 5). Requires `g:buffet_show_index` to be set to `1`. + + Default: + ```viml + let g:buffet_bubble_index = 0 + ``` + * `g:buffet_max_plug` - the maximum number of `BuffetSwitch` provided. Mapping will be disabled if the option is set to `0`.