Skip to content

Establish this repo as a stand-alone package for ST4 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Vue Syntax Highlight

**Note**: the `st4` branch hosts the new syntax that only works in Sublime build > 4107.
Sublime Text Syntax highlighting for single-file [Vue.js](http://vuejs.org) components.

* For Sublime Text 2 support (`.tmlanguage` files), see `master` branch.
* For Sublime Text 3 support, see `new` branch.
The `main` branch targets Sublime Text 4.
For the Sublime Text 2 and 3 support (`.tmlanguage` files), see `st2` branch.

Sublime Text Syntax highlighting for single-file [Vue.js](http://vuejs.org) components (enabled by [vue-loader](https://github.com/vuejs/vue-loader) or [vueify](https://github.com/vuejs/vueify)).
This repository is a fork of [vuejs/vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight)
with a focus on providing syntax highlighting only for Sublime Text.

<p align="center">
<img width="809px" src="https://raw.githubusercontent.com/vuejs/vue-syntax-highlight/new/samples/screenshot.png">
Expand All @@ -18,20 +19,6 @@ Sublime Text Syntax highlighting for single-file [Vue.js](http://vuejs.org) comp

**NOTE:** You still need to install corresponding packages for pre-processors (e.g. Pug, SASS, CoffeeScript) to get proper syntax highlighting for them.

### Enabling JSX Highlighting

The `<script>` block uses the syntax highlighting currently active for you normal `.js` files. To support JSX highlighting inside Vue files:

1. Install and set [Babel javascript highlighting package](https://packagecontrol.io/packages/Babel), which supports JSX, as your default JS highlighting.

2. Explicitly disable Sublime's default `JavaScript` package. This allows the Babel package to be applied the embedded `<script>` in `*.vue` files. You may need to restart Sublime for this to take effect.

### Development

- The development of this syntax relies on the [YAML-Macros](https://github.com/Thom1729/YAML-Macros) package. You can install it from Package Control.

- Do not edit `Vue Component.sublime-syntax` directly. Work in `Vue Component.sublime-syntax.yaml-macros` instead. Once done editing, run "Build With: YAML Macros" from Sublime's command palette. This will update the actual `Vue Component.sublime-syntax` file.

### License

[MIT](http://opensource.org/licenses/MIT)
Loading