You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/user-defined-language-system.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,18 +15,36 @@ Using **Languages > Define Your Language...** will bring up a dialog box (which
15
15
16
16
The main pulldowns and buttons are available, whichever configuration tab is active:
17
17
***User Language** pulldown lists all the existing UDL will allow you to select the UDL you would like to edit or examine. There is a special entry for the default UDL, called **User Defined Language** here (though it shows up in the Notepad++ **Languages** menu as **User-Defined**), which can be used as a template for other UDL.
18
-
***Create New** will copy the default **User Defined Language** stylings and rules to a new name
19
-
***Save As** will copy the currently-selected UDL, with all its stylings and rules, to a new name
20
-
***Import...** will [import](#import-a-udl) a UDL XML file into your current instance ([see below](#import-a-udl))
21
-
***Export...** will save the UDL XML file to a location of your choosing; you can then share this with others, so that they can [import](#import-a-udl) your UDL for their own use
18
+
***Create New** will copy the default **User Defined Language** stylings and rules to a new name.
19
+
***Save As** will copy the currently-selected UDL, with all its stylings and rules, to a new name.
20
+
***Import...** will [import](#import-a-udl) a UDL XML file into your current instance ([see below](#import-a-udl)).
21
+
***Export...** will save the UDL XML file to a location of your choosing; you can then share this with others, so that they can [import](#import-a-udl) your UDL for their own use.
22
22
***Dock** or **Undock** will toggle whether the UDL dialog is a standalone dialog, or docked in the Notepad++ window.
23
-
* ...
23
+
***☐ Ignore Case** will make the various keywords ignore case while matching.
24
+
***☐ Transparency** (when not docked) will make the dialog box semi-transparent; the slider bar changes from virtually invisible (all the way to the left) to mostly opaque (all the way to the right); if you want it completely opaque (no transparency), uncheck the box.
24
25
25
26
When a UDL other than the default **User Defined Language** is seelcted in the pulldown, the following will also be available:
26
-
***Rename** will rename the existing UDL (only visible when a UDL other than the default **User Defined Language** is selected)
27
-
* ...
27
+
***Rename** will rename the currently-selected UDL.
28
+
***Remove** will delete the currently-selected UDL.
29
+
***Ext.: ____** will accept a list of zero or more extensions (without the period). Files that match these extensions will be interpreted as belonging to the currently-selected UDL, and will be styled appropriately. These extensions override the default extensions for pre-defined **Languages**, so if your UDL's extension conflicts with another language's extension, the UDL will take priority.
28
30
29
-
Ivan Radić has created the definitive guide to the nuts and bolts of UDL version 2.1, which is available at [https://ivan-radic.github.io/udl-documentation/](https://ivan-radic.github.io/udl-documentation/). He explains the details of what each of the tabs in the **User Defined Language** dialog box will do, and how to use them to style your various keywords.
31
+
### UDL Configuration Tabs
32
+
33
+
Ivan Radić has created the definitive guide to the nuts and bolts of UDL version 2.1, which is available at [https://ivan-radic.github.io/udl-documentation/](). He explains the details of what each of the tabs in the **User Defined Language** dialog box will do, and how to use them to style your various keywords. However, these descriptions will give you an overview of what each tab is for.
34
+
35
+
* The **Folder & Default** tab allows setting the default style, setting up keywords (or characters) that will allow code folding, and setting up styles for those keywords. The **Open**, **Middle**, and **Close** boxes under each folding-type define the triggers for the start, middle, and end of folding. For example, with `if`, `else`, and `endif`, it will define fold regions so that you can fold from `if` to `else`, from `else` to `endif`, and (assuming there is no `else` clause) from `if` to `endif`. **Folding in comment** allows comments to include folding; **Folding in code 1 style** allows the triggers to be touching something else (so with a trigger of `{`, it will match `if{` or `if {`), whereas **Folding in code 2 style** requires there be whitespace around the trigger (so `if{` would _not_ match an **Open**-trigger of `{`).
36
+
37
+
* The **Keywords List** tab allows defining eight (8) different groups of keywords, so you can style different groups of words differently (like builtin functions vs. flow control keywords). Separate each keyword by a space (and that means that spaces are not allowed in keywords unless you put quotes around the phrase). If **☐ Prefix Mode** is enabled for a given group, that means that it will match anything that _starts_ with your string (so a keyword of `for` would match `for`, `forth`, and `format` if that option is enabled).
38
+
39
+
As a point of interest, you shouldn't have a given keyword in more than one keyword-group _or_ folder-group. If you want `if`/`else`/`endif` to cause block-folding, do not also put them in one of your keyword-groups.
40
+
41
+
* The **Comment & Number** tab allows setting styles for comments and for numbers.
42
+
***Line Comment Position** allows you to decide whether "line comments" can start anywhere on the line, must start at the beginning, or can only start after whitespace.
43
+
***☐ Allow folding of comments** will enable comments to be foldable.
44
+
***Comment line style** defines the style for "line comments" -- comments that proceed from the opening-trigger to the end of the line.
45
+
***Comment style** defines the style for multiline-comments.
46
+
***Number style** defines the style for numbers
47
+
... TODO ... how much detail to I want to replicate from Ivan here?
30
48
31
49
### Import a UDL
32
50
@@ -50,7 +68,8 @@ If you created or imported a UDL using the **User Defined Languages** dialog ins
0 commit comments