# NotepadPlusPlus-Vue-UDL **Repository Path**: JerrfyChern/NotepadPlusPlus-Vue-UDL ## Basic Information - **Project Name**: NotepadPlusPlus-Vue-UDL - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-24 - **Last Updated**: 2026-04-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # User Defined Language (UDL) for Single-File Components (SFC) / .vue files in Notepad++ This project provides a quick and simple way to enhance the (development) experience of Vue single-file components in Notepad++. Resources for further customization are also provided. Please read on to learn about what is possible and some restrictions of this UDL. ## Quick setup 1. Download `Vue.xml` or `Vue-dark.xml` 2. Open Notepad++ and go to *Language -> User Defined Language -> Define your language* 3. Click *Import* 4. Select the XML-file you saved 5. Close the dialog and restart Notepad++ 6. Go to *Language* again and select `Vue` or `Vue (dark)` right under *User Defined Language* to enable the highlighting for any *.vue* file in your current session Notepad++ should automatically select the language for every *.vue* file opened from now on. > [!TIP] > To customize this UDL, go to *Language -> User Defined Language -> Define your language* and select `Vue` or `Vue (dark)` in the dropdown menu. Colors and font (sizes) are quite simple to change but you might want to read further below before making other changes. > [!TIP] > When changing style settings, don't select anything for *font* and *size* and keep the background transparent. That way, [issues](https://github.com/J0NEK0/NotepadPlusPlus-Vue-UDL/issues/3) can be avoided when using a different theme. ## Styles Overview over the styles used in this UDL: | Name | Color & Style | Color & Style dark | Description | |:-----|:-------------:|:------------------:|:------------| | Default style | `inherit` | `inherit` | Default styling of every non-keyword *outside* the delimiter environments | | Folding in comment | `#008000`, **bold** & *italic* | `#7F9F7F`, **bold** & *italic* | Markers for folding (`{`, `}`, `.fS`, `.foldEnd`, ...) | | Folding in code | | | Folding markes in code (unused) | | Keywords 1 | `#0000FF`, **bold** | `#DFC47D`, **bold** | JS core (`this`, `super`, `if`, ...) | | Keywords 2 | `#0080C0` | `#0080C0` | JS global objects | | Keywords 3 | `#804000` | `#FFCFAF` | JS global (object) function properties (`toString`, `eval`, `isNaN`, ...) | | Keywords 4 | `#0000FF`, **bold** | `#E3CEAB`, **bold** | HTML tags (`div`, `html`, `a`, `p`, ...) | | Keywords 5 | `#FF0000` | `#DFDFDF` | HTML attributes (`id`, `class`, `style`, `alt`, ...) | | Keywords 6 | `#8080C0`, **bold** | `#C2BE9E`, **bold** | CSS rules, pseudo-classes & -elements and properties | | Keywords 7 | `#42b883` | `#42b883` | Vue HTML tags and attributes (`v-if`, `KeepAlive`, `@`, `:`, ...) | | Keywords 8 | `#42b883` | `#42b883` | Vue JS properties and functions (`createApp`, `emit`, `onMounted`, ...) | | Comment line | `#008000` | `#7F9F7F` | One-line comments (JS) | | Comment | `#008000` | `#7F9F7F` | Multi-line comments (JS, CSS) | | Number | `#FF8000` | `#8CD0D3` | Numbers | | Operators 1 | `inherit` | `inherit` | Operators (`+`, `*`, `/`, `=`, `&`, ...) | | Operators 2 | `inherit` | `inherit` | Operators surrounded by space (`-`) | | Delimiter 1 | `inherit` | `inherit` | CSS default style | | Delimiter 2 | `inherit` | `inherit` | JS default style | | Delimiter 3 | `inherit` | `inherit` | HTML default style | | Delimiter 4 | `#008000` | `#7F9F7F` | HTML comment | | Delimiter 5 | `inherit` | `inherit` | HTML tag & attribute environment (`< >`, ``) | | Delimiter 6 | `#8000FF` | `#CC9393` | Strings (`" "`)| | Delimiter 7 | `#808080` | `#CC9393` | Template strings | | Delimiter 8 | `#42b883` | `#42b883` | Text interpolation / Mustaches (`{{`, `}}`) | # How it's (not) working A typical single-file component consists of three parts: *template*, *script* and *style*. Basically all that needs to be done is to apply the existing rules for *HTML*, *JavaScript* and *CSS* to the correct parts of the code and add the keywords for Vue. However, while the UDL functionality of Notepad++ allows the creation of many languages, only one language can be selected for a file, which is then applied to the *whole* content of the file. This suggests that all keywords from all languages would have to be merged together but then the *JavaScript* keywords would also be highlighted in the *template* section and so on. To avoid this, this UDL makes use of delimiters. Nevertheless, this approach still requires some language-mixing and waiver of some typical features. Let's go through the settings: > [!IMPORTANT] > The global property **Ignore case** is set to `false`. While HTML and CSS (with the exception of *class* and *id* selectors as well as values of some properties) aren't case sensitive, JavaScript and XHTML are. Lower case must be used in order for keywords to be detected. If you are more of an ALL-CAPS person, transform and replace/add the respective keywords: ``` "space separated keywords".split(" ").map(x => x.toUpperCase()).join(" ") ``` ## Operators & Delimiters Delimiters and the nesting function are used to apply specific rules to a specific part of the *.vue* file. Code between - `