mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
Improve file detection with signature check capabilities
This allows more complex detection upon regex rules for a certain amount of lines.
This commit is contained in:
@@ -267,13 +267,13 @@ detect:
|
||||
```
|
||||
|
||||
Micro will match this regex against a given filename to detect the filetype.
|
||||
You may also provide an optional `header` regex that will check the first line
|
||||
of the file. For example:
|
||||
You may also provide an optional `signature` regex that will check a certain
|
||||
amount of lines of a file to find specific marks. For example:
|
||||
|
||||
```
|
||||
detect:
|
||||
filename: "\\.ya?ml$"
|
||||
header: "%YAML"
|
||||
signature: "%YAML"
|
||||
```
|
||||
|
||||
### Syntax rules
|
||||
|
||||
Reference in New Issue
Block a user