{"id":13898904,"url":"https://github.com/tpope/vim-flagship","last_synced_at":"2026-01-27T17:36:55.027Z","repository":{"id":33776767,"uuid":"37434397","full_name":"tpope/vim-flagship","owner":"tpope","description":"flagship.vim: Configurable and extensible tab line and status line","archived":false,"fork":false,"pushed_at":"2025-01-04T01:14:14.000Z","size":29,"stargazers_count":224,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-04T02:27:01.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=5199","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/tpope.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":"CONTRIBUTING.markdown","funding":".github/FUNDING.yml","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},"funding":{"github":"tpope","custom":["https://www.paypal.me/vimpope"]}},"created_at":"2015-06-14T23:55:07.000Z","updated_at":"2025-01-04T01:14:18.000Z","dependencies_parsed_at":"2024-01-17T16:08:38.699Z","dependency_job_id":"4d75190a-d653-4022-9785-2baf834967f0","html_url":"https://github.com/tpope/vim-flagship","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-flagship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-flagship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-flagship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fvim-flagship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpope","download_url":"https://codeload.github.com/tpope/vim-flagship/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240783109,"owners_count":19856776,"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":[],"created_at":"2024-08-06T18:04:31.543Z","updated_at":"2026-01-27T17:36:55.022Z","avatar_url":"https://github.com/tpope.png","language":"Vim Script","funding_links":["https://github.com/sponsors/tpope","https://www.paypal.me/vimpope"],"categories":["Vim Script","Vim script"],"sub_categories":[],"readme":"# flagship.vim\n\nFlagship provides a Vim status line and tab line that are both easily\ncustomizable by the user and extensible by other plugins.\n\n## Installation\n\nCopy and paste for [pathogen.vim](https://github.com/tpope/vim-pathogen):\n\n    cd ~/.vim/bundle\n    git clone https://github.com/tpope/vim-flagship.git\n    vim -u NONE -c \"helptags vim-flagship/doc\" -c q\n\nWhile not strictly required, I highly recommend the following options:\n\n    set laststatus=2\n    set showtabline=2\n    set guioptions-=e\n\nThe first two force the status line and tab line to always display, and the\nthird disables the GUI tab line in favor of the plain text version, enabling\nglobal flags and the tab prefix explained below.\n\n## Extension\n\nAdding a flag from a plugin is a simple matter of calling `Hoist()` with a\nscope and function name from a `User Flags` autocommand.  Here's an example\nfrom [fugitive.vim](https://github.com/tpope/vim-fugitive):\n\n    autocmd User Flags call Hoist(\"buffer\", \"fugitive#statusline\")\n\nYou can also do this in your vimrc, for example if a plugin provides a\nstatusline flag function but does not natively integrate with Flagship.  If\nthe function isn't defined (e.g., you temporarily disable or permanently\nremove the plugin), it will be skipped.  Here's a couple of mine:\n\n    autocmd User Flags call Hoist(\"window\", \"SyntasticStatuslineFlag\")\n    autocmd User Flags call Hoist(\"global\", \"%{\u0026ignorecase ? '[IC]' : ''}\")\n\n## Customization\n\nThe extension API is great for adding flags, but what if you want to change\nthe core content?  For the status line, Vim already provides a perfectly\nadequate `'statusline'` option, and Flagship will use it in constructing its\nown.  Customizing your status line is exactly the same with and without\nFlagship.\n\nThe tab line is another story.  The usual technique (see\n`:help setting-tabline`) involves creating a function that cycles through each\ntab and assembles a giant format string.  Furthermore, while you can use the\nsame status line \"%\" items, they're expanded in the context of the active\nwindow only, rendering most of them worthless for any tab but the current.\nRather than embrace this abomination, Flagship hides it, instead exposing\na `g:tablabel` option which can be assigned to customize the format of a\nsingle tab.  Additionally, you can set `g:tabprefix` to define content to be\ninserted before the first tab (assuming you disabled the GUI tab line as\ninstructed above).\n\nThe default tab label is nearly impossible to precisely reconstruct, and I\nnever really found it useful, so I've taken it a different direction.  Here's\nhow it would look if you set `g:tablabel` yourself, using a few of the many\nhelpers available:\n\n    let g:tablabel =\n          \\ \"%N%{flagship#tabmodified()} %{flagship#tabcwds('shorten',',')}\"\n\nHere's a breakdown of what's included:\n\n* The tab number, so you never have to hesitate on `gt` invocation.\n* One `+` per modified window.  Vim's default shows the status of the tab's\n  current window only, which can be misleading.\n* A compact representation of the working directories of each window.  For\n  determining what project a tab is on, I find this far more useful than the\n  filename.\n\nAdditionally, I've chosen to prefix the tab line with the Vim GUI server name\n(see `:help v:servername`) if available, or the current host name if SSHed.\nThis only takes a few characters, and I find it to be greatly helpful in\nreducing confusion when running multiple instances of Vim.  (Assign\n`g:tabprefix` if you don't like it.)\n\n## Self-Promotion\n\nLike flagship.vim?  Follow the repository on\n[GitHub](https://github.com/tpope/vim-flagship) and vote for it on\n[vim.org](http://www.vim.org/scripts/script.php?script_id=5199).  And if\nyou're feeling especially charitable, follow [tpope](http://tpo.pe/) on\n[GitHub](https://github.com/tpope).\n\n## License\n\nCopyright © Tim Pope.  Distributed under the same terms as Vim itself.\nSee `:help license`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-flagship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpope%2Fvim-flagship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fvim-flagship/lists"}