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

Vue

by SublimeText ALL Top 100

Vue syntax for Sublime Text

Details

  • 5.0.1
    3.3.6
    3.3.5
  • github.​com
  • github.​com
  • 4 months ago
  • 1 hour ago
  • 10 years ago

Installs

  • Total 525K
  • Win 294K
  • Mac 153K
  • Linux 78K
Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2
Windows 22 14 23 15 14 19 21 18 31 27 15 8 13 24 26 15 27 5 5 27 24 30 25 25 14 10 14 27 26 24 28 13 13 15 26 24 24 15 7 16 21 22 44 18 35 14
Mac 10 12 12 6 2 9 15 13 9 16 3 8 12 14 5 12 10 13 3 18 17 18 7 8 3 16 10 12 14 17 16 9 8 6 15 21 9 9 11 6 10 10 18 8 13 4
Linux 8 5 3 3 10 12 4 5 10 12 5 6 5 8 6 5 11 8 7 1 6 5 6 13 3 5 10 9 12 9 13 5 6 7 4 9 7 8 3 2 12 9 5 9 10 6

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