Let .vue be highlighted in Sublime Text's new template
This time I will bring to you how to highlight .vue in a new Sublime Text template and how to highlight .vue in a new Sublime Text template. What are the precautions?. The following is a practical case. Get up and take a look.
This article introduces Sublime Text’s new .vue template and highlights (picture and text tutorial), share it with everyone, and leave a note for yourself.
DownloadInstallNew file template plug-in SublimeTmpl
Download and install vue syntax highlighting plug-in Vue Syntax Highlight
There are two ways to install plug-ins for Sublime Text:
1. Use Package Control, the installation library that comes with Sublime Text, to install
Click Preferences -> Package Control in the menu bar or use the shortcut key CTRL SHIFT P to open a terminal window, enter Install and select Package Control: Install Package to install
2. Download and put it directly into the package directory (Preferences / Browse Packages) Chinese: (Preferences / Package Browser) folder
SublimeTmpl
- Vue Syntax Highlight
Create .vue template and enable syntax highlighting
After installing Vue Syntax Highlight, you can already highlight files in .vue format when you open them. Now let's set up shortcut keys to directly create files in .vue format.
SublimeTmpl has only 6 syntax templates by default:
html ctrl alt h
- javascript ctrl alt j
- css ctrl alt c
- php ctrl alt p
- ruby ctrl alt r
- python ctrl alt shift p
We now add a new template to create vue format
1. Create vue file template
Directly open the folder of the plug-in package Preferences -> Browse Packages
Preferences -> Browse Packages
Package folder
Open the folder templates where the templates are stored, copy any item and rename it vue.tmpl
Create vue.tmplvue.tmpl and change the content to the template you want
vue.tmpl content
2. Modify the new menu and add new vue options
SublimeTmpl's new menu does not have vue by default,
New -> New File (SublimeTmpl)
Click the Menu option, or open Preferences -> Package Settings -> SublimeTmpl -> Settings - Menu,
Open menu configuration item
Copy an item, then paste and change it to vue item,
Added vue item
After saving the changes, the vue item
will appear in the new menu. vue item
appears Click on the new vue item in the picture above, and the previously set template content will appear, but there is no syntax highlighting, and it is in plain text format
Create a new vue file
3. Template binding vue syntax highlighting
Open Preferences -> Package Settings -> SublimeTmpl -> Settings - Default,
Open the default settings
Copy an item and modify it to vue, the path is as follows
Binding vue syntax
For the binding syntax associated file path, please check the directory Sublime Text3DataCache, find the vue highlighting syntax plug-in name, and open
Sublime Text3DataCache directory
Sublime Text3DataCachevue-syntax-highlight
Create a new vue menu again and the syntax will be highlighted,
Create a new vue file
4. Bind the shortcut key for creating a new vue file
Open Preferences -> Package Settings -> SublimeTmpl -> Key Bindings - Default,
Open the setting shortcut key file
Copy an item, paste it to create a new vue shortcut key is ctrl alt v,
Create shortcut keys
After saving, the new menu will also be available,
New file menu
Try it, perfect!
at last
Preferences -> Package Settings -> SublimeTmpl -> Settings - Commands
The file seems to be for configuring commands, and the configuration method is the same as above, just copy the cat and the tiger~
last of the last
In this way, other language templates can also be created by yourself.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
The above is the detailed content of Let .vue be highlighted in Sublime Text's new template. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When Notepad files get too large, here are some solutions you can try: Use another text editor like Sublime Text as they don’t have file size limits. Split the file into smaller parts. Enable large file support via Registry Editor. Try using an alternative method such as Notepad++, WordPad, or Microsoft Word to open the file. Zip the file and open it with an archive tool.

There are three methods to achieve text column alignment in Notepad: 1. Use tabs; 2. Use spaces and adjust manually; 3. Use third-party tools (such as Notepad++, Sublime Text) to provide automatic alignment.

To open HTML files you need to use a browser such as Google Chrome or Mozilla Firefox. To open an HTML file using a browser, follow these steps: 1. Open your browser. 2. Drag and drop the HTML file into the browser window, or click the File menu and select Open.

IDLE and Jupyter Notebook are recommended for beginners, and PyCharm, Visual Studio Code and Sublime Text are recommended for intermediate/advanced students. Cloud IDEs Google Colab and Binder provide interactive Python environments. Other recommendations include Anaconda Navigator, Spyder, and Wing IDE. Selection criteria include skill level, project size and personal preference.

HTML can be used to open local files as follows: Create a .html file and import the jQuery library. Create an input field that allows the user to select a file. Listen to the file selection event and use a FileReader() object to read the file contents. Display the read file contents on the web page.

Steps to create a .py file in Python: Open a text editor (such as Notepad, TextMate, or Sublime Text). Create a new file and enter the Python code, paying attention to indentation and syntax. When saving the file, use a .py extension (for example, my_script.py).

Here are the steps to use copied code in Python: Copy and paste the code into a text editor. Create a Python file. Run the code from the command line. Understand what the code is for and how it works. Modify the code as needed and rerun it.

You can open HTML files on your phone by using your default browser and entering the file path or URL in the address bar. Using your file manager, navigate to the file location and click the HTML file. Download the text editor, navigate to the file location and double-click the HTML file. Download HTML Viewer from the App Store, navigate to the file location and tap on the HTML file.
