File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -395,3 +395,26 @@ example, the following is possible for html:
395395
396396Note that nested include (i.e. including syntax files that include other syntax
397397files) is not supported yet.
398+
399+ ### Default syntax highlighting
400+
401+ If micro cannot detect the filetype of the file, it falls back to using the
402+ default syntax highlighting for it, which highlights just the bare minimum:
403+ email addresses, URLs etc.
404+
405+ Just like in other cases, you can override the default highlighting by adding
406+ your own custom ` default.yaml ` file to ` ~/.config/micro/syntax ` .
407+
408+ For example, if you work with various config files that use the ` # ` sign to mark
409+ the beginning of a comment, you can use the following custom ` default.yaml ` to
410+ highlight those comments by default:
411+
412+ ```
413+ filetype: unknown
414+
415+ detect:
416+ filename: ""
417+
418+ rules:
419+ - comment: "(^|\\s)#.*$"
420+ ```
You can’t perform that action at this time.
0 commit comments