mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
help/colors: syntax: document default.yaml (#3262)
This commit is contained in:
@@ -395,3 +395,26 @@ example, the following is possible for html:
|
|||||||
|
|
||||||
Note that nested include (i.e. including syntax files that include other syntax
|
Note that nested include (i.e. including syntax files that include other syntax
|
||||||
files) is not supported yet.
|
files) is not supported yet.
|
||||||
|
|
||||||
|
### Default syntax highlighting
|
||||||
|
|
||||||
|
If micro cannot detect the filetype of the file, it falls back to using the
|
||||||
|
default syntax highlighting for it, which highlights just the bare minimum:
|
||||||
|
email addresses, URLs etc.
|
||||||
|
|
||||||
|
Just like in other cases, you can override the default highlighting by adding
|
||||||
|
your own custom `default.yaml` file to `~/.config/micro/syntax`.
|
||||||
|
|
||||||
|
For example, if you work with various config files that use the `#` sign to mark
|
||||||
|
the beginning of a comment, you can use the following custom `default.yaml` to
|
||||||
|
highlight those comments by default:
|
||||||
|
|
||||||
|
```
|
||||||
|
filetype: unknown
|
||||||
|
|
||||||
|
detect:
|
||||||
|
filename: ""
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- comment: "(^|\\s)#.*$"
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user