{"id":18791030,"url":"https://github.com/samuelsimoes/vim-drawer","last_synced_at":"2025-10-09T17:04:00.943Z","repository":{"id":149061754,"uuid":"60934048","full_name":"samuelsimoes/vim-drawer","owner":"samuelsimoes","description":"VimDrawer is a Vim plugin to group related buffers in tabs automatically by the file name.","archived":false,"fork":false,"pushed_at":"2018-01-17T20:59:57.000Z","size":317,"stargazers_count":26,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T14:38:08.379Z","etag":null,"topics":["productivity","vim","vim-plugins","workflow"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelsimoes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2016-06-12T00:41:58.000Z","updated_at":"2024-05-17T21:43:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"b16ab476-a4ca-4472-b662-ac2e71a50de9","html_url":"https://github.com/samuelsimoes/vim-drawer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samuelsimoes/vim-drawer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsimoes%2Fvim-drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsimoes%2Fvim-drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsimoes%2Fvim-drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsimoes%2Fvim-drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelsimoes","download_url":"https://codeload.github.com/samuelsimoes/vim-drawer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelsimoes%2Fvim-drawer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001890,"owners_count":26083197,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["productivity","vim","vim-plugins","workflow"],"created_at":"2024-11-07T21:14:30.739Z","updated_at":"2025-10-09T17:04:00.935Z","avatar_url":"https://github.com/samuelsimoes.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VimDrawer\n\n:point_right: When you work with some big tasks you may need edit too many files at once and most of the time you may get lost in so many files.\n\nVimDrawer is a Vim plugin to help you to work with many open files on Vim in a sane way.\n\n## Usage\n\nFirst, you must be familiar with [Vim buffers](http://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs-tabs/), if you are, the basic idea is to create **scoped buffer lists per tab** AND do a **file auto classification** to send your file to the correct tab based on the file name. For now on I will call this tabs as \"drawer\".\n\nTo use you must define the schema of your drawers using an array on the global variable `g:vim_drawer_spaces` on your vimfiles. The array's first position is the _drawer name_ and the second is the **RegExp to match the file name if it should or not go to the drawer**. Example:\n\n```viml\n\" ~/.vimrc\nlet g:vim_drawer_spaces = [\n  \\[\"model\", \"model\"],\n  \\[\"controller\", \"controller\"],\n  \\[\"view\", \"\\.html\\.erb$\"],\n  \\[\"asset\", \"\\.[js|css]$\"]\n\\]\n```\n\nIn the example above every file that has `model` in the name goes to the tab named as **model**, your _models drawer_.\n\n![](fx/demo.gif)\n\nAny other file that hasn't the declared drawer destination goes to the current drawer.\n\n:bulb: You can define drawers schema per project by adding in your project's root the `.vim-drawer.vim` file, on this file you must set the `g:vim_drawer_spaces` array.\n\nTo check what files are in the drawer you will need to invoke the command  `:VimDrawer`. This command will open a horizontal split with a list of the current buffers in the drawer. To open the buffer just press `enter`. To close a buffer right on the selector just press `c`. To just preview a buffer without leave the drawer press `space`.\n\n:bulb: You can map this command to a shortcut like:\n\n```viml\nnnoremap \u003cC-Space\u003e :VimDrawer\u003cCR\u003e\n```\nNow you can invoke the drawer's buffers selector pressing `Ctrl + Space`.\n\n## Installation\n\nYou can install this plugin with Pathogen, Vundle and other plugin loaders.\n\n## Is it a [vim-ctrl-space](https://github.com/vim-ctrlspace) copycat?\n\nThis plugin is a simplified version of the awesome vim-ctrl-space plugin with the auto file classification feature (that I even had [shown to vim-ctrlspace folks](https://github.com/vim-ctrlspace/vim-ctrlspace/issues/177)). I decide to create a separate version mainly to implement the auto classification feature and because vim-ctrl-space IMHO could be much more simple at some aspects that I won't discourse here. Ping me on Twitter if you are interested.\n\n-------\nSamuel Simões ~ [@samuelsimoes](https://twitter.com/samuelsimoes) ~ [Blog](http://blog.samuelsimoes.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsimoes%2Fvim-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelsimoes%2Fvim-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelsimoes%2Fvim-drawer/lists"}