[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Highlight HTML in ES6 template strings with Sublime

This is Kusakabe from the development team.

Starting with ES6, template strings (template literals) can be used as standard.
This is useful when using AngularJS or Vue.js, as you do not need to escape single or double quotes when writing HTML tags in a string.

Like this, the highlights made by the editor may be plain.

In this article, we will introduce the steps to highlight HTML tags in template strings as HTML tags in Sublime Text.

However, Michael Russell has released a syntax file on Gist, so let's use it.


Immediately open Sublime Text,

Tools -> Developer -> New Syntax...

Go ahead and rewrite the contents of the opened window this contents and save it.
The file name is arbitrary, but the extension should be sublime-syntax. Adding Syntax is now complete.

Then open the file that uses the template string and

 View -> Syntax -> Javascript NG

If so, it should be highlighted like the featured image in this article!

In addition, with some js file open,

 View -> Syntax -> Open all with current extension as... -> Javascript NG

If you do this, Javascript NG will be automatically selected when you open a file with the .js extension.

(Although the Syntax name has "NG", it can be used without problems when writing not only Angular but also Vue.)

If you found this article helpful , please give it a like!
0
Loading...
0 votes, average: 0.00 / 10
766
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author