{"id":13898713,"url":"https://github.com/bagrat/vim-buffet","last_synced_at":"2025-04-05T18:10:17.793Z","repository":{"id":41186062,"uuid":"91055437","full_name":"bagrat/vim-buffet","owner":"bagrat","description":"IDE-like Vim tabline","archived":false,"fork":false,"pushed_at":"2023-04-08T16:40:13.000Z","size":1989,"stargazers_count":405,"open_issues_count":16,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-19T11:28:26.064Z","etag":null,"topics":["buffer","devicons","ide","patched-fonts","tabline","vim","vim-buffer","vim-buffet","vim-plugin","viml","visualisation","visualization"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bagrat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-12T05:41:48.000Z","updated_at":"2024-10-09T17:13:07.000Z","dependencies_parsed_at":"2024-06-23T04:58:15.038Z","dependency_job_id":"d6c9ad76-97d3-4815-807c-ba51e545fd18","html_url":"https://github.com/bagrat/vim-buffet","commit_stats":null,"previous_names":["bagrat/vim-workspace"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagrat%2Fvim-buffet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagrat%2Fvim-buffet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagrat%2Fvim-buffet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bagrat%2Fvim-buffet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bagrat","download_url":"https://codeload.github.com/bagrat/vim-buffet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378149,"owners_count":20929297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buffer","devicons","ide","patched-fonts","tabline","vim","vim-buffer","vim-buffet","vim-plugin","viml","visualisation","visualization"],"created_at":"2024-08-06T18:04:25.104Z","updated_at":"2025-04-05T18:10:17.766Z","avatar_url":"https://github.com/bagrat.png","language":"Vim script","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://image.flaticon.com/icons/svg/531/531193.svg\" alt=\"Markdownify\" width=\"250\"\u003e\n  \u003cbr\u003e\n    𝓿𝓲𝓶 -𝓫𝓾𝓯𝓯𝓮𝓽\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eBrings you the IDE-like tabs into Vim, for easy navigation, and a nice, customizable look\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gitter.im/vim-buffet/vim-buffet?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/%F0%9F%92%AC-gitter-%23e74f4e\"\u003e\n  \u003c/a\u003e\n  \u003c!--\n  \u003ca href=\"https://saythanks.io/to/amitmerchant1990\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg\"\u003e\n  \u003c/a\u003e\n  --\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#recommendations\"\u003eRecommendations\u003c/a\u003e •\n  \u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e •\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n**Note:** This plugin has been renamed from `vim-workspace` and thus has also\ndifferent prefix for the configuration and commands. Please revisit the README\nand use the new names of the configuration parameters, highlight groups and\ncommands. Sorry for inconvenience.\n\n\n\n## Introduction\n\u003ch3 align=\"center\"\u003e\n    \u003cimg\n        src=\"https://raw.githubusercontent.com/bagrat/vim-buffet/e915a9f0627228c317a7498c800208813c0298c3/demo.png\"\n        alt=\"vim-buffet Screenshot\"\n    /\u003e\n\u003c/h3\u003e\n\nVim-buffet takes your buffers and tabs, and shows them combined in the\ntabline. With this you always have your list of buffers visible, at the same\ntime not losing visibility into tabs. Moreover, `vim-buffet` provides handy\ncommands to boost navigation as well as a list of options to customize how the\ntabline appears.\n\nIf you are new to the Vim world, then welcome, and start by learning Vim's\nnotions of [buffers, windows](http://vimdoc.sourceforge.net/htmldoc/windows.html)\nand [tabpages](http://vimdoc.sourceforge.net/htmldoc/tabpage.html).\n\nBut if you are an experienced Vim user, you might have got tired of `bn/bp/ls/Ctrl-^`.\n\nTake a look at the screenshot. The blue cuties are the tabpages. The tabpage\nthat has the buffers list coming next, is the current tabpage. The gray items\nwith names are the hidden/inactive buffers, and obviously, the green one is the\ncurrent buffer. The brighter items on both ends with the little arrows and numbers\nare the truncation indicators. If all the buffers do not fit the screen,\n`vim-buffet` truncates the tabline, and shows the number of truncated buffers on\nboth ends.\n\n*__Note__: The instance of Vim in the screenshot is configured to use powerline\nsymbols and dev-icons. The default interface is only text and will work without\nrequiring any patched fonts. The default interface looks like in the screenshot\nbelow.*\n\n\u003ch3 align=\"center\"\u003e\n    \u003cimg\n        src=\"https://raw.githubusercontent.com/bagrat/vim-buffet/e915a9f0627228c317a7498c800208813c0298c3/demo2.png\"\n        alt=\"vim-buffet Screenshot\"\n    /\u003e\n\u003c/h3\u003e\n\n\n\n## Installation\n\nUse your favourite plugin manager to install `vim-buffet`. If you do not have any\npreference or have not decided yet, I would recommend [Plug](https://github.com/junegunn/vim-plug).\n\n```vim\nPlug 'bagrat/vim-buffet'\n```\n\nAfter installation, `vim-buffet` is enabled by default, so whenever you restart\nVim, you will see the new tabline!\n\n\n\n## Usage\n### Commands\n\nApart from listing the buffers in the tabline, `vim-buffet` also provides some\nhandy commands to manipulate the buffers:\n\n* `Bw[!]` -  wipe the current buffer without closing the window. If it has unsaved\n  changes, an error will be shown, and the buffer will stay open. To ignore any\n  changes and forcibly wipe the buffer, use `Bw!`.\n* `Bonly[!]` - wipe all the buffers but the current one. If there are any buffers\n  in the list that has unsaved changes, those will not be wiped. To ignore any\n  changes and forcibly wipe all buffers except the current one, use `Bonly!`.\n\n### Mappings\n\nMappings for switching buffers are also provided. You just need to add the following\nmappings to your Vimrc file:\n\n```vim\nnmap \u003cleader\u003e1 \u003cPlug\u003eBuffetSwitch(1)\nnmap \u003cleader\u003e2 \u003cPlug\u003eBuffetSwitch(2)\nnmap \u003cleader\u003e3 \u003cPlug\u003eBuffetSwitch(3)\nnmap \u003cleader\u003e4 \u003cPlug\u003eBuffetSwitch(4)\nnmap \u003cleader\u003e5 \u003cPlug\u003eBuffetSwitch(5)\nnmap \u003cleader\u003e6 \u003cPlug\u003eBuffetSwitch(6)\nnmap \u003cleader\u003e7 \u003cPlug\u003eBuffetSwitch(7)\nnmap \u003cleader\u003e8 \u003cPlug\u003eBuffetSwitch(8)\nnmap \u003cleader\u003e9 \u003cPlug\u003eBuffetSwitch(9)\nnmap \u003cleader\u003e0 \u003cPlug\u003eBuffetSwitch(10)\n```\n\nThis will allow you to switch between buffers 1 - 10. You can get more `\u003cPlug\u003e`\nmappings, or disable it completely, by configuring the `g:buffet_max_plug` option.\n\n### Configuration\n\nThere are some configuration options that make it possible to customize how the\ntabline works and looks like.\n\n#### 🔩 Options\n\n| Options | Default | Descriptions |\n| --- | --- | --- |\n| `g:buffet_always_show_tabline` | `1` | Set to `0`, the tabline will only be shown if there is more than one buffer or tab open |\n| `g:buffet_powerline_separators` | `0` | Set to `1`, use powerline separators in between buffers and tabs in the tabline (see the first screenshot) |\n| `g:buffet_separator` | `''` | The character to be used for separating items in the tabline |\n| `g:buffet_show_index` | `0` | Set to `1`, show index before each buffer name. Index is useful for switching between buffers quickly |\n| `g:buffet_max_plug` | `10` | The maximum number of `\u003cPlug\u003eBuffetSwitch` provided. Mapping will be disabled if the option is set to `0` |\n| `g:buffet_use_devicons` | `1` | If set to `1` and [`vim-devicons`](https://github.com/ryanoasis/vim-devicons) plugin is installed, show file type icons for each buffer in the tabline. If the `vim-devicons` plugin is not present, the option will automatically default to `0` (*Note: you need to have `vim-devicons` loaded before `vim-buffet` in order to make this work*) |\n| `g:buffet_tab_icon` | `'#'` | The character to be used as an icon for the tab items in the tabline |\n| `g:buffet_new_buffer_name` | `'*'` | The character to be shown as the name of a new buffer |\n| `g:buffet_modified_icon` | `'+'` | The character to be shown by the name of a modified buffer |\n| `g:buffet_left_trun_icon` | `'\u003c'` | The character to be shown by the count of truncated buffers on the left |\n| `g:buffet_right_trun_icon` | `'\u003e'` | The character to be shown by the count of truncated buffers on the right |\n| `g:buffet_hidden_buffers` | `['terminal', 'quickfix']` | The types of buffers to hide from the tabline (*Note: This has the side effect of making all matching buffers unlisted)* |\n\n#### 🎨 Colors\nOf course, you can customize the colors of your tabline, to make it awesome and\nyours. To get your custom colors set, define a function with name\n`g:BuffetSetCustomColors` and place your highlight group definitions inside\nthe function.\n\n```vim\n\" Note: Make sure the function is defined before `vim-buffet` is loaded.\nfunction! g:BuffetSetCustomColors()\n  hi! BuffetCurrentBuffer cterm=NONE ctermbg=5 ctermfg=8 guibg=#00FF00 guifg=#000000\nendfunction\n```\n\nThe following is the list of highlight groups, with self-explanatory\nnames:\n\n| Highlights | Descriptions |\n| --- | --- |\n| `BuffetCurrentBuffer`    |  The current buffer.\n| `BuffetActiveBuffer`     |  An active buffer (a non-current buffer visible in a non-current window) |\n| `BuffetBuffer`           |  A non-current and non-active buffer.\n| `BuffetModCurrentBuffer` |  The current buffer when modified.\n| `BuffetModActiveBuffer`  |  A modified active buffer (a non-current buffer visible in a non-current window). |\n| `BuffetModBuffer`        |  A modified non-current and non-active buffer.\n| `BuffetTrunc`            |  The truncation indicator (count of truncated buffers  from the left or right) |\n| `BuffetTab`              |  A tab |\n\n\n\n## Recommendations\n\nHere are some recommended mappings to boost your navigation experience:\n\n```vim\nnoremap \u003cTab\u003e :bn\u003cCR\u003e\nnoremap \u003cS-Tab\u003e :bp\u003cCR\u003e\nnoremap \u003cLeader\u003e\u003cTab\u003e :Bw\u003cCR\u003e\nnoremap \u003cLeader\u003e\u003cS-Tab\u003e :Bw!\u003cCR\u003e\nnoremap \u003cC-t\u003e :tabnew split\u003cCR\u003e\n```\n\n\n\n## FAQ\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eHow do I get the look like in the screenshot?\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\nFirst you will need a patched font, extended with `powerline` and `font-awesome`\nsymbols. Also, you will need the\n[`vim-devicons`](https://github.com/ryanoasis/vim-devicons) installed, which\nalso has great guides on how to patch fonts, as well as some pre-patched fonts.\nAs soon as you have the patched font, setting the following options, will give\nyou exactly the same tabline as you see in the first demo screenshot:\n\n```vim\nlet g:buffet_powerline_separators = 1\nlet g:buffet_tab_icon = \"\\uf00a\"\nlet g:buffet_left_trunc_icon = \"\\uf0a8\"\nlet g:buffet_right_trunc_icon = \"\\uf0a9\"\n```\n\n*Note: you need to have `vim-devicons` loaded before `vim-buffet` in order to\nmake this work.*\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eHow to have the current buffer open in a new tab instead of a new one?\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\nJust add this mapping to your Vimrc:\n\n```vim\nmap \u003cC-t\u003e :tab split\u003cCR\u003e\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eI can only see the current active buffer in the tabline\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\nThe reason is that you probably use some statusline plugin (e.g. lightline,\nairline) that also has tabline support, which overrides vim-buffet. All you need\nto do is disable the tabline of the statusline plugin. \n\n#### For [lightline.vim](https://github.com/itchyny/lightline.vim)\nIt should be something like this:\n\n```vim\nlet g:lightline.enable.tabline = 0\n```\n\nIf that's not working, checkout this [issue](https://github.com/bagrat/vim-buffet/issues/20) especially this [comment](https://github.com/bagrat/vim-buffet/issues/20#issuecomment-706075930).\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n\n## Credits\n\u003cdiv\u003eThe icon in the header is made by \u003ca href=\"https://www.flaticon.com/authors/freepik\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e\u003c/div\u003e\n\n\n\n## License\n\nSee [LICENSE](https://github.com/bagrat/vim-buffet/blob/master/LICENS://github.com/bagrat/vim-buffet/blob/master/LICENSE).\n","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagrat%2Fvim-buffet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbagrat%2Fvim-buffet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagrat%2Fvim-buffet/lists"}