{"id":15733002,"url":"https://github.com/airblade/vim-tailwind","last_synced_at":"2025-03-13T05:31:17.153Z","repository":{"id":152651724,"uuid":"612281637","full_name":"airblade/vim-tailwind","owner":"airblade","description":"A Vim plugin to autocomplete Tailwind classes without LSP.  Also looks up Tailwind classes' CSS properties.","archived":false,"fork":false,"pushed_at":"2023-11-22T12:14:16.000Z","size":3094,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T18:57:02.978Z","etag":null,"topics":["completion","tailwindcss","vim","vim-plugin"],"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/airblade.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2023-03-10T15:37:28.000Z","updated_at":"2025-02-07T19:49:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"47881b32-e2b8-49f2-bae9-74277d464778","html_url":"https://github.com/airblade/vim-tailwind","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airblade%2Fvim-tailwind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airblade%2Fvim-tailwind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airblade%2Fvim-tailwind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airblade%2Fvim-tailwind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airblade","download_url":"https://codeload.github.com/airblade/vim-tailwind/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243351214,"owners_count":20276894,"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":["completion","tailwindcss","vim","vim-plugin"],"created_at":"2024-10-04T00:40:33.304Z","updated_at":"2025-03-13T05:31:16.394Z","avatar_url":"https://github.com/airblade.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vim-tailwind\n\nA Vim plugin to autocomplete Tailwind class names without LSP.\n\nIt also lets you look up a Tailwind class's CSS properties.\n\n\n## Screenshots\n\nShowing completions for `text-zinc-`:\n\n![Screenshot of completions for `text-zinc-`](completions.png?raw=true)\n\nShowing class information for `text-zinc-600` in the command-line area:\n\n![Screenshot of completions for `text-zinc-`](class-lookup.png?raw=true)\n\n\n## Tailwind version\n\nv3.3.5\n\n\n## Installation\n\nInstall like every other Vim plugin :)\n\n\n## Configuration\n\nThese options customise the completion items (see `:help complete-items`).\n\n- `g:tailwind_complete_item_info` - whether to set the `info` text (default `v:true`).\n- `g:tailwind_complete_item_menu` - whether to set the `menu` text (default `v:true`).\n- `g:tailwind_complete_item_menu_length` - maximum length of the `menu` text (default `40`).\n- `g:tailwind_complete_items_max` - maximum number of items to show (default: `50`).\n\n\n## Usage\n\n### Autocompletion\n\nFor user-defined autocompletion (via `\u003cC-X\u003e\u003cC-U\u003e`):\n\n```vim\nsetlocal completefunc=tailwind#Complete\n```\n\nOr for omnicompletion (via `\u003cC-X\u003e\u003cC-O\u003e`):\n\n```vim\nsetlocal omnifunc=tailwind#Complete\n```\n\nI have the following snippet in my vimrc to set this up:\n\n```vim\nfunction! s:is_tailwind()\n  return !empty(findfile('tailwind.config.js', '.;')) ||\n       \\ !empty(findfile('config/tailwind.config.js', '.;'))\nendfunction\n\nautocmd BufEnter *.html,*.slim if s:is_tailwind() |\n      \\   setlocal omnifunc=tailwind#Complete |\n      \\ endif\n```\n\n### Lookup\n\nUnless you have `K` mapped already, press `K` in normal mode with your cursor on a Tailwind class.\n\nTo map some other key, e.g. `gk`:\n\n```vim\nnmap \u003csilent\u003e \u003cbuffer\u003e gk \u003cPlug\u003e(tailwind-lookup)\n```\n\n\n## Caveats\n\nThe plugin ignores modifiers, e.g. `sm:` or `hover:`.  They affect when the CSS is applied, not what the CSS actually is, so they are irrelevant here.\n\nThe plugin ignores `@media` at-rules.  This only affects the [`.container`](https://tailwindcss.com/docs/container) class.\n\n\n## Intellectual property\n\nCopyright Andrew Stewart.  Released under the MIT licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairblade%2Fvim-tailwind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairblade%2Fvim-tailwind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairblade%2Fvim-tailwind/lists"}