Vue
Vue syntax for Sublime Text
Details
Installs
- Total 522K
- Win 292K
- Mac 152K
- Linux 77K
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 16 | 29 | 27 | 25 | 22 | 32 | 11 | 20 | 21 | 30 | 27 | 39 | 42 | 11 | 14 | 26 | 20 | 28 | 15 | 18 | 9 | 11 | 27 | 10 | 0 | 0 | 0 | 1 | 17 | 16 | 23 | 9 | 13 | 21 | 12 | 16 | 13 | 0 | 0 | 26 | 19 | 11 | 17 | 21 | 22 | 32 |
Mac | 5 | 7 | 17 | 24 | 14 | 12 | 8 | 11 | 19 | 13 | 23 | 16 | 27 | 3 | 7 | 10 | 8 | 9 | 8 | 15 | 4 | 3 | 9 | 5 | 0 | 0 | 0 | 0 | 7 | 15 | 17 | 4 | 7 | 12 | 3 | 7 | 10 | 0 | 0 | 11 | 14 | 4 | 6 | 13 | 8 | 8 |
Linux | 1 | 5 | 11 | 14 | 10 | 13 | 1 | 10 | 8 | 12 | 12 | 10 | 13 | 7 | 6 | 5 | 9 | 4 | 6 | 13 | 1 | 3 | 5 | 7 | 0 | 0 | 0 | 2 | 7 | 7 | 3 | 1 | 0 | 9 | 5 | 7 | 8 | 0 | 0 | 3 | 6 | 2 | 3 | 5 | 7 | 10 |
Readme
- Source
- raw.githubusercontent.com
Vue
Sublime Text Syntax highlighting for single-file Vue.js components based on its HTML, CSS, JavaScript, TypeScript, JSX, TSX and HAML syntaxes.
The main
branch targets Sublime Text 4.
For Sublime Text 2 compatible package using .tmlanguage
files, see st2
branch.
For Sublime Text 3 (3153+) compatible package using .sublime-syntax
files, see st3153
branch.
This repository is a fork of vuejs/vue-syntax-highlight with focus on providing syntax highlighting only for Sublime Text.
Installation
Package Control
The easiest way to install is using Package Control. It's listed as Vue
.
- Open
Command Palette
using ctrl+shift+P or menu itemTools → Command Palette...
- Choose
Package Control: Install Package
- Find
Vue
and hit Enter
Manual Install
- Download appropriate Vue-5.0.0-st4xxx.sublime-package for your Sublime Text build.
The
st4xxx
suffix denotes the least required ST build for the sublime-package to work. - Rename it to Vue.sublime-package
- Copy it into Installed Packages directory
[!NOTE]
To find Installed Packages…
- call Menu > Preferences > Browse Packages..
- Navigate to parent folder
Requirements
- Vue 4.0.0+ requires Sublime Text 4107+
Syntax highlighting in
<style>
tags is powered by:Syntax highlighting in
<script>
tags is powered by:- Babel
- CoffeeScript
- LiveScript
- JavaScript (from Sublime Text)
- TypeScript (from Sublime Text)
- JSX/TSX (from Sublime Text)
Syntax highlighting in
<template>
tags is powered by:
Troubleshooting
§1 Syntax Definition Parse Errors
Vue extends Sublime Text's HTML syntax definition.
If Vue syntax highlighting doesn't work and console displays syntax errors in Vue Component.sublime-syntax, please make sure to remove any out-dated syntax override.
Steps:
- call Menu > Preferences > Browse Packages..
- Look for HTML folder
- Remove it or at least delete any syntax definition in it.
§2 Scripts are not correctly highlighted
Vue relies on JavaScript (source.js
), JSX (source.jsx
),
TypeScript (source.ts
) and TSX (source.tsx
)
to scope script blocks and inline scripts.
Make sure to remove related out-dated syntax packages, which don't meet least compatibility requirements.
They can be identified by calling
e.g. sublime.find_syntax_by_scope("source.ts")
in ST's console.
Known candidates are: