{"id":13423872,"url":"https://github.com/posva/vim-vue","last_synced_at":"2025-05-15T15:01:46.853Z","repository":{"id":3215775,"uuid":"43940141","full_name":"posva/vim-vue","owner":"posva","description":"Syntax Highlight for Vue.js components","archived":false,"fork":false,"pushed_at":"2024-03-30T11:53:18.000Z","size":72,"stargazers_count":1295,"open_issues_count":31,"forks_count":101,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-09T16:13:16.514Z","etag":null,"topics":["vim","vue"],"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/posva.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},"funding":{"github":"posva"}},"created_at":"2015-10-09T07:36:27.000Z","updated_at":"2025-04-26T14:14:17.000Z","dependencies_parsed_at":"2024-09-24T22:02:36.728Z","dependency_job_id":"ccb4cd75-83c3-4961-99be-3e545b6bca42","html_url":"https://github.com/posva/vim-vue","commit_stats":{"total_commits":98,"total_committers":36,"mean_commits":"2.7222222222222223","dds":0.7448979591836735,"last_synced_commit":"c424294e769b26659176065f9713c395731f7b3a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvim-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvim-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvim-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fvim-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posva","download_url":"https://codeload.github.com/posva/vim-vue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364264,"owners_count":22058877,"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":["vim","vue"],"created_at":"2024-07-31T00:00:44.189Z","updated_at":"2025-05-15T15:01:46.756Z","avatar_url":"https://github.com/posva.png","language":"Vim Script","readme":"# vim-vue [![CircleCI](https://img.shields.io/circleci/project/github/posva/vim-vue.svg)](https://circleci.com/gh/posva/vim-vue)\n\nVim syntax highlighting for [Vue\ncomponents](https://vuejs.org/v2/guide/single-file-components.html).\n\nThis was initially forked from\n[darthmall/vim-vue](https://github.com/darthmall/vim-vue). I already have an\nimplementation for this but found his code much cleaner. That's why I created a\nnew version instead of a PR.\n\n\u003e [!WARNING]\n\u003e This project is currently not actively maintained. We recommend to check the official [vuejs/language-tools](https://github.com/vuejs/language-tools?tab=readme-ov-file#community-integration) instead.\n\n## Installation\n\n### Install with [Vundle](https://github.com/VundleVim/Vundle.vim)\n\n```viml\nPlugin 'posva/vim-vue'\n```\n\n### Install with [Pathogen](https://github.com/tpope/vim-pathogen)\n\n```bash\ncd ~/.vim/bundle \u0026\u0026 \\\ngit clone https://github.com/posva/vim-vue.git\n```\n\n### Install without a plugin manager (Vim 8)\n\n```bash\ngit clone https://github.com/posva/vim-vue.git ~/.vim/pack/plugins/start/vim-vue\n```\n\n### Integration with [Syntastic](https://github.com/scrooloose/syntastic) or [ALE](https://github.com/w0rp/ale)\n\nCurrently only `eslint` is available. Please make sure\n[eslint](http://eslint.org/) and\n[eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) are installed\nand properly [configured](https://github.com/vuejs/eslint-plugin-vue#rocket-usage):\n\n```bash\nnpm i -g eslint eslint-plugin-vue\n```\n\n## Contributing\n\nIf your language is not getting highlighted open an issue or a PR with the fix.\nYou only need to add a line to the `syntax/vue.vim` file.\n\nDon't forget to write [Vader](https://github.com/junegunn/vader.vim) tests for\nthe code you write. You can run the tests by executing `make test` in the\nterminal.\n\n## FAQ\n\n### Where is Jade?\n\n[Jade has been renamed to pug](https://github.com/pugjs/jade/issues/2184).\nTherefore you have to replace all your `jade` occurrences with `pug`. The new\nplugin for `pug` can be found on [the same repository](https://github.com/digitaltoad/vim-pug)\n(the name has already been updated).\n\n### How to use commenting functionality with multiple languages in Vue files?\n\n#### [tcomment](https://github.com/tomtom/tcomment_vim)\n\ntcomment has some support for Vue files with multiple languages, without any extra configuration.\n\n#### [caw.vim](https://github.com/tyru/caw.vim)\n\ncaw.vim features built-in support for file context through [context_filetype.vim](https://github.com/Shougo/context_filetype.vim). Just install both plugins and context-aware commenting will work in most files. The fenced code is detected by predefined regular expressions.\n\n#### [NERDCommenter](https://github.com/scrooloose/nerdcommenter)\n\n\u003cdetails\u003e\n\u003csummary\u003e\nTo use NERDCommenter with Vue files, you can use its \"hooks\" feature to\ntemporarily change the filetype. \u003cem\u003eClick for an example.\u003c/em\u003e\n\u003c/summary\u003e\n\n```vim\nlet g:ft = ''\nfunction! NERDCommenter_before()\n  if \u0026ft == 'vue'\n    let g:ft = 'vue'\n    let stack = synstack(line('.'), col('.'))\n    if len(stack) \u003e 0\n      let syn = synIDattr((stack)[0], 'name')\n      if len(syn) \u003e 0\n        exe 'setf ' . substitute(tolower(syn), '^vue_', '', '')\n      endif\n    endif\n  endif\nendfunction\nfunction! NERDCommenter_after()\n  if g:ft == 'vue'\n    setf vue\n    let g:ft = ''\n  endif\nendfunction\n```\n\n\u003c/details\u003e\n\n### _Vim slows down when using this plugin_ How can I fix that?\nWhen checking for pre-processor languages, multiple syntax highlighting checks are done, which can slow down vim. You can trim down which pre-processors to use by setting `g:vue_pre_processors` to a whitelist of languages to support:\n\n```vim\nlet g:vue_pre_processors = ['pug', 'scss']\n```\n\nTo disable pre-processor languages altogether (only highlight HTML, JavaScript, and CSS):\n\n```vim\nlet g:vue_pre_processors = []\n```\n\nAvailable pre-processors are: coffee, haml, handlebars, less, pug, sass, scss, slm, stylus, typescript\n\nWhen `g:vue_pre_processors` is set to 'detect_on_enter' instead of a list, vim-vue will detect the pre-processors used when a file is opened, and load only their syntax files.\n\n```vim\nlet g:vue_pre_processors = 'detect_on_enter'\n```\n","funding_links":["https://github.com/sponsors/posva"],"categories":["Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","Awesome Vue.js","HarmonyOS","Components \u0026 Libraries","叫研发工具组","Dev Tools","Dev Tools [🔝](#readme)"],"sub_categories":["Syntax Highlighting","Windows Manager","Dev Tools","源代码编辑","Source Code Editing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fvim-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposva%2Fvim-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fvim-vue/lists"}