Commit 3e1fc638 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

syntaxes: remove quotes from each syntax name, and color it differently

The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
No related merge requests found
Showing with 21 additions and 21 deletions
+21 -21
......@@ -3,7 +3,7 @@
## Original author: Matthew Wild <mwild1 (at) gmail.com>
## License: GPL 3 or later
syntax "lua" "\.lua$"
syntax lua "\.lua$"
magic "Lua script"
comment "--"
......
## Here is an example for Makefiles.
syntax "makefile" "Makefile[^/]*$" "\.(make|mk)$"
syntax makefile "Makefile[^/]*$" "\.(make|mk)$"
magic "makefile script"
comment "#"
......
## Here is an example for manpages.
syntax "man" "\.[1-9]x?$"
syntax man "\.[1-9]x?$"
magic "troff or preprocessor input"
comment ".\""
......
## Here is an example for Magicpoint presentations.
syntax "mgp" "\.mgp$"
syntax mgp "\.mgp$"
header "^%include.*"
comment "#"
......
## Here is an example for quoted emails (under e.g. mutt).
syntax "mutt"
syntax mutt
# Quoted lines.
color green "^>.*"
......
## This is meant for highlighting key combos in a nano help text.
# It should not apply to any normal file, so no fileregex.
syntax "nanohelp"
syntax nanohelp
# Key combos:
color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]" "(\^|M-)Space" "\<M-." "\<F1?[0-9]"
......
## Here is an example for nanorc files.
syntax "nanorc" "\.?nanorc$"
syntax nanorc "\.?nanorc$"
comment "#"
# Possible errors and parameters
......@@ -13,7 +13,7 @@ icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolo
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]0-9\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter|formatter)[[:space:]]+.*$"
icolor brightgreen "^[[:space:]]*(linter|formatter)[[:space:]]+[[:alpha:]]+"
icolor brightgreen "^[[:space:]]*(syntax|linter|formatter)[[:space:]]+[^[:blank:]]+"
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|extendsyntax)\>"
# Strings
......
## Here is an example for nftables.
syntax "nftables" "\.(nft|nftables)$"
syntax nftables "\.(nft|nftables)$"
header "^#!.*(nft|nftables)"
comment "#"
......
## Here is an example for C/C++/Obj-C.
syntax "m" "\.m$"
syntax m "\.m$"
magic "Objective-C source"
comment "//"
......
## Syntax highlighting for OCaml.
syntax "ocaml" "\.mli?$"
syntax ocaml "\.mli?$"
magic "OCaml"
comment "(*|*)"
......
## Here is an example for patch files.
syntax "patch" "\.(patch|diff|debdiff)$"
syntax patch "\.(patch|diff|debdiff)$"
magic "diff output"
# There is no official support for comments in patch files.
comment ""
......
## Here is an example for Perl.
syntax "perl" "\.p[lm]$"
syntax perl "\.p[lm]$"
header "^#!.*perl[-0-9._]*"
magic "Perl script"
comment "#"
......
## Here is an example for PHP.
syntax "php" "\.ph(p[23457s~]?|tml)$"
syntax php "\.ph(p[23457s~]?|tml)$"
magic "PHP script"
comment "//"
......
## Colouring for PO files.
syntax "po" "\.pot?$"
syntax po "\.pot?$"
comment "#"
# Comments.
......
## Here is an example for PostgreSQL.
syntax "sql" "\.sql[2345s~]?$"
syntax sql "\.sql[2345s~]?$"
comment "-- "
# Functions.
......
## Here is an example for POV-Ray.
syntax "pov" "\.(pov|POV|povray|POVRAY)$"
syntax pov "\.(pov|POV|povray|POVRAY)$"
comment "//"
color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
......
## Here is an example for Python.
syntax "python" "\.py$"
syntax python "\.py$"
header "^#!.*python[-0-9._]*"
magic "Python script"
linter pyflakes
......
## Here is an example for Ruby.
syntax "ruby" "\.rb$"
syntax ruby "\.rb$"
header "^#!.*ruby[-0-9._]*"
magic "Ruby script"
linter ruby -w -c
......
......@@ -4,7 +4,7 @@
## NOTE: Rules are applied in order: later rules re-colorize matching text.
syntax "rust" "\.rs"
syntax rust "\.rs"
comment "//"
# Function definitions
......
## Here is an example for Bourne shell scripts.
syntax "sh" "\.sh$"
syntax sh "\.sh$"
header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)"
magic "(POSIX|Bourne-Again) shell script.*text"
linter dash -n
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment