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 @@ ...@@ -3,7 +3,7 @@
## Original author: Matthew Wild <mwild1 (at) gmail.com> ## Original author: Matthew Wild <mwild1 (at) gmail.com>
## License: GPL 3 or later ## License: GPL 3 or later
syntax "lua" "\.lua$" syntax lua "\.lua$"
magic "Lua script" magic "Lua script"
comment "--" comment "--"
......
## Here is an example for Makefiles. ## Here is an example for Makefiles.
syntax "makefile" "Makefile[^/]*$" "\.(make|mk)$" syntax makefile "Makefile[^/]*$" "\.(make|mk)$"
magic "makefile script" magic "makefile script"
comment "#" comment "#"
......
## Here is an example for manpages. ## Here is an example for manpages.
syntax "man" "\.[1-9]x?$" syntax man "\.[1-9]x?$"
magic "troff or preprocessor input" magic "troff or preprocessor input"
comment ".\"" comment ".\""
......
## Here is an example for Magicpoint presentations. ## Here is an example for Magicpoint presentations.
syntax "mgp" "\.mgp$" syntax mgp "\.mgp$"
header "^%include.*" header "^%include.*"
comment "#" comment "#"
......
## Here is an example for quoted emails (under e.g. mutt). ## Here is an example for quoted emails (under e.g. mutt).
syntax "mutt" syntax mutt
# Quoted lines. # Quoted lines.
color green "^>.*" color green "^>.*"
......
## This is meant for highlighting key combos in a nano help text. ## This is meant for highlighting key combos in a nano help text.
# It should not apply to any normal file, so no fileregex. # It should not apply to any normal file, so no fileregex.
syntax "nanohelp" syntax nanohelp
# Key combos: # Key combos:
color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]" "(\^|M-)Space" "\<M-." "\<F1?[0-9]" color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]" "(\^|M-)Space" "\<M-." "\<F1?[0-9]"
......
## Here is an example for nanorc files. ## Here is an example for nanorc files.
syntax "nanorc" "\.?nanorc$" syntax nanorc "\.?nanorc$"
comment "#" comment "#"
# Possible errors and parameters # Possible errors and parameters
...@@ -13,7 +13,7 @@ icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolo ...@@ -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:]]*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:]]*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:]]*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)\>" icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|formatter|extendsyntax)\>"
# Strings # Strings
......
## Here is an example for nftables. ## Here is an example for nftables.
syntax "nftables" "\.(nft|nftables)$" syntax nftables "\.(nft|nftables)$"
header "^#!.*(nft|nftables)" header "^#!.*(nft|nftables)"
comment "#" comment "#"
......
## Here is an example for C/C++/Obj-C. ## Here is an example for C/C++/Obj-C.
syntax "m" "\.m$" syntax m "\.m$"
magic "Objective-C source" magic "Objective-C source"
comment "//" comment "//"
......
## Syntax highlighting for OCaml. ## Syntax highlighting for OCaml.
syntax "ocaml" "\.mli?$" syntax ocaml "\.mli?$"
magic "OCaml" magic "OCaml"
comment "(*|*)" comment "(*|*)"
......
## Here is an example for patch files. ## Here is an example for patch files.
syntax "patch" "\.(patch|diff|debdiff)$" syntax patch "\.(patch|diff|debdiff)$"
magic "diff output" magic "diff output"
# There is no official support for comments in patch files. # There is no official support for comments in patch files.
comment "" comment ""
......
## Here is an example for Perl. ## Here is an example for Perl.
syntax "perl" "\.p[lm]$" syntax perl "\.p[lm]$"
header "^#!.*perl[-0-9._]*" header "^#!.*perl[-0-9._]*"
magic "Perl script" magic "Perl script"
comment "#" comment "#"
......
## Here is an example for PHP. ## Here is an example for PHP.
syntax "php" "\.ph(p[23457s~]?|tml)$" syntax php "\.ph(p[23457s~]?|tml)$"
magic "PHP script" magic "PHP script"
comment "//" comment "//"
......
## Colouring for PO files. ## Colouring for PO files.
syntax "po" "\.pot?$" syntax po "\.pot?$"
comment "#" comment "#"
# Comments. # Comments.
......
## Here is an example for PostgreSQL. ## Here is an example for PostgreSQL.
syntax "sql" "\.sql[2345s~]?$" syntax sql "\.sql[2345s~]?$"
comment "-- " comment "-- "
# Functions. # Functions.
......
## Here is an example for POV-Ray. ## Here is an example for POV-Ray.
syntax "pov" "\.(pov|POV|povray|POVRAY)$" syntax pov "\.(pov|POV|povray|POVRAY)$"
comment "//" comment "//"
color brightcyan "^[[:space:]]*#[[:space:]]*(declare)" color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
......
## Here is an example for Python. ## Here is an example for Python.
syntax "python" "\.py$" syntax python "\.py$"
header "^#!.*python[-0-9._]*" header "^#!.*python[-0-9._]*"
magic "Python script" magic "Python script"
linter pyflakes linter pyflakes
......
## Here is an example for Ruby. ## Here is an example for Ruby.
syntax "ruby" "\.rb$" syntax ruby "\.rb$"
header "^#!.*ruby[-0-9._]*" header "^#!.*ruby[-0-9._]*"
magic "Ruby script" magic "Ruby script"
linter ruby -w -c linter ruby -w -c
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
## NOTE: Rules are applied in order: later rules re-colorize matching text. ## NOTE: Rules are applied in order: later rules re-colorize matching text.
syntax "rust" "\.rs" syntax rust "\.rs"
comment "//" comment "//"
# Function definitions # Function definitions
......
## Here is an example for Bourne shell scripts. ## 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)" header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)"
magic "(POSIX|Bourne-Again) shell script.*text" magic "(POSIX|Bourne-Again) shell script.*text"
linter dash -n 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