2019-08-31 14:32:37 +02:00
|
|
|
%YAML 1.2
|
|
|
|
---
|
|
|
|
# http://www.sublimetext.com/docs/3/syntax.html
|
|
|
|
name: Manpage
|
|
|
|
file_extensions:
|
|
|
|
- man
|
|
|
|
scope: source.man
|
|
|
|
|
|
|
|
variables:
|
|
|
|
section_heading: '^\S.*$'
|
|
|
|
|
|
|
|
contexts:
|
|
|
|
main:
|
|
|
|
- match: ^
|
|
|
|
push: first_line
|
|
|
|
|
|
|
|
first_line:
|
2019-09-22 16:16:45 +02:00
|
|
|
- match: '([A-Z0-9_\-]+)(\()([^)]+)(\))'
|
2019-08-31 14:32:37 +02:00
|
|
|
captures:
|
|
|
|
1: meta.preprocessor
|
|
|
|
2: keyword.operator
|
|
|
|
3: string.quoted.other
|
|
|
|
4: keyword.operator
|
|
|
|
|
|
|
|
- match: '$'
|
|
|
|
push: body
|
|
|
|
|
|
|
|
body:
|
|
|
|
- match: '^(SYNOPSIS|SYNTAX|SINTASSI|SKŁADNIA|СИНТАКСИС|書式)'
|
|
|
|
push: Packages/C/C.sublime-syntax
|
|
|
|
scope: markup.heading
|
|
|
|
with_prototype:
|
|
|
|
- match: '(?={{section_heading}})'
|
|
|
|
pop: true
|
|
|
|
|
|
|
|
- match: '^\S.*$'
|
|
|
|
scope: markup.heading
|
|
|
|
|
2019-11-04 20:14:07 +01:00
|
|
|
- match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))'
|
2019-08-31 14:32:37 +02:00
|
|
|
captures:
|
|
|
|
1: entity.name.function
|
|
|
|
2: keyword.operator
|
|
|
|
3: constant.numeric
|
|
|
|
4: keyword.operator
|
2019-11-04 20:37:27 +01:00
|
|
|
|
|
|
|
# command-line options like --option=value, --some-flag, or -x
|
|
|
|
- match: '(?:[^a-zA-Z0-9_-]|^|\s)(--?[A-Za-z0-9][A-Za-z0-9-]*)(?:(=)?("?)([A-Za-z0-9]+)("?))?'
|
|
|
|
captures:
|
|
|
|
1: entity.name
|
|
|
|
2: keyword.operator
|
|
|
|
3: punctuation.definition.string.begin
|
|
|
|
4: variable.parameter
|
|
|
|
3: punctuation.definition.string.end
|