made the pack completely portable and wrote relevent bat files to go with it
This commit is contained in:
24
gitportable/usr/share/nano/asm.nanorc
Normal file
24
gitportable/usr/share/nano/asm.nanorc
Normal file
@@ -0,0 +1,24 @@
|
||||
## Syntax highlighting for assembler.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax asm "\.(S|s|asm)$"
|
||||
magic "assembler source"
|
||||
comment "//"
|
||||
|
||||
color red "\<[A-Z_]{2,}\>"
|
||||
color brightgreen "\.(data|subsection|text)\>"
|
||||
color green "\.(align|file|globl|global|hidden|section|size|type|weak)\>"
|
||||
color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)\>"
|
||||
color brightred "^[[:blank:]]*[.0-9A-Za-z_]*:"
|
||||
color brightcyan "^[[:blank:]]*#[[:blank:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)\>"
|
||||
|
||||
# Strings and names of included files.
|
||||
color brightyellow ""([^"\]|\\.)*"|<[^= ]*>"
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
35
gitportable/usr/share/nano/autoconf.nanorc
Normal file
35
gitportable/usr/share/nano/autoconf.nanorc
Normal file
@@ -0,0 +1,35 @@
|
||||
## Syntax highlighting for Autoconf.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax autoconf "\.(ac|m4)$"
|
||||
comment "#"
|
||||
|
||||
# Keywords:
|
||||
color yellow "\<(if|test|then|elif|else|fi|case|esac|ifelse|for|in|do|done)\>"
|
||||
color yellow "=|!=|&&|\|\|"
|
||||
|
||||
# Macros:
|
||||
color cyan "\<[[:upper:]_[:digit:]]+\>"
|
||||
|
||||
# Version numbers:
|
||||
color red "\<[-_.0-9]+\>"
|
||||
|
||||
# Strings:
|
||||
color red ""[^"]*"|'[^']*'"
|
||||
|
||||
# Backticks:
|
||||
color green "`[^`]*`"
|
||||
|
||||
# Error lines:
|
||||
color brightred "^[[:blank:]]*\*\*\*.*"
|
||||
|
||||
# Brackets:
|
||||
color magenta "\[|\]|\(|\)"
|
||||
|
||||
# Comments:
|
||||
color blue "^[[:blank:]]*#.*" "\<dnl.*"
|
||||
|
||||
# Trailing whitespace:
|
||||
color ,green "[[:space:]]+$"
|
||||
41
gitportable/usr/share/nano/awk.nanorc
Normal file
41
gitportable/usr/share/nano/awk.nanorc
Normal file
@@ -0,0 +1,41 @@
|
||||
## Syntax highlighting for AWK scripts.
|
||||
|
||||
## Original author: Donnie Berkholz
|
||||
|
||||
syntax awk "\.awk$"
|
||||
header "^#!.*awk"
|
||||
magic "awk script"
|
||||
comment "#"
|
||||
|
||||
# Records.
|
||||
color brightred "\$[0-9A-Za-z_!@#$*?-]+"
|
||||
# Awk-set variables.
|
||||
color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
|
||||
color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
|
||||
color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
|
||||
# Function declarations and special patterns.
|
||||
color brightgreen "\<(function|extension|BEGIN|END)\>"
|
||||
# Operators and brackets/braces/slashes/parentheses.
|
||||
color green "[][!%&()*+/:;<=>?\^{|}~-]"
|
||||
# Flow control.
|
||||
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
|
||||
color brightyellow "\<(break|continue|return)\>"
|
||||
# I/O statements.
|
||||
color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>"
|
||||
# Standard functions.
|
||||
color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
|
||||
color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
|
||||
color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
|
||||
color magenta "\<(mktime|strftime|systime)\>"
|
||||
color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
|
||||
color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
|
||||
|
||||
# Strings.
|
||||
color brightyellow ""([^"\]|\\.)*""
|
||||
# Escape sequences.
|
||||
color brick "\\([abfnrtv\/"]|[0-7]{1,3}|x[[:xdigit:]]{1,2}|u[[:xdigit:]]{1,8})"
|
||||
# Comments.
|
||||
color brightblue "(^|[[:blank:]])#.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
46
gitportable/usr/share/nano/c.nanorc
Normal file
46
gitportable/usr/share/nano/c.nanorc
Normal file
@@ -0,0 +1,46 @@
|
||||
## Syntax highlighting for C and C++ files.
|
||||
|
||||
syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$"
|
||||
header "-\*-.*\<C(\+\+)?((;|[[:blank:]]).*)?-\*-"
|
||||
magic "^(C|C\+\+) (source|program)"
|
||||
comment "//"
|
||||
|
||||
# Constants.
|
||||
color brightred "\<[A-Z_][0-9A-Z_]*\>"
|
||||
# Labels.
|
||||
color brightmagenta "^[[:blank:]]*[A-Z_a-z][0-9A-Z_a-z]*:[[:blank:]]*$"
|
||||
color normal ":[[:blank:]]*$"
|
||||
|
||||
# Types and related keywords.
|
||||
color green "\<(auto|bool|char|const|double|enum|extern|float|inline|int|long|restrict|short|signed|sizeof|static|struct|typedef|union|unsigned|void)\>"
|
||||
color green "\<([[:lower:]][[:lower:]_]*|(u_?)?int(8|16|32|64))_t\>"
|
||||
color green "\<(_(Alignas|Alignof|Atomic|Bool|Complex|Generic|Imaginary|Noreturn|Static_assert|Thread_local))\>"
|
||||
color green "\<(class|explicit|friend|mutable|namespace|override|private|protected|public|register|template|this|typename|using|virtual|volatile)\>"
|
||||
|
||||
# Flow control.
|
||||
color brightyellow "\<(if|else|for|while|do|switch|case|default)\>"
|
||||
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color magenta "\<(break|continue|goto|return)\>"
|
||||
|
||||
# Single-quoted stuff (characters, backslash escapes, hex and octal byte codes).
|
||||
color brightmagenta "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'"
|
||||
|
||||
# GCC builtins.
|
||||
color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
# Strings and names of included files.
|
||||
color brightyellow ""([^"]|\\")*"|#[[:blank:]]*include[[:blank:]]*<[^>]+>"
|
||||
|
||||
# Preprocessor directives.
|
||||
color brightcyan start="^[[:blank:]]*#[[:blank:]]*(if(n?def)?|elif|warning|error|pragma)\>" end="(\`|[^\])$"
|
||||
color brightcyan "^[[:blank:]]*#[[:blank:]]*((define|else|endif|include(_next)?|line|undef)\>|$)"
|
||||
|
||||
# Comments.
|
||||
color brightblue "//[^"]*$|(^|[[:blank:]])//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Reminders.
|
||||
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
31
gitportable/usr/share/nano/changelog.nanorc
Normal file
31
gitportable/usr/share/nano/changelog.nanorc
Normal file
@@ -0,0 +1,31 @@
|
||||
## Syntax highlighting for Changelogs.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax changelog "Change[Ll]og[^/]*$"
|
||||
|
||||
# Author lines.
|
||||
color green "^(19|20).*"
|
||||
# Dates.
|
||||
color red "^(19|20)[0-9-]{8}"
|
||||
# Email addresses.
|
||||
color yellow "<[^>]*@[^>]*>"
|
||||
|
||||
# Command-line options.
|
||||
color cyan "[[:blank:]]-[a-zA-Z\$]|--[8a-z-]+"
|
||||
# Bug and patch numbers.
|
||||
color cyan "(BZ|bug|patch)[ ]#[0-9]+|PR [[:alnum:]]+/[0-9]+"
|
||||
# Probable constants, for variety.
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
# Key sequences.
|
||||
color brightblue "\^[A-Z^\]|\<M-.|\<F1?[0-9]|(\^|M-)Space"
|
||||
|
||||
# Changed files.
|
||||
color magenta start="^( | {8})\* " end="(:( |$)|^$)"
|
||||
|
||||
# Release markers.
|
||||
color brightblue "^(GNU )?nano[- ][0-9]\.[0-9]\.[^ ]+"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
24
gitportable/usr/share/nano/cmake.nanorc
Normal file
24
gitportable/usr/share/nano/cmake.nanorc
Normal file
@@ -0,0 +1,24 @@
|
||||
## Syntax highlighting for CMake files.
|
||||
|
||||
## Original author: Felipe Bugno
|
||||
|
||||
syntax cmake "(CMakeLists\.txt|\.cmake)$"
|
||||
comment "#"
|
||||
|
||||
color green "^[[:blank:]]*[0-9A-Za-z_]+"
|
||||
icolor brightyellow "^[[:blank:]]*(include|include_directories|include_external_msproject)\>"
|
||||
|
||||
icolor brightgreen "^[[:blank:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
|
||||
color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:blank:]]"
|
||||
color brightgreen "[[:blank:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:blank:]]"
|
||||
|
||||
icolor brightred "^[[:blank:]]*((end)?(function|macro)|return)"
|
||||
|
||||
icolor cyan start="\$(ENV)?\{" end="\}"
|
||||
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
|
||||
|
||||
# Comments.
|
||||
color brightblue "(^|[[:blank:]])#.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
22
gitportable/usr/share/nano/css.nanorc
Normal file
22
gitportable/usr/share/nano/css.nanorc
Normal file
@@ -0,0 +1,22 @@
|
||||
## Syntax highlighting for CSS files.
|
||||
|
||||
## Original author: Simon Rupf
|
||||
|
||||
syntax css "\.css$"
|
||||
comment "/*|*/"
|
||||
|
||||
# First make everything red:
|
||||
color brightred "."
|
||||
# Then everything between braces yellow:
|
||||
color brightyellow start="\{" end="\}"
|
||||
# Then everything after a colon white:
|
||||
color brightwhite start=":" end="([;^{]|$)"
|
||||
|
||||
# Pseudo-classes:
|
||||
color brightcyan ":(active|checked|focus|hover|link|visited|after|before)\>"
|
||||
|
||||
# Comments:
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Syntactic characters:
|
||||
color green ";|:|\{|\}"
|
||||
30
gitportable/usr/share/nano/default.nanorc
Normal file
30
gitportable/usr/share/nano/default.nanorc
Normal file
@@ -0,0 +1,30 @@
|
||||
## This is an example of a default syntax. The default syntax is used for
|
||||
## files that do not match any other syntax.
|
||||
|
||||
syntax default
|
||||
comment "#"
|
||||
|
||||
# Spaces in front of tabs.
|
||||
color ,red " + +"
|
||||
|
||||
# Nano's release motto, then name plus version.
|
||||
color italic,lime "\<[Nn]ano [1-8]\.[0-9][-.[:alnum:]]* "[^"]+""
|
||||
color brightred "\<(GNU )?[Nn]ano [1-8]\.[0-9][-.[:alnum:]]*\>"
|
||||
|
||||
# Dates
|
||||
color latte "\<[12][0-9]{3}\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\>"
|
||||
|
||||
# Email addresses.
|
||||
color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>"
|
||||
|
||||
# URLs.
|
||||
color lightblue "\<https?://\S+\.\S+[^])>[:space:],.]"
|
||||
|
||||
# Bracketed captions in certain config files.
|
||||
color brightgreen "^\[[^][]+\]$"
|
||||
|
||||
# Comments.
|
||||
color cyan "^[[:blank:]]*#.*"
|
||||
|
||||
# Control codes.
|
||||
color orange "[[:cntrl:]]"
|
||||
35
gitportable/usr/share/nano/elisp.nanorc
Normal file
35
gitportable/usr/share/nano/elisp.nanorc
Normal file
@@ -0,0 +1,35 @@
|
||||
## Syntax highlighting for Emacs Lisp.
|
||||
|
||||
## Original author: Mark Oteiza
|
||||
|
||||
syntax elisp "\.el$"
|
||||
magic "Lisp/Scheme program"
|
||||
comment ";"
|
||||
|
||||
# Basic functions/macros
|
||||
color brightcyan "\<(if|when|unless|cond|and|or|lambda|let|progn|while|dolist|dotimes)\>"
|
||||
color brightcyan "\<save-((window-)?excursion|restriction)\>"
|
||||
color brightcyan "\<eval-(and|when)-compile\>"
|
||||
# Defining functions
|
||||
color brightcyan "\<def(un|macro|subst|generic|alias)\>"
|
||||
color brightcyan "\<cl-def(un|macro|subst|generic|struct|type)\>"
|
||||
color brightcyan "\<define-(derived|minor|generic)-mode\>"
|
||||
# Defining variables
|
||||
color brightcyan "\<def(class|const|var(-local|alias)?)\>"
|
||||
# Customization functions
|
||||
color brightcyan "\<def(custom|face|group|theme)\>"
|
||||
# Setting values
|
||||
color brightcyan "\<(setq(-default|-local)?|setf|push|pop|declare(-function)?)\>"
|
||||
# Feature functions
|
||||
color brightcyan "\<(require|provide)\>"
|
||||
# Quoted symbols
|
||||
color brightyellow "#?'\<(\w|-)+\>"
|
||||
# Booleans
|
||||
color brightred "\<(t|nil)\>"
|
||||
# Keywords
|
||||
color blue ":(\w|[?-])+"
|
||||
# Strings
|
||||
color yellow start="^[[:blank:]]+"" end="[^\]""
|
||||
color yellow ""([^"\]|\\.)*""
|
||||
# Comments
|
||||
color cyan "(^|[[:blank:]]);.*"
|
||||
17
gitportable/usr/share/nano/email.nanorc
Normal file
17
gitportable/usr/share/nano/email.nanorc
Normal file
@@ -0,0 +1,17 @@
|
||||
## Syntax highlighting for emails.
|
||||
|
||||
syntax email "\.eml$"
|
||||
|
||||
# Quoted lines.
|
||||
color green "^>.*"
|
||||
color cyan "^> ?>.*"
|
||||
color yellow "^> ?> ?>.*"
|
||||
|
||||
# Email addresses.
|
||||
color brightmagenta "<[^@]+@[^@]+>"
|
||||
|
||||
# URLs.
|
||||
color brightblue "(https?|ftp)://\S+\.\S+[^[:space:].)]"
|
||||
|
||||
# Signatures, even quoted ones.
|
||||
color yellow start="^>* ?-- $" end="^>* ?$"
|
||||
39
gitportable/usr/share/nano/extra/ada.nanorc
Normal file
39
gitportable/usr/share/nano/extra/ada.nanorc
Normal file
@@ -0,0 +1,39 @@
|
||||
## Syntax highlighting for Ada.
|
||||
|
||||
## Original author: Andreas K. Foerster
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
## Language reference: http://www.ada-auth.org/standards/12rm/html/RM-TTL.html
|
||||
|
||||
syntax ada "\.ad[abcs]$"
|
||||
comment "--"
|
||||
|
||||
# This linter command leaves an ALI file in the working directory.
|
||||
linter gcc -c -gnatc
|
||||
|
||||
# Reserved Words (RM 2.9)
|
||||
icolor yellow "\<(abort|abs|abstract|accept|access|aliased|all|and|array|at)\>"
|
||||
icolor yellow "\<(begin|body|case|constant|declare|delay|delta|do)\>"
|
||||
icolor yellow "\<(else|elsif|end|entry|exception|exit|for|function|generic|goto)\>"
|
||||
icolor yellow "\<(if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding)\>"
|
||||
icolor yellow "\<(package|pragma|private|procedure|protected|raise|range|record|rem|renames)\>"
|
||||
icolor yellow "\<(requeue|return|reverse|select|separate|some|subtype|synchronized)\>"
|
||||
icolor yellow "\<(tagged|task|terminate|then|type|until|use|when|while|with|xor)\>"
|
||||
|
||||
# Separators / Operators
|
||||
color magenta "'|&|\*|\+|\-|\.|\,|\/|:|;|\(|\)|<|>|\||="
|
||||
|
||||
# Attributes
|
||||
color cyan "'[[:alnum:]]+"
|
||||
|
||||
# Numbers (RM 2.4)
|
||||
color green "\<[0-9][0-9A-Fa-f_#.+-]*"
|
||||
|
||||
# Characters / Strings
|
||||
color red "'.'|"[^"]*""
|
||||
|
||||
# Comments
|
||||
color brightblue "--.*"
|
||||
|
||||
# Trailing whitespace
|
||||
color ,blue "[[:space:]]+$"
|
||||
42
gitportable/usr/share/nano/extra/fortran.nanorc
Normal file
42
gitportable/usr/share/nano/extra/fortran.nanorc
Normal file
@@ -0,0 +1,42 @@
|
||||
## Syntax highlighting for Fortran 90/95.
|
||||
|
||||
## Original author: Pascal Gentil
|
||||
|
||||
syntax fortran "\.(f|for|f90|f95)$"
|
||||
comment "!"
|
||||
|
||||
color red "\<[0-9]+\>"
|
||||
|
||||
icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
|
||||
icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
|
||||
icolor green "\<(complex|data|default|delim|dimension|double precision)\>"
|
||||
icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>"
|
||||
icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>"
|
||||
icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)\>"
|
||||
icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
|
||||
icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
|
||||
icolor green "\<(selected_real_kind|subroutine|status)\>"
|
||||
|
||||
icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
|
||||
icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
|
||||
icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
|
||||
icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
|
||||
icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
|
||||
icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
|
||||
icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
|
||||
icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
|
||||
icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
|
||||
icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
|
||||
icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
|
||||
|
||||
icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
|
||||
icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>"
|
||||
icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
|
||||
|
||||
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
|
||||
|
||||
# Strings.
|
||||
color yellow ""([^"\]|\\.)*""
|
||||
|
||||
# Comments.
|
||||
color blue "!.*"
|
||||
40
gitportable/usr/share/nano/extra/haskell.nanorc
Normal file
40
gitportable/usr/share/nano/extra/haskell.nanorc
Normal file
@@ -0,0 +1,40 @@
|
||||
## Syntax highlighting for Haskell files.
|
||||
|
||||
## Original author: Alex Taber
|
||||
## License: GPL version 3
|
||||
|
||||
syntax "haskell" "\.hs$"
|
||||
comment "--"
|
||||
|
||||
# Keywords
|
||||
color red "\<(as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix(l|r)?|instance|let|in|mdo|module|newtype|qualified|type|where)\>"
|
||||
|
||||
# Various symbols
|
||||
color cyan "\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\}"
|
||||
|
||||
# Operators
|
||||
color magenta "==|/=|&&|\|\||<|>|<=|>="
|
||||
|
||||
# More symbols
|
||||
color cyan "->|<-|=>"
|
||||
color magenta "\.|\$"
|
||||
|
||||
# Data constructors
|
||||
color magenta "\<(True|False|Nothing|Just|Left|Right|LT|EQ|GT)\>"
|
||||
# Data classes
|
||||
color magenta "\<(Bounded|Data|Enum|Eq|Floating|Fractional|Functor|Integral|Monad|MonadPlus|Num|Ord|Read|Real|RealFloat|RealFrac|Show|Typeable)\>"
|
||||
|
||||
# Special keyword
|
||||
color brightred "undefined"
|
||||
|
||||
# Strings
|
||||
color yellow ""([^"\]|\\.)*""
|
||||
# Characters
|
||||
color brightyellow "'([^'\]|\\.)'"
|
||||
|
||||
# Comments
|
||||
color green "--.*"
|
||||
color green start="\{-" end="-\}"
|
||||
|
||||
# Trailing whitespace
|
||||
color ,green "[[:space:]]+$"
|
||||
18
gitportable/usr/share/nano/extra/povray.nanorc
Normal file
18
gitportable/usr/share/nano/extra/povray.nanorc
Normal file
@@ -0,0 +1,18 @@
|
||||
## Syntax highlighting for POV-Ray files.
|
||||
|
||||
## Original author: Donnie Berkholz
|
||||
|
||||
syntax pov "\.(pov|POV|povray|POVRAY)$"
|
||||
comment "//"
|
||||
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
|
||||
color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>"
|
||||
color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>"
|
||||
color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>"
|
||||
color brightred "\<(background|camera|fog|light_source|object|texture)\>"
|
||||
color green "\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|"
|
||||
color brightmagenta "\<(union|group|subgroup)\>"
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
45
gitportable/usr/share/nano/extra/spec.nanorc
Normal file
45
gitportable/usr/share/nano/extra/spec.nanorc
Normal file
@@ -0,0 +1,45 @@
|
||||
## Syntax highlighting for RPM spec files.
|
||||
|
||||
## Original author: Asterios Dramis
|
||||
|
||||
syntax spec "\.spec(\.[^/]+)?$"
|
||||
comment "#"
|
||||
|
||||
# Main tags.
|
||||
color brightblue "\<(Name|Version|Release|Summary|Group|URL|Url|Epoch|Icon|Serial)[[:space:]]*:"
|
||||
color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:"
|
||||
color brightblue "\<(Provides|Requires(\(.*\))?|Obsoletes|Conflicts|Recommends|Suggests|Supplements|Enhances|PreReq)[[:space:]]*:"
|
||||
color brightblue "\<(BuildRoot|BuildRequires|BuildConflicts|Prefix|RemovePathPostfixes)[[:space:]]*:"
|
||||
color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:"
|
||||
color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:"
|
||||
color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:"
|
||||
# Architectures.
|
||||
color brightred "\<((a|loong)arch64|alpha(ev(56?|67?)|pca56)?|amd64|armv(3l|4b|4l|5t(ej?)?l|6h?l|7(hn?)?l|8h?l)|athlon|em64t|geode|i370|i(3|4|5|6)86|ia32e|ia64|m68k(mint)?|mips(64)?(el|r6|r6el)?)\>"
|
||||
color brightred "\<(pentium(3|4)|ppc(32dy4|8260|8560)?|ppc64(le|p7)?|ppc(64)?(i|p)series|riscv64|rs6000|s390x?|sgi|sh(3|4|4a)?|sparc(64v?|v8|v9v?)?|x86_64(_v2|_v3|_v4)?|xtensa)\>"
|
||||
|
||||
# Architecture and OS conditionals.
|
||||
color brightred "%(ifarch|elifarch|ifnarch|ifos|elifos|ifnos)\>"
|
||||
# %* strings.
|
||||
color green "%([A-Z_a-z_0-9_]*)"
|
||||
color magenta "%_([A-Z_a-z_0-9_]*)"
|
||||
color yellow start="%__" end="\ "
|
||||
color magenta start="%\{" end="\}"
|
||||
color yellow start="%\{__" end="\}"
|
||||
# Sections.
|
||||
color red "^%((prep|build|install|check|clean)$|(description|files|package|changelog)\>)"
|
||||
color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?)\>"
|
||||
color red "^%(trans)?filetrigger(in|un|postun)\>"
|
||||
color red "^%(sourcelist|patchlist|generate_buildrequires|verifyscript)\>"
|
||||
# Conditionals and defines.
|
||||
color brightred "%(if|elif|else|endif|define|global|undefine)\>"
|
||||
|
||||
# Comments.
|
||||
color cyan "(#|%dnl[[:space:]]).*"
|
||||
# Special case: "# norootforbuild" is handled as main tag.
|
||||
color brightblue "^# norootforbuild"
|
||||
# For %changelog entries: first the author, then just the date.
|
||||
color yellow "^\* .+>"
|
||||
color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} "
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
80
gitportable/usr/share/nano/git.nanorc
Normal file
80
gitportable/usr/share/nano/git.nanorc
Normal file
@@ -0,0 +1,80 @@
|
||||
syntax "git-config" "git(config|modules)$|\.git/config$"
|
||||
|
||||
color brightcyan "\<(true|false)\>"
|
||||
color cyan "^[[:space:]]*[^=]*="
|
||||
color brightmagenta "^[[:space:]]*\[.*\]$"
|
||||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
color brightblack "(^|[[:space:]])#([^{].*)?$"
|
||||
color ,green "[[:space:]]+$"
|
||||
color ,red " +"
|
||||
|
||||
# This code is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the new BSD License.
|
||||
#
|
||||
# Copyright (c) 2010, Sebastian Staudt
|
||||
|
||||
# A nano configuration file to enable syntax highlighting of some Git specific
|
||||
# files with the GNU nano text editor (http://www.nano-editor.org)
|
||||
#
|
||||
syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||
|
||||
# Commit message
|
||||
color yellow ".*"
|
||||
|
||||
# Comments
|
||||
color brightblack "^#.*"
|
||||
|
||||
# Files changes
|
||||
color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
||||
color red "#[[:space:]]deleted:"
|
||||
color green "#[[:space:]]modified:"
|
||||
color brightgreen "#[[:space:]]new file:"
|
||||
color brightblue "#[[:space:]]renamed:"
|
||||
|
||||
# Untracked filenames
|
||||
color black "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$"
|
||||
|
||||
color brightmagenta "^#[[:space:]]Changes.*[:]"
|
||||
color brightred "^#[[:space:]]Your branch and '[^']+"
|
||||
color brightblack "^#[[:space:]]Your branch and '"
|
||||
color brightwhite "^#[[:space:]]On branch [^ ]+"
|
||||
color brightblack "^#[[:space:]]On branch"
|
||||
|
||||
# Recolor hash symbols
|
||||
|
||||
# Recolor hash symbols
|
||||
color brightblack "#"
|
||||
|
||||
# Trailing spaces (+LINT is not ok, git uses tabs)
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
|
||||
# This syntax format is used for interactive rebasing
|
||||
syntax "git-rebase-todo" "git-rebase-todo"
|
||||
|
||||
# Default
|
||||
color yellow ".*"
|
||||
|
||||
# Comments
|
||||
color brightblack "^#.*"
|
||||
|
||||
# Rebase commands
|
||||
color green "^(e|edit) [0-9a-f]{7,40}"
|
||||
color green "^# (e, edit)"
|
||||
color brightgreen "^(f|fixup) [0-9a-f]{7,40}"
|
||||
color brightgreen "^# (f, fixup)"
|
||||
color brightwhite "^(p|pick) [0-9a-f]{7,40}"
|
||||
color brightwhite "^# (p, pick)"
|
||||
color blue "^(r|reword) [0-9a-f]{7,40}"
|
||||
color blue "^# (r, reword)"
|
||||
color brightred "^(s|squash) [0-9a-f]{7,40}"
|
||||
color brightred "^# (s, squash)"
|
||||
color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
|
||||
color yellow "^# (x, exec)"
|
||||
|
||||
# Recolor hash symbols
|
||||
color brightblack "#"
|
||||
|
||||
# Commit IDs
|
||||
color brightblue "[0-9a-f]{7,40}"
|
||||
|
||||
48
gitportable/usr/share/nano/go.nanorc
Normal file
48
gitportable/usr/share/nano/go.nanorc
Normal file
@@ -0,0 +1,48 @@
|
||||
## Syntax highlighting for Go.
|
||||
|
||||
## Original author: Robert Clausecker
|
||||
## License: CC0 (public domain)
|
||||
|
||||
syntax go "\.go$"
|
||||
comment "//"
|
||||
|
||||
formatter gofmt -w
|
||||
|
||||
# Types.
|
||||
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
|
||||
color green "\<(chan|const|func|interface|map|struct|type|var)\>"
|
||||
color green "<-[[:blank:]]*chan\>|\<chan[[:blank:]]*<-"
|
||||
|
||||
# Predefined functions.
|
||||
color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>"
|
||||
|
||||
# Control structures.
|
||||
color brightyellow "\<(case|default|defer|else|for|go|if|range|select|switch)\>"
|
||||
|
||||
# Control flow.
|
||||
color magenta "\<(break|continue|fallthrough|goto|return)\>"
|
||||
|
||||
# Declarations.
|
||||
color brightcyan "\<(package|import)\>"
|
||||
|
||||
# Literals.
|
||||
color red "\<(true|false|nil|iota|_)\>"
|
||||
color red "\<([1-9][0-9]*|0[0-7]*|0[xX][[:xdigit:]]+)\>"
|
||||
color red "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?i?\>"
|
||||
color red "\<[0-9]+[eE][+-]?[0-9]+i?\>"
|
||||
color red "\B\.[0-9]+([eE][+-]?[0-9]+)?i?\>"
|
||||
color red "\<[0-9]+i\>"
|
||||
|
||||
# Strings and characters; slightly fuzzy.
|
||||
color red ""([^"\]|\\.)*"|'([^'\]|\\.)+'"
|
||||
color red start=""([^"\]|\\.)*\\[[:blank:]]*$" end="^([^"\]|\\.)*""
|
||||
|
||||
# Comments.
|
||||
color brightblue "//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Special comments.
|
||||
color brightcyan "//[[:blank:]]*\+build[[:blank:]]+(([a-zA-Z_0-9]+[[:blank:]]*)+,[[:blank:]]*)*[a-zA-Z_0-9]+"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
28
gitportable/usr/share/nano/groff.nanorc
Normal file
28
gitportable/usr/share/nano/groff.nanorc
Normal file
@@ -0,0 +1,28 @@
|
||||
## Syntax highlighting for groff.
|
||||
|
||||
## Original author: Robert D. Goulding
|
||||
|
||||
syntax groff "\.(me|mm|mom|ms|roff|tmac)$|/tmac\.[^/]+$"
|
||||
comment ".\""
|
||||
|
||||
# The setting of a string or register
|
||||
color cyan "^\.(ds|nr) [^[:space:]]*"
|
||||
# Single-character escapes
|
||||
color brightmagenta "\\."
|
||||
# The argument of \f or \s in the same color
|
||||
color brightmagenta "\\f(.|\(..)|\\s(\+|\-)?[0-9]"
|
||||
# References to registers
|
||||
color cyan "\\(\\)?n(.|\(..)"
|
||||
color cyan start="\\(\\)?n\[" end="]"
|
||||
# Requests
|
||||
color brightgreen "^\.[[:blank:]]*[^[:space:]]*"
|
||||
# Comments
|
||||
color yellow "^\.\\".*"
|
||||
# References to strings
|
||||
color green "\\(\\)?\*(.|\(..)"
|
||||
color green start="\\(\\)?\*\[" end="]"
|
||||
# Special characters
|
||||
color brightred "\\\(.."
|
||||
color brightred start="\\\[" end="]"
|
||||
# Macro arguments
|
||||
color brightcyan "\\\\\$[1-9]"
|
||||
25
gitportable/usr/share/nano/guile.nanorc
Normal file
25
gitportable/usr/share/nano/guile.nanorc
Normal file
@@ -0,0 +1,25 @@
|
||||
## Syntax highlighting for Guile Scheme.
|
||||
|
||||
## Original author: Mark Oteiza
|
||||
|
||||
syntax guile "\.scm$"
|
||||
header "^#!.*guile"
|
||||
comment ";"
|
||||
|
||||
# Basic scheme functions
|
||||
color green "\<(do|if|lambda|let(rec)?|map|unless|when)\>"
|
||||
# Defining things
|
||||
color brightcyan "\<define(-macro|-module|-public|-syntax)?\>"
|
||||
# Quoted symbols
|
||||
color brightyellow "'\<(\w|-)+\>"
|
||||
# Chars
|
||||
color brightmagenta "#\\(.|\w+)"
|
||||
# Booleans
|
||||
color brightred "(#t|#f)\>"
|
||||
# Keywords
|
||||
color blue "#?:(\w|[?-])+"
|
||||
# Strings
|
||||
color yellow start="^[[:blank:]]+"" end="[^\]""
|
||||
color yellow ""([^"\]|\\.)*""
|
||||
# Comments
|
||||
color cyan "(^|[[:blank:]]);.*"
|
||||
31
gitportable/usr/share/nano/html.nanorc
Normal file
31
gitportable/usr/share/nano/html.nanorc
Normal file
@@ -0,0 +1,31 @@
|
||||
## Syntax highlighting for HTML.
|
||||
|
||||
syntax html "\.html?$"
|
||||
magic "HTML document"
|
||||
comment "<!--|-->"
|
||||
|
||||
formatter tidy -m -q
|
||||
|
||||
# Tags:
|
||||
color cyan "<[[:alpha:]/!?][^>]*>"
|
||||
# Bold, italic, underlined, emphasis, and importance:
|
||||
color brightmagenta "</?(b|i|u|em|strong)>"
|
||||
|
||||
# Named character references:
|
||||
color red "&[^;[:space:]]*;"
|
||||
|
||||
# Attributes:
|
||||
color red "\<(abbr|accept(-charset)?|accesskey|action|alink|align|alt|archive|axis|background|bgcolor|border)="
|
||||
color red "\<(cell(padding|spacing)|char(off|set)?|checked|cite|class(id)?|compact|code(base|tag)?|cols(pan)?)="
|
||||
color red "\<(content(editable)?|contextmenu|coords|data|datetime|declare|defer|dir|disabled|enctype)="
|
||||
color red "\<(for|frame(border)?|headers|height|hidden|href(lang)?|hspace|http-equiv|id|ismap)="
|
||||
color red "\<(label|lang|link|longdesc|margin(height|width)|maxlength|media|method|multiple)="
|
||||
color red "\<(name|nohref|noresize|noshade|object|onclick|onfocus|onload|onmouseover|profile|readonly|rel|rev)="
|
||||
color red "\<(rows(pan)?|rules|scheme|scope|scrolling|selected|shape|size|span|src|standby|start|style|summary)="
|
||||
color red "\<(tabindex|target|text|title|type|usemap|valign|value(type)?|vlink|vspace|width|xmlns|xml:space)="
|
||||
|
||||
# Strings:
|
||||
color green ""([^"\]|\\.)*""
|
||||
|
||||
# Comments:
|
||||
color yellow start="<!--" end="-->"
|
||||
16
gitportable/usr/share/nano/java.nanorc
Normal file
16
gitportable/usr/share/nano/java.nanorc
Normal file
@@ -0,0 +1,16 @@
|
||||
## Syntax highlighting for Java.
|
||||
|
||||
syntax java "\.java$"
|
||||
magic "Java "
|
||||
comment "//"
|
||||
|
||||
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
|
||||
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
|
||||
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native)\>"
|
||||
color cyan "\<(package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
|
||||
color red ""[^"]*""
|
||||
color yellow "\<(true|false|null)\>"
|
||||
color blue "//.*"
|
||||
color blue start="/\*" end="\*/"
|
||||
color brightblue start="/\*\*" end="\*/"
|
||||
color ,green "[[:space:]]+$"
|
||||
27
gitportable/usr/share/nano/javascript.nanorc
Normal file
27
gitportable/usr/share/nano/javascript.nanorc
Normal file
@@ -0,0 +1,27 @@
|
||||
## Syntax highlighting for Javascript.
|
||||
|
||||
syntax javascript "\.m?js$"
|
||||
magic "JavaScript source"
|
||||
comment "//"
|
||||
|
||||
# Declarational stuff.
|
||||
color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>"
|
||||
# Flow control and special keywords.
|
||||
color brightyellow "\<(do|while|if|else|switch|case|default|for|each|in|of|with)\>"
|
||||
color brightyellow "\<(await|export|import|throw|try|catch|finally|new|delete)\>"
|
||||
# "Exit" points.
|
||||
color magenta "\<(break|continue|return|yield)\>"
|
||||
|
||||
# Octal/decimal and hexadecimal numbers.
|
||||
color cyan "\<([0-9]+|0x[[:xdigit:]]+)\>"
|
||||
# Special values.
|
||||
color cyan "\<(true|false|null|undefined)\>"
|
||||
|
||||
# Strings.
|
||||
color brightmagenta ""([^"\]|\\.)*"|'([^'\]|\\.)*'|`([^`\]|\\.)*`"
|
||||
# Comments.
|
||||
color brightblue "(^|[[:blank:]])//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
32
gitportable/usr/share/nano/json.nanorc
Normal file
32
gitportable/usr/share/nano/json.nanorc
Normal file
@@ -0,0 +1,32 @@
|
||||
## Syntax highlighting for JSON files.
|
||||
|
||||
## Original author: Aapo Rantalainen
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax json "\.json$"
|
||||
# No comments are permitted in JSON.
|
||||
comment ""
|
||||
|
||||
# Numbers (used as value).
|
||||
color green ":[[:blank:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?"
|
||||
# Values (well, any string).
|
||||
color brightmagenta "".+""
|
||||
# Hex numbers (used as value).
|
||||
color green ":[[:blank:]]*"#[[:xdigit:]]+""
|
||||
# Escapes.
|
||||
color green "\\(["\/bfnrt]|u[[:xdigit:]]{4})"
|
||||
# Special words.
|
||||
color green "\<(true|false|null)\>"
|
||||
|
||||
# Names (very unlikely to contain a quote).
|
||||
color brightblue ""[^"]+"[[:blank:]]*:"
|
||||
|
||||
# Brackets, braces, and separators.
|
||||
color brightblue "[][]"
|
||||
color brightred "[{},:]"
|
||||
|
||||
# Comments.
|
||||
color cyan "(^|[[:blank:]]+)(//|#).*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
61
gitportable/usr/share/nano/lua.nanorc
Normal file
61
gitportable/usr/share/nano/lua.nanorc
Normal file
@@ -0,0 +1,61 @@
|
||||
## Syntax highlighting for Lua.
|
||||
|
||||
## Original author: Matthew Wild
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax lua "\.lua$"
|
||||
magic "Lua script"
|
||||
comment "--"
|
||||
|
||||
linter luacheck --no-color
|
||||
|
||||
color brightwhite "\[\[.*\]\]"
|
||||
|
||||
# Operators
|
||||
color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|#|\<(not|and|or)\>"
|
||||
# Don't partially color ... as an operator
|
||||
color normal "\.\.\."
|
||||
|
||||
# Statements
|
||||
color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>"
|
||||
|
||||
# Keywords
|
||||
color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)[[:blank:]]*\("
|
||||
|
||||
# Standard library
|
||||
color brightyellow "\<coroutine\.(create|isyieldable|resume|running|status|wrap|yield)\>"
|
||||
color brightyellow "\<debug\.(debug|(get|set)(fenv|hook|local|metatable|(up|user)value)|getinfo|getregistry|traceback|upvalue(id|join))\>"
|
||||
color brightyellow "\<io\.(close|flush|input|lines|output|p?open|read|tmpfile|type|write|std(in|out|err))\>"
|
||||
color brightyellow "\<math\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log)\>"
|
||||
color brightyellow "\<math\.((max|min)(integer)?|modf?|pi|pow|rad|random(seed)?|sinh?|sqrt|tan|tointeger|type|ult)\>"
|
||||
color brightyellow "\<os\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>"
|
||||
color brightyellow "\<package\.(config|cpath|loaded|loadlib|path|preload|searchers|searchpath|seeall)\>"
|
||||
color brightyellow "\<string\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\>"
|
||||
color brightyellow "\<table\.(concat|insert|maxn|move|pack|remove|sort|unpack)\>"
|
||||
color brightyellow "\<utf8\.(char|charpattern|codepoint|codes|len|offset)\>"
|
||||
|
||||
# File handle methods
|
||||
color brightyellow ":(close|flush|lines|read|seek|setvbuf|write)\>"
|
||||
|
||||
# External files
|
||||
color brightgreen "\<(dofile|require)\>"
|
||||
|
||||
# Special words
|
||||
color brightmagenta "\<(false|nil|true)\>"
|
||||
|
||||
# Decimal and hexadecimal numbers
|
||||
color red "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?\>"
|
||||
color red "\<0x[[:xdigit:]]+(\.[[:xdigit:]]*)?([Pp][+-]?[0-9]+)?\>"
|
||||
|
||||
# Brackets
|
||||
color brightmagenta "\(|\)|\[|\]|\{|\}"
|
||||
|
||||
# Shebang
|
||||
color brightcyan "^#!.*"
|
||||
|
||||
# Strings
|
||||
color red ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
||||
|
||||
# Simple comments and multiline comments
|
||||
color green "--.*"
|
||||
color green start="--\[\[" end="\]\]"
|
||||
26
gitportable/usr/share/nano/makefile.nanorc
Normal file
26
gitportable/usr/share/nano/makefile.nanorc
Normal file
@@ -0,0 +1,26 @@
|
||||
## Syntax highlighting for Makefiles.
|
||||
|
||||
syntax makefile "(^|/)((GNU)?m|M)akefile[^/]*$|\.(make|mk)$"
|
||||
magic "makefile script"
|
||||
|
||||
tabgives " "
|
||||
comment "#"
|
||||
|
||||
# Assignments.
|
||||
color red " (:?:|\+|\?)?= "
|
||||
|
||||
# Keywords.
|
||||
color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>"
|
||||
color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>"
|
||||
|
||||
# Variable expansions.
|
||||
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
|
||||
|
||||
# Targets.
|
||||
color brightblue "^[^ ].*:"
|
||||
|
||||
# Comments.
|
||||
color green "(^|[[:blank:]]+)#.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
28
gitportable/usr/share/nano/man.nanorc
Normal file
28
gitportable/usr/share/nano/man.nanorc
Normal file
@@ -0,0 +1,28 @@
|
||||
## Syntax highlighting for man pages.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax man "\.[1-9]x?$"
|
||||
magic "troff or preprocessor input"
|
||||
comment ".\""
|
||||
|
||||
# Section headers, title line, and paragraphs.
|
||||
color green "^\.(SH|SS|TH) .*"
|
||||
color brightgreen "^\.((SH|SS|TH) |[HIT]P|TQ|LP$|P?P$)"
|
||||
# Type faces, and synopses.
|
||||
color brightred "^\.(B[IR]?|I[BR]?|RB|RI|SB|SM|SY|OP) .*"
|
||||
color brightblue "^\.((B[IR]?|I[BR]?|RB|RI|SB|SM|SY|OP) |YS$)"
|
||||
# Inline type faces.
|
||||
color magenta "\\f[BIPR]"
|
||||
# Hyphenation control.
|
||||
color purple "\\[%:]"
|
||||
color yellow "^\.(hc|hla|hlm|hw|hy)"
|
||||
# Relative margins, hyperlinks, and various other stuff.
|
||||
color yellow "^\.(RS|RE|UR|UE|MT|ME|EX|EE|PD|DT)"
|
||||
color yellow "^\.(ad|bp|br|ce|de|ds|el|ie|if|fi|ft|ig|in|na|ne|nf|nh|ps|so|sp|ti|tr)"
|
||||
|
||||
# Comments.
|
||||
color cyan "(^\.)?\\".*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
40
gitportable/usr/share/nano/markdown.nanorc
Normal file
40
gitportable/usr/share/nano/markdown.nanorc
Normal file
@@ -0,0 +1,40 @@
|
||||
## Syntax highlighting for Markdown files.
|
||||
|
||||
## Original authors: Ryan Westlund and Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax markdown "\.md$"
|
||||
comment "<!--|-->"
|
||||
|
||||
# Quoted:
|
||||
color magenta "^[ ]*>.*"
|
||||
|
||||
# List-item markers:
|
||||
color brightmagenta "^( | )* ? ? ?(\*|\+|-|[0-9]+\.)( +| )"
|
||||
|
||||
# Emphasis and strong:
|
||||
color green "\*[^* ][^*]*\*|_[^_ ][^_]*_"
|
||||
color brightgreen "\*\*[^*]+\*\*|__[^_]+__"
|
||||
|
||||
# Strikethrough:
|
||||
color red "~~[^~]+~~"
|
||||
|
||||
# Line breaks:
|
||||
color ,blue " $"
|
||||
|
||||
# URLs and links:
|
||||
color brightblue "\[[^]]+\]\([^)]+\)"
|
||||
color brightmagenta "!?\[[^]]+\]"
|
||||
|
||||
# Code snippet, indented code, and fenced code:
|
||||
color brightcyan "`[^`]+`"
|
||||
color brightcyan "^( | )+ *([^*+0-9> -]|[*+-]\S|[0-9][^.]).*"
|
||||
color brightcyan start="```" end="```$"
|
||||
|
||||
# Headings and the underlining of headings:
|
||||
color brightyellow "^#.*"
|
||||
color brightyellow "^(=+|-+)$"
|
||||
|
||||
# HTML tags and comments:
|
||||
color cyan "<[^>]+>"
|
||||
color cyan start="<!--" end="-->"
|
||||
17
gitportable/usr/share/nano/nanohelp.nanorc
Normal file
17
gitportable/usr/share/nano/nanohelp.nanorc
Normal file
@@ -0,0 +1,17 @@
|
||||
## 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
|
||||
|
||||
# Key combos:
|
||||
color cyan "\^[]/4-8@A-Z\^_`◂▸▴▾-]" "[◂▸▴▾]" "\<(M|S[Hh]-[Mm])-[^")”»“」]" "\<F([1-9]|1[0-9]|2[0-4])"
|
||||
color cyan "\<((Sh-)?Tab|Enter|Ins|(Sh-\^?)?Del|Space|Bsp|Up|Down|Left|Right|Home|End|PgUp|PgDn)\>"
|
||||
|
||||
# Colorize M-) and M-" only when between parentheses...
|
||||
color cyan "\(M-(\)|")\)"
|
||||
color normal " \(|\) "
|
||||
# ...or when at start of line.
|
||||
color cyan "^M-(\)|")"
|
||||
|
||||
# Quoted indicators:
|
||||
color brightred "'(\^|M-)'"
|
||||
50
gitportable/usr/share/nano/nanorc.nanorc
Normal file
50
gitportable/usr/share/nano/nanorc.nanorc
Normal file
@@ -0,0 +1,50 @@
|
||||
## Syntax highlighting for nanorc files.
|
||||
|
||||
syntax nanorc "[/.]nanorc(\.in)?$"
|
||||
comment "#"
|
||||
|
||||
# Everything that does not get recolored is invalid
|
||||
color brightred ".*"
|
||||
|
||||
# Color names
|
||||
color yellow "^[[:blank:]]*(i?color|set[[:blank:]]+((error|function|key|mini|number|prompt|scroller|selected|spotlight|status|stripe|title)color))[[:blank:]]+(bold,)?(italic,)?(((bright|light)?(white|black|red|blue|green|yellow|magenta|cyan))|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte|rosy|beet|plum|sea|sky|slate|teal|sage|brown|ocher|sand|tawny|brick|crimson|grey|gray|#[[:xdigit:]]{3})?(,(((light)?(white|black|red|blue|green|yellow|magenta|cyan))|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte|rosy|beet|plum|sea|sky|slate|teal|sage|brown|ocher|sand|tawny|brick|crimson|grey|gray|#[[:xdigit:]]{3}))?\>"
|
||||
|
||||
# The arguments of two special commands
|
||||
color bold,purple "^[[:blank:]]*include[[:blank:]]+[^[:blank:]"]+"
|
||||
color lime "^[[:blank:]]*extendsyntax[[:blank:]]+[[:alpha:]]+[[:blank:]]+(i?color|header|magic|comment|formatter|linter|tabgives)[[:blank:]]+.*"
|
||||
|
||||
# The arguments of commands
|
||||
color brightgreen "^[[:blank:]]*(set|unset)[[:blank:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|boldtext|bookstyle|breaklonglines|casesensitive|colonparsing|constantshow|cutfromcursor|emptyline|historylog|indicator|jumpyscrolling|linenumbers|locking|magic|minibar|mouse|multibuffer|noconvert|nohelp|nonewlines|positionlog|preserve|quickblank|rawsequences|rebinddelete|regexp|saveonexit|showcursor|smarthome|softwrap|stateflags|tabstospaces|trimblanks|unix|wordbounds|zap|zero)\>"
|
||||
color brightgreen "^[[:blank:]]*set[[:blank:]]+(backupdir|brackets|errorcolor|functioncolor|keycolor|matchbrackets|minicolor|numbercolor|operatingdir|promptcolor|punct|quotestr|scrollercolor|selectedcolor|speller|spotlightcolor|statuscolor|stripecolor|titlecolor|whitespace|wordchars)[[:blank:]]+"
|
||||
color brightgreen "^[[:blank:]]*set[[:blank:]]+(fill[[:blank:]]+-?[[:digit:]]+|(guidestripe|tabsize)[[:blank:]]+[1-9][0-9]*)\>"
|
||||
color brightgreen "^[[:blank:]]*bind[[:blank:]]+((\^([A-Za-z]|[]/@\^_`-]|Space)|([Ss][Hh]-)?[Mm]-[A-Za-z]|[Mm]-([][!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:blank:]]+([a-z]+|".*")[[:blank:]]+(main|help|search|replace(with)?|yesno|gotoline|writeout|insert|execute|browser|whereisfile|gotodir|spell|linter|all)\>"
|
||||
color brightgreen "^[[:blank:]]*unbind[[:blank:]]+((\^([A-Za-z]|[]/@\^_`-]|Space)|([Ss][Hh]-)?[Mm]-[A-Za-z]|[Mm]-([][!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-9]|2[0-4])|Ins|Del)[[:blank:]]+(main|help|search|replace(with)?|yesno|gotoline|writeout|insert|execute|browser|whereisfile|gotodir|spell|linter|all)\>"
|
||||
color brightgreen "^[[:blank:]]*extendsyntax[[:blank:]]+[[:alpha:]]+[[:blank:]]+"
|
||||
color brightgreen "^[[:blank:]]*(syntax[[:blank:]]+[^[:space:]]+|(formatter|linter)[[:blank:]]+.+)"
|
||||
|
||||
# Strings
|
||||
color brightmagenta "[[:blank:]](start=)?".+""
|
||||
|
||||
# Function names in string binds
|
||||
color crimson "\{(help|cancel|exit|savefile|writeout|discardbuffer|insert|where(is|was)|find(previous|next|bracket)|replace)\}"
|
||||
color crimson "\{(cut|copy|paste|zap|chopword(left|right)|cutrestoffile|execute|mark|speller|linter|formatter|(full)?justify)\}"
|
||||
color crimson "\{(location|gotoline|(begin|end)para|comment|complete|(un)?indent|wordcount|(record|run)macro|anchor|undo|redo)\}"
|
||||
color crimson "\{(left|right|up|down|home|end|(scroll|page)(up|down)|(top|bottom)row|center|cycle|(prev|next)(word|block|anchor|buf))\}"
|
||||
color crimson "\{(tab|enter|delete|backspace|verbatim|refresh|suspend|casesens|regexp|backwards|older|newer|(dos|mac)format)\}"
|
||||
color crimson "\{(append|prepend|backup|flip(goto|replace|execute|pipe|convert|newbuffer)|browser|gotodir|(first|last)(file|line))\}"
|
||||
color crimson "\{(nohelp|constantshow|softwrap|linenumbers|whitespacedisplay|nosyntax|zero)\}"
|
||||
color crimson "\{(smarthome|autoindent|cutfromcursor|breaklonglines|tabstospaces|mouse|\{)\}"
|
||||
|
||||
# Commands
|
||||
color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|formatter|linter|tabgives|extendsyntax)\>"
|
||||
color magenta "^[[:blank:]]*i?color\>|[[:blank:]](start=|end=)"
|
||||
|
||||
# Control codes
|
||||
color bold,pink "[[:cntrl:]]"
|
||||
|
||||
# Comments
|
||||
color brightblue "^[[:blank:]]*#.*|[[:blank:]]#.{0,2}[^[:xdigit:]].*"
|
||||
color cyan "^[[:blank:]]*##.*"
|
||||
|
||||
# Trailing whitespace
|
||||
color ,green "[[:space:]]+$"
|
||||
35
gitportable/usr/share/nano/nftables.nanorc
Normal file
35
gitportable/usr/share/nano/nftables.nanorc
Normal file
@@ -0,0 +1,35 @@
|
||||
## Syntax highlighting for the packet-filtering rules of Netfilter.
|
||||
|
||||
## Original author: Arturo Borrero González <arturo@debian.org>
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax nftables "\.(nft|nftables)$"
|
||||
header "^#!.*(nft|nftables)"
|
||||
comment "#"
|
||||
|
||||
# Objects and operations
|
||||
color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>"
|
||||
color green "\<(define|include)\>"
|
||||
color red "\<(add|delete|flush|insert|remove|replace)\>"
|
||||
|
||||
# Families
|
||||
color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>"
|
||||
|
||||
# Terminal statements
|
||||
color red "\<(drop|reject)\>"
|
||||
color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>"
|
||||
|
||||
# Comments
|
||||
color cyan "(^|[[:blank:]])#.*"
|
||||
|
||||
# Trailing whitespace
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
# Strings
|
||||
color yellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
||||
|
||||
# Syntactic symbols
|
||||
color green "[][{}():;|`$<>!=&\]"
|
||||
|
||||
# Basic variable names
|
||||
color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*"
|
||||
41
gitportable/usr/share/nano/objc.nanorc
Normal file
41
gitportable/usr/share/nano/objc.nanorc
Normal file
@@ -0,0 +1,41 @@
|
||||
## Syntax highlighting for C/C++/Obj-C files.
|
||||
|
||||
## Original author: Dave Geering
|
||||
|
||||
syntax m "\.m$"
|
||||
magic "Objective-C source"
|
||||
comment "//"
|
||||
|
||||
# Stuffs.
|
||||
color brightwhite "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<[[:alpha:]_][[:alnum:]_]*_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
color brightgreen "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
color brightgreen "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color brightgreen "\<(goto|continue|break|return)\>"
|
||||
color brightgreen "@(encode|end|implementation|interface)|selector)\>"
|
||||
|
||||
# GCC builtins.
|
||||
color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
# Selector/method.
|
||||
color brightmagenta "(^|[[:blank:]])\[.*[[:blank:]].*\]"
|
||||
color white ":[[:alnum:]]*"
|
||||
color magenta "[[:alnum:]]*:"
|
||||
color white "\[[^][:blank:]]*\]"
|
||||
|
||||
# Strings.
|
||||
color brightblack "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'"
|
||||
color brightblack "<[^= ]*>|"([^"\]|\\.)*""
|
||||
color brightblue "@"([^"\]|\\.)*""
|
||||
|
||||
# Preprocessor commands.
|
||||
color brightblue "^[[:blank:]]*#[[:blank:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||
|
||||
# Comments.
|
||||
color yellow "//.*"
|
||||
color yellow start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
30
gitportable/usr/share/nano/ocaml.nanorc
Normal file
30
gitportable/usr/share/nano/ocaml.nanorc
Normal file
@@ -0,0 +1,30 @@
|
||||
## Syntax highlighting for OCaml.
|
||||
|
||||
syntax ocaml "\.mli?$"
|
||||
magic "OCaml"
|
||||
comment "(*|*)"
|
||||
|
||||
# Uid:
|
||||
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
||||
# Declarations:
|
||||
color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>"
|
||||
# Structure items:
|
||||
color red "\<(type|open|class|module|exception|external)\>"
|
||||
# Patterns:
|
||||
color blue "\<(fun|function|functor|match|try|with)\>"
|
||||
# Pattern modifiers:
|
||||
color yellow "\<(as|when|of)\>"
|
||||
# Conditions:
|
||||
color cyan "\<(if|then|else)\>"
|
||||
# Blocks:
|
||||
color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>"
|
||||
# Constants:
|
||||
color green "\<(true|false)\>"
|
||||
# Modules/classes:
|
||||
color green "\<(include|inherit|initializer)\>"
|
||||
# Expression modifiers:
|
||||
color yellow "\<(new|ref|mutable|lazy|assert|raise)\>"
|
||||
# Comments:
|
||||
color white start="\(\*" end="\*\)"
|
||||
# Strings:
|
||||
color brightblack ""[^"\]*""
|
||||
28
gitportable/usr/share/nano/patch.nanorc
Normal file
28
gitportable/usr/share/nano/patch.nanorc
Normal file
@@ -0,0 +1,28 @@
|
||||
## Syntax highlighting for patch and diff files.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax patch "\.(patch|diff|debdiff|rej)$"
|
||||
magic "diff output"
|
||||
# There is no official support for comments in patch files.
|
||||
comment ""
|
||||
|
||||
# Added lines.
|
||||
color brightgreen "^\+.*"
|
||||
# Show trailing whitespace only on added lines.
|
||||
color ,green "[[:space:]]+$"
|
||||
# Context lines.
|
||||
color brightblue "^ .*"
|
||||
# Deleted lines.
|
||||
color brightred "^-.*"
|
||||
|
||||
# Header lines.
|
||||
color magenta "^(Index:|diff)[[:blank:]].*"
|
||||
# File names and dates.
|
||||
color red "^---.*"
|
||||
color green "^\+\+\+.*"
|
||||
# Line numbers.
|
||||
color brightyellow "^@@.*"
|
||||
|
||||
# Statistics.
|
||||
color cyan start="^---$" end="^$"
|
||||
38
gitportable/usr/share/nano/perl.nanorc
Normal file
38
gitportable/usr/share/nano/perl.nanorc
Normal file
@@ -0,0 +1,38 @@
|
||||
## Syntax highlighting for Perl.
|
||||
|
||||
syntax perl "\.p[lm]$"
|
||||
header "^#!.*perl"
|
||||
magic "Perl script"
|
||||
comment "#"
|
||||
|
||||
# Functions.
|
||||
color red "\<(abs|accept|alarm|atan2|bin(d|mode)|bless|caller|ch(dir|mod|op|omp|own|r|root)|close(dir)?|connect|cos|crypt)\>"
|
||||
color red "\<(dbm(close|open)|defined|delete|dump|each|eof|eval(bytes)?|exec|exists|exp|fc|fcntl|fileno|flock|fork|format|formline)\>"
|
||||
color red "\<(get(c|login|peername|pgrp|ppid|priority|(gr|pw)nam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport))\>"
|
||||
color red "\<(([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|glob|gmtime|grep|hex|import|index|int|ioctl|join)\>"
|
||||
color red "\<(keys|kill|lc|lcfirst|length|link|listen|local(time)?|lock|log|lstat|map|mkdir|msg(ctl|get|snd|rcv)|oct)\>"
|
||||
color red "\<(open(dir)?|ord|pack|pipe|pop|pos|printf?|prototype|push|q|qq|qr|qx|qw|quotemeta|rand|read(dir|line|link|pipe)?)\>"
|
||||
color red "\<(recv|redo|ref|rename|require|reset|reverse|rewinddir|rindex|rmdir|say|scalar|seek(dir)?|select|sem(ctl|get|op))\>"
|
||||
color red "\<(send|set(pgrp|priority|sockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|splice|split)\>"
|
||||
color red "\<(sprintf|sqrt|srand|state?|study|substr|symlink|sys(call|open|read|seek|tem|write)|tell(dir)?|tied?|times?|try?)\>"
|
||||
color red "\<(truncate|uc|ucfirst|umask|un(def|link|pack|shift|tie)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
|
||||
|
||||
# Control flow, logical operators, declarations.
|
||||
color magenta "\<(continue|die|do|else|elsif|exit|for(each)?|fork|goto|if|last|next|return|unless|until|while)\>"
|
||||
color magenta "\<(and|cmp|eq|ge|gt|isa|le|lt|ne|not|or|x|xor)\>"
|
||||
color magenta "\<(my|no|our|package|sub|use)\>"
|
||||
|
||||
# Variable names.
|
||||
color cyan "[$%&@]([A-Za-z_][0-9A-Za-z_]*|\^[][A-Z?\^_]|[0-9]+)\>"
|
||||
color cyan "[$%&@]\{(\^?[A-Za-z_][0-9A-Za-z_]*|\^[][?\^][0-9]+)\}"
|
||||
color cyan "[$%&@]([][!"#'()*+,.:;<=>?`|~-]|\{[][!-/:-@\`|~]\})|\$[$%&@]"
|
||||
color cyan "(^|[[:blank:]])[$%@][/\]"
|
||||
|
||||
# Strings.
|
||||
color yellow "".*"|qq\|.*\|"
|
||||
|
||||
color white "[smy]/.*/"
|
||||
color white start="(^use| = new)" end=";"
|
||||
|
||||
# Comments.
|
||||
color green "(^|[[:blank:]])#.*"
|
||||
37
gitportable/usr/share/nano/php.nanorc
Normal file
37
gitportable/usr/share/nano/php.nanorc
Normal file
@@ -0,0 +1,37 @@
|
||||
## Syntax highlighting for PHP.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax php "\.(php[23457s~]?|phtml|ctp)$"
|
||||
magic "PHP script"
|
||||
comment "//"
|
||||
|
||||
# PHP markings.
|
||||
color brightgreen "(<\?(php|=)?|\?>)"
|
||||
|
||||
# Function names.
|
||||
color white "\<[A-Za-z_][A-Za-z_0-9]*\("
|
||||
# Variable names.
|
||||
color cyan "\$[A-Za-z_][A-Za-z_0-9]*"
|
||||
|
||||
# Types.
|
||||
color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>"
|
||||
|
||||
# Directives and structure.
|
||||
color brightcyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>"
|
||||
color brightcyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>"
|
||||
# Operators.
|
||||
color brightcyan "\<(and|or|xor)\>"
|
||||
|
||||
# Control flow.
|
||||
color magenta "\<(break|continue|goto|return)\>"
|
||||
|
||||
# Strings.
|
||||
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
||||
|
||||
# Comments.
|
||||
color brightblue "(^|[[:blank:]]+)//.*"
|
||||
color brightblue start="/\*" end="\*/"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
36
gitportable/usr/share/nano/po.nanorc
Normal file
36
gitportable/usr/share/nano/po.nanorc
Normal file
@@ -0,0 +1,36 @@
|
||||
## Syntax highlighting for PO files.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax po "\.pot?$"
|
||||
comment "#"
|
||||
|
||||
# Comments.
|
||||
color green "^#.*"
|
||||
color yellow "Copyright|\(C\)"
|
||||
# Header fields.
|
||||
color brightred "^"X-Bugs:.*"$"
|
||||
color brightmagenta "\<(Project-Id-Version|Report-Msgid-Bugs-To|Last-Translator|Language(-Team)?|X-Bugs|X-Generator|Plural-Forms)\>"
|
||||
color cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>"
|
||||
# Encodings and numbers.
|
||||
color yellow "\<(UTF|ISO|Windows|Mac|IBM)-[0-9]+"
|
||||
color yellow "\<((pre|rc)?[0-9]+|[0-9]bit)\>"
|
||||
# Msgids.
|
||||
color brightblue "^(msgid|msgid_plural|msgstr)\>"
|
||||
# Tags.
|
||||
color red " fuzzy(,|$)"
|
||||
color yellow " (no-)?[-[:alpha:]]+-format(,|$)"
|
||||
# Format specifiers.
|
||||
color brightmagenta "%([1-9]\$)?[#0 +'I-]?(\*([1-9]\$)?|[1-9](\.[0-9]?)?)?[hlLjzt]?[diouxXeEfFgGaAcspnm%]"
|
||||
# Quotes and escaped characters.
|
||||
color yellow """
|
||||
color cyan "\\([abcefnrtv"\]|x[[:xdigit:]]{2}|[0-7]{3})"
|
||||
# Reminders.
|
||||
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"
|
||||
# Obsolete strings.
|
||||
color red "#~.*"
|
||||
# Stray control codes.
|
||||
color bold,pink,red "[[:cntrl:]]"
|
||||
# Tabs.
|
||||
color mint "[[:blank:]]"
|
||||
47
gitportable/usr/share/nano/python.nanorc
Normal file
47
gitportable/usr/share/nano/python.nanorc
Normal file
@@ -0,0 +1,47 @@
|
||||
## Syntax highlighting for Python.
|
||||
|
||||
syntax python "\.py$"
|
||||
header "^#!.*python"
|
||||
magic "Python script"
|
||||
comment "#"
|
||||
|
||||
# Alternative linter: pylint --exit-zero
|
||||
linter pyflakes
|
||||
|
||||
# Function definitions.
|
||||
color brightblue "def [0-9A-Za-z_]+"
|
||||
# Keywords.
|
||||
color brightcyan "\<(and|as|assert|async|await|break|class|continue)\>"
|
||||
color brightcyan "\<(def|del|elif|else|except|finally|for|from)\>"
|
||||
color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>"
|
||||
color brightcyan "\<(pass|raise|return|try|while|with|yield)\>"
|
||||
|
||||
# These two are keywords in Python 2, but functions in Python 3,
|
||||
# so only color them when they are followed by whitespace, assuming
|
||||
# that print(x) is a function invocation and print (x) is a statement.
|
||||
color brightcyan "\<(exec|print)([[:blank:]]|$)"
|
||||
|
||||
# Special values.
|
||||
color brightmagenta "\<(False|None|True)\>"
|
||||
|
||||
# Decorators.
|
||||
color cyan "@[[:alpha:]_][[:alnum:]_.]*"
|
||||
|
||||
# Mono-quoted strings.
|
||||
color brightgreen "'([^'\]|\\.)*'|"([^"\]|\\.)*"|'''|""""
|
||||
color normal "'''|""""
|
||||
# Comments.
|
||||
color brightred "(^|[[:blank:]])#.*"
|
||||
# Triple-quoted strings.
|
||||
color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''"
|
||||
color brightgreen start=""""([^"),]|$)" end="(^|[^(\])""""
|
||||
|
||||
# Backslash escapes.
|
||||
color lime "\\($|[\'"abfnrtv]|[0-3]?[0-7]?[0-7]|x[[:xdigit:]]{2})"
|
||||
color lime "\\(N\{[[:alpha:]]+\}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"
|
||||
|
||||
# Reminders.
|
||||
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
40
gitportable/usr/share/nano/ruby.nanorc
Normal file
40
gitportable/usr/share/nano/ruby.nanorc
Normal file
@@ -0,0 +1,40 @@
|
||||
## Syntax highlighting for Ruby.
|
||||
|
||||
## Original author: John M. Gabriele
|
||||
|
||||
syntax ruby "\.rb$"
|
||||
header "^#!.*ruby"
|
||||
magic "Ruby script"
|
||||
comment "#"
|
||||
|
||||
linter ruby -w -c
|
||||
|
||||
# Constants.
|
||||
color brightblue "\<[A-Z]+[0-9A-Z_a-z]*|(\$|@|@@)[0-9A-Z_a-z]+"
|
||||
# Reserved words.
|
||||
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>"
|
||||
color yellow "\<(next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
|
||||
# Ruby "symbols".
|
||||
color magenta "([ ]|^):[0-9A-Za-z_]+\>"
|
||||
# Some unique things we want to stand out.
|
||||
color brightyellow "\<(__FILE__|__LINE__)\>"
|
||||
|
||||
# Regular expressions.
|
||||
color brightmagenta "(/([^/]|\\/)*/|%r\{([^}]|\\\})*\})[iomx]*"
|
||||
# Shell command expansion is in `backticks` or like %x{this}.
|
||||
color brightblue "`[^`]*`|%x\{[^}]*\}"
|
||||
|
||||
# Strings, double-quoted.
|
||||
color green ""([^"]|\\")*"|%[QW]?(\{[^}]*\}|\([^)]*\)|<[^>]*>|\[[^]]*\]|\$[^$]*\$|\^[^^]*\^|![^!]*!)"
|
||||
# Expression substitution for inside double-quoted strings, "like #{this}".
|
||||
color brightgreen "#\{[^}]*\}"
|
||||
# Strings, single-quoted.
|
||||
color green "'([^']|\\')*'|%[qw](\{[^}]*\}|\([^)]*\)|<[^>]*>|\[[^]]*\]|\$[^$]*\$|\^[^^]*\^|![^!]*!)"
|
||||
|
||||
# Comments.
|
||||
color cyan "#([^{#].*|$)"
|
||||
color brightcyan "##([^{].*|$)"
|
||||
color cyan start="^=begin\>" end="^=end\>"
|
||||
|
||||
# Some common markers.
|
||||
color brightcyan "XXX|TODO|FIXME|\?\?\?"
|
||||
38
gitportable/usr/share/nano/rust.nanorc
Normal file
38
gitportable/usr/share/nano/rust.nanorc
Normal file
@@ -0,0 +1,38 @@
|
||||
## Syntax highlighting for Rust.
|
||||
|
||||
## Copyright 2015 Luke Francl.
|
||||
## Licensed under GPL version 3 or newer.
|
||||
|
||||
syntax rust "\.(rlib|rs)$"
|
||||
comment "//"
|
||||
|
||||
# Function definitions
|
||||
color magenta "fn [a-z_0-9]+"
|
||||
|
||||
# Reserved words
|
||||
color yellow "\<(abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|true|try|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\>"
|
||||
|
||||
# Macros
|
||||
color red "[a-z_]+!"
|
||||
|
||||
# Constants
|
||||
color magenta "[A-Z][A-Z_0-9]+"
|
||||
|
||||
# Traits/Enums/Structs/Types/...
|
||||
color magenta "[A-Z][A-Za-z0-9]+"
|
||||
|
||||
# Strings
|
||||
color green ""([^"]|\\")*""
|
||||
color green start=""([^"]|\\")*\\$" end="(^|.*[^\])""
|
||||
## Inaccurate, but it's not possible to balance the number of hashes.
|
||||
color green start="r#+"" end=""#+"
|
||||
|
||||
# Comments
|
||||
color blue "//.*"
|
||||
color blue start="/\*" end="\*/"
|
||||
|
||||
# Attributes
|
||||
color magenta start="#!\[" end="\]"
|
||||
|
||||
# Some common markers
|
||||
color brightcyan "XXX|TODO|FIXME|\?\?\?"
|
||||
41
gitportable/usr/share/nano/sh.nanorc
Normal file
41
gitportable/usr/share/nano/sh.nanorc
Normal file
@@ -0,0 +1,41 @@
|
||||
## Syntax highlighting for Bourne shell scripts.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax sh "(\.sh|(^|/|\.)(a|ba|c|da|k|mk|pdk|tc|z)sh(rc|_profile)?|(/etc/|(^|/)\.)profile)$"
|
||||
header "^#!.*/(((env|busybox)[[:blank:]]+)?(a|ba|c|da|k|mk|pdk|tc|z)?sh|openrc-run|runscript)\>"
|
||||
header "-\*-.*shell-script.*-\*-"
|
||||
magic "(POSIX|Bourne-Again) shell script.*text"
|
||||
comment "#"
|
||||
|
||||
linter dash -n
|
||||
|
||||
# Function declarations.
|
||||
color brightgreen "^[A-Za-z0-9_-]+\(\)"
|
||||
|
||||
# Keywords, symbols, and comparisons.
|
||||
color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
|
||||
color green "\<(declare|eval|exec|export|let|local)\>"
|
||||
color green "[][{}():;|`$<>!=&\]"
|
||||
color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>"
|
||||
|
||||
# Short and long options.
|
||||
color brightmagenta "[[:blank:]](-[A-Za-z]|--\<[A-Za-z-]+)\>"
|
||||
|
||||
# Common commands.
|
||||
color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|cut|echo|env|grep|head|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|sort|tail|tar|touch|umask|unset)\>"
|
||||
color normal "[.-]tar\>"
|
||||
|
||||
# Basic variable names (no braces).
|
||||
color brightred "\$([-@*#?$!0-9]|[[:alpha:]_][[:alnum:]_]*)"
|
||||
# More complicated variable names; handles braces and replacements and arrays.
|
||||
color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:blank:]]*[[:alnum:]_]+[[:blank:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
|
||||
|
||||
# Comments.
|
||||
color cyan "(^|[[:blank:]])#.*"
|
||||
|
||||
# Strings.
|
||||
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
53
gitportable/usr/share/nano/sql.nanorc
Normal file
53
gitportable/usr/share/nano/sql.nanorc
Normal file
@@ -0,0 +1,53 @@
|
||||
## Syntax highlighting for (Postgres) SQL scripts.
|
||||
|
||||
## Original author: Devrim Gündüz
|
||||
|
||||
syntax sql "\.sql$"
|
||||
comment "-- "
|
||||
|
||||
# Types.
|
||||
icolor #0a4 "\<(integer|int[248]|(big|small)?(int|serial)|decimal|numeric|real|double precision)\>"
|
||||
icolor #0a4 "\<(bit( varying)?|boolean|bytea|enum|money|tsquery|tsvector|uuid|xml)\>"
|
||||
icolor #0a4 "\<(char|varchar|character( varying)?|text|cidr|inet|macaddr8?)\>"
|
||||
icolor #0a4 "\<(date|interval|time(stamp)?( with(out)? time zone)?)\>"
|
||||
icolor #0a4 "\<(box|circle|line|lseg|path|point|polygon)\>"
|
||||
icolor #0a4 "\<(date|int[48]|num|ts|tstz)range\>"
|
||||
|
||||
# SQL keywords.
|
||||
icolor #48c "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|BETWEEN|CAST|CHECKPOINT)\>"
|
||||
icolor #48c "\<(CLOSE|CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS?|CONVERSION|COPY|CREATE)\>"
|
||||
icolor #48c "\<(DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DISCARD|DISTINCT|DO|DOMAIN|DROP)\>"
|
||||
icolor #48c "\<(END|EXCEPT|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FALSE|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>"
|
||||
icolor #48c "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTERSECT|INTO|IS)\>"
|
||||
icolor #48c "\<(NATURAL )?(INNER |OUTER |CROSS |(LEFT|RIGHT|FULL)( OUTER)? )?JOIN\>"
|
||||
icolor #48c "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LIKE|LOCK|MOVE|NOT|NOTIFY|NULL)\>"
|
||||
icolor #48c "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES|PROCEDURE)\>"
|
||||
icolor #48c "\<(REFERENCES|RELEASE|REPLACE|RESET|RETURN(S|ING)|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>"
|
||||
icolor #48c "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|SIMILAR|START|SYSTEM)\>"
|
||||
icolor #48c "\<(TABLE(SPACE)?|TEXT SEARCH (CONFIGURATION|DICTIONARY|PARSER|TEMPLATE))\>"
|
||||
icolor #48c "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TRUE|TRUNCATE|TYPE|UNION|UNIQUE|UPDATE|USER( MAPPING)?|USING)\>"
|
||||
icolor #48c "\<(VACUUM|VALUES|((REFRESH )?MATERIALIZED )?VIEW|WHERE|WITH)\>"
|
||||
|
||||
# Flow control.
|
||||
icolor #cc0 "\<(CASE|WHEN|IF|THEN|ELSE|ELSE?IF|LOOP|CONTINUE|EXIT)\>"
|
||||
icolor #cc0 "\<(FOR|FOREACH|IN|WHILE|END (CASE|IF|LOOP))\>"
|
||||
icolor #a4a "\<(RAISE|EXCEPTION|NOTICE|RETURN)\>"
|
||||
|
||||
# Quoted identifiers.
|
||||
color normal ""[[:alpha:]_][[:alnum:]_$]*""
|
||||
|
||||
# Strings.
|
||||
color #4c0 "'([^']|\\')*'"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
# Comments.
|
||||
color italic,#c44 "(--|//).*"
|
||||
color italic,#c44 start="/\*" end="\*/"
|
||||
|
||||
# PostgreSQL default schemas.
|
||||
color grey "\<(pg_catalog|public)\>"
|
||||
|
||||
# PostgreSQL PLs.
|
||||
color #c08 "\<(SQL|pl(java|perlu?|pgsql|py|pythonu?|r|ruby|scheme|sh|tcl))\>"
|
||||
40
gitportable/usr/share/nano/tcl.nanorc
Normal file
40
gitportable/usr/share/nano/tcl.nanorc
Normal file
@@ -0,0 +1,40 @@
|
||||
## Syntax highlighting for Tcl and Expect scripts.
|
||||
|
||||
## Original author: Mike Frysinger
|
||||
|
||||
syntax tcl "\.(tcl|exp)$"
|
||||
magic "Tcl(/Tk)? script"
|
||||
comment "#"
|
||||
|
||||
# Standard Tcl [info commands]:
|
||||
color green "\<(after|append|array|auto_(execok|import|load(_index)?|qualify)|binary|break)\>"
|
||||
color green "\<(case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr)\>"
|
||||
color green "\<(fblocked|fconfigure|fcopy|file(event)?|flush|for|foreach|format|gets|glob|global|history)\>"
|
||||
color green "\<(if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort)\>"
|
||||
color green "\<(namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return)\>"
|
||||
color green "\<(scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace)\>"
|
||||
color green "\<(unknown|unset|update|uplevel|upvar|variable|vwait|while)\>"
|
||||
|
||||
# Basic Tcl subcommands:
|
||||
color green "\<array (anymore|donesearch|exists|get|names|nextelement|set|size|startsearch|statistics|unset)\>"
|
||||
color green "\<string (compare|equal|first|index|is|last|(byte)?length|map|match|range|repeat|replace|to(lower|title|upper)?|trim(left|right)?|will|word(end|start))\>"
|
||||
|
||||
# Extended TclX [info commands]:
|
||||
color green "\<(alarm|auto_load_pkg|bsearch|cat(close|gets|open)|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot)\>"
|
||||
color green "\<(cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl)\>"
|
||||
color green "\<(fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyl(del|get|keys|set)|kill)\>"
|
||||
color green "\<(lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvar(cat|pop|push)|max|min|nice)\>"
|
||||
color green "\<(pipe|profile|random|readdir|replicate|scan(context|file|match)|select|server_(accept|create)|signal)\>"
|
||||
color green "\<(sleep|sync|system|tclx_(findinit|fork|load_tndxs|sleep|system|wait)|times|translit|try_eval|umask|wait)\>"
|
||||
|
||||
# Syntax:
|
||||
color green "[!$&();<=>\`|]"
|
||||
color brightblue "\<proc[[:blank:]]|\{|\}"
|
||||
color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'"
|
||||
color brightred "\$\{?[0-9A-Za-z_!@#$*?-]+\}?"
|
||||
|
||||
# Trailing whitespace:
|
||||
color ,green "[[:space:]]+$"
|
||||
|
||||
# Comments:
|
||||
color cyan "^[[:blank:]]*#.*"
|
||||
11
gitportable/usr/share/nano/tex.nanorc
Normal file
11
gitportable/usr/share/nano/tex.nanorc
Normal file
@@ -0,0 +1,11 @@
|
||||
## Syntax highlighting for TeX files.
|
||||
|
||||
syntax tex "\.tex$"
|
||||
magic "(La)?TeX document"
|
||||
comment "%"
|
||||
|
||||
linter chktex -v0 -q -I
|
||||
|
||||
color green "\\.|\\[A-Za-z]*"
|
||||
color magenta "[{}]"
|
||||
color blue "(^|[^\])%.*"
|
||||
31
gitportable/usr/share/nano/texinfo.nanorc
Normal file
31
gitportable/usr/share/nano/texinfo.nanorc
Normal file
@@ -0,0 +1,31 @@
|
||||
## Syntax highlighting for Texinfo files.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax texinfo "\.texi$"
|
||||
header "^\\input texinfo"
|
||||
magic "Texinfo source"
|
||||
comment "@c "
|
||||
|
||||
# How the manual gets listed in the directory node.
|
||||
color purple start="^@direntry" end="^@end direntry"
|
||||
|
||||
# Command arguments, trailing and enclosed.
|
||||
color cyan "^@[a-z]+[[:space:]]+.*"
|
||||
color lightmagenta "@([a-z]+|,|H|U)\{([^}]|@\}|@[a-z]+\{[^}]*\})*\}"
|
||||
# Commands themselves.
|
||||
color yellow "^@[a-z]+([[:space:]]|$)|@([a-z]+|,|H|U|AA|AE|DH|L|OE?|(La)?TeX|TH)\{|\}"
|
||||
color pink "@[!"'&*./:=?@\^`{}~-]"
|
||||
|
||||
# Special separator for headings and footings.
|
||||
color mint "@\|"
|
||||
|
||||
# Menu items.
|
||||
color brightred "^\*[[:space:]]+.*::.*"
|
||||
|
||||
# Comments.
|
||||
color green "@c(omment)?[[:space:]]+.*"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
28
gitportable/usr/share/nano/xml.nanorc
Normal file
28
gitportable/usr/share/nano/xml.nanorc
Normal file
@@ -0,0 +1,28 @@
|
||||
## Syntax highlighting for XML files.
|
||||
|
||||
## Original author: Josef Schugt
|
||||
|
||||
syntax xml "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$"
|
||||
header "<\?xml.*version=.*\?>"
|
||||
magic "(XML|SGML) (sub)?document"
|
||||
comment "<!--|-->"
|
||||
|
||||
# First the entire content of the tag (for the attributes):
|
||||
color green start="<" end=">"
|
||||
|
||||
# The angled brackets and the name of the tag:
|
||||
color cyan "<[^> ]+|/?>"
|
||||
|
||||
# The strings inside the tag:
|
||||
color magenta ""[^"]*""
|
||||
|
||||
# Prolog stuff:
|
||||
color #888 "<\?.+\?>|<!DOCTYPE[^>]+>|\]>"
|
||||
color #888 start="<!DOCTYPE[^>]*$" end="^[^<]*>"
|
||||
|
||||
# Comments:
|
||||
color yellow start="<!--" end="-->"
|
||||
|
||||
# Entities (custom and predefined):
|
||||
color pink "&[^; ]+;"
|
||||
color red "&(amp|apos|gt|lt|quot);"
|
||||
47
gitportable/usr/share/nano/yaml.nanorc
Normal file
47
gitportable/usr/share/nano/yaml.nanorc
Normal file
@@ -0,0 +1,47 @@
|
||||
## Syntax highlighting for YAML files.
|
||||
|
||||
## Original author: Benno Schulenberg
|
||||
## License: GPL version 3 or newer
|
||||
|
||||
syntax yaml "\.ya?ml$"
|
||||
header "^%YAML |^---( |$)"
|
||||
|
||||
tabgives " "
|
||||
comment "#"
|
||||
|
||||
# Keys:
|
||||
color lightgreen "(\w|::|[/.-])+:( |$)"
|
||||
color lightgreen "\[(\w|::|[/., -])+\]:( |$)"
|
||||
|
||||
# Values (booleans, numbers, octal/hex):
|
||||
color lightmagenta "[:,] +(Y(es)?|No?|y(es)?|no?|[Tt]rue|[Ff]alse|[Oo](n|ff))( *[]}]|, | +#|$)"
|
||||
color lightmagenta "[:,] +[+-]?[0-9]+(\.([0-9]+)?)?( *[]}]|, | +#|$)"
|
||||
color lightmagenta " 0(o[0-7]+|x[[:xdigit:]]+)( *[]}]|, | +#|$)"
|
||||
color normal "[:,]( |$)"
|
||||
# Values (dates, strings):
|
||||
color lightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])"
|
||||
color lightmagenta "("([^"]|\\")+"|'[^']+')"
|
||||
|
||||
# Anchors and aliases:
|
||||
color pink " [&*](\w|-)+( |$)"
|
||||
|
||||
# Symbols:
|
||||
color bold,lagoon "^(%YAML +[1-9]\.[0-9]$|%TAG |(---|\.\.\.)( |$))"
|
||||
color bold,lagoon " [|>]([1-9]?[+-]|[+-][1-9]?)?$"
|
||||
color bold,yellow "^ *(\?|([?:] +)?-) "
|
||||
color yellow "[]{}[]"
|
||||
color normal "^ *: "
|
||||
|
||||
# Tags:
|
||||
color mint " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |,|$)"
|
||||
color mint " ![^! ][^ ]*( |$)"
|
||||
|
||||
# Escaped characters:
|
||||
color orange "\\([0abefnrtv"/ \_NLP]|$)"
|
||||
color orange "\\(x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"
|
||||
|
||||
# Mistakes (control codes, trailing space):
|
||||
color ,red "[[:cntrl:]]| +$"
|
||||
|
||||
# Comments:
|
||||
color italic,cyan "(^| )#.*"
|
||||
Reference in New Issue
Block a user