ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Vue

by SublimeText ALL Top 100

Vue syntax for Sublime Text

Details

  • 5.0.2
    3.3.6
    3.3.5
  • github.​com
  • github.​com
  • 3 months ago
  • 18 minutes ago
  • 11 years ago

Installs

  • Total 530K
  • Win 297K
  • Mac 155K
  • Linux 79K
Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24
Windows 13 5 7 9 4 17 9 9 19 10 13 8 23 20 19 12 23 8 13 10 18 25 13 13 8 7 16 12 22 10 17 2 7 17 23 21 10 11 13 5 13 15 15 12 12 7
Mac 4 7 5 6 10 4 7 9 4 5 3 0 9 11 7 5 9 3 6 8 7 13 12 8 3 4 6 11 4 7 7 4 4 5 13 6 12 12 3 2 10 9 10 8 5 7
Linux 3 8 5 5 8 7 8 8 7 6 3 3 4 8 8 10 4 5 8 4 5 7 9 12 5 5 5 7 3 12 3 7 4 7 1 11 4 11 8 3 7 12 11 11 6 7

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.

preview

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.

  1. Open Command Palette using ctrl+shift+P or menu item Tools → Command Palette...
  2. Choose Package Control: Install Package
  3. Find Vue and hit Enter

Manual Install

  1. 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.
  2. Rename it to Vue.sublime-package
  3. Copy it into Installed Packages directory

[!NOTE]

To find Installed Packages

  1. call Menu > Preferences > Browse Packages..
  2. 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:

  • Syntax highlighting in <template> tags is powered by:

    • HAML (from Sublime Text)
    • Mustache (built-in)
    • Jade
    • Pug
    • Slim
  • Intellisense features are provided by LSP and LSP-vue.

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:

  1. call Menu > Preferences > Browse Packages..
  2. Look for HTML folder
  3. 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:

License

MIT