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

Vue

by SublimeText ALL Trending Top 100

Vue syntax for Sublime Text

Details

  • 5.0.1
    3.3.6
    3.3.5
  • github.​com
  • github.​com
  • 2 months ago
  • 1 week ago
  • 10 years ago

Installs

  • Total 524K
  • Win 293K
  • Mac 153K
  • Linux 77K
Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7
Windows 25 26 29 21 27 14 10 16 19 26 15 28 14 11 21 19 17 16 14 13 6 17 13 12 19 16 8 13 20 20 24 16 25 10 16 19 20 28 22 21 11 13 18 25 24 22
Mac 12 11 16 14 18 8 6 7 15 8 6 2 9 8 12 9 9 10 13 7 9 5 18 15 11 16 8 3 9 6 13 10 14 7 10 16 11 11 18 15 2 10 9 16 7 18
Linux 7 8 12 8 13 6 7 7 3 16 8 5 5 5 8 13 15 6 11 12 4 10 11 8 7 5 4 2 5 6 9 11 5 8 5 5 2 9 11 12 5 7 16 6 7 11

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