mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Syntax Highlight Overhaul (#568)
* Adds new syntax groups and docs * Large refactor of syntax highlighting files * Changed keybindings for changing tabs. * Improved the documentation. * Added F3 for find to default bindings. * Massive overhaul of the syntax files * Phase 1 color-scheme updates. * The new colorschemes. * Colorscheme and syntax updates. * Tiny fix to the cmc theme. * Another phase of colorschemes and testing gitconfig. * Fixed haskell error * Fortran fix * Delete test.txt Heh, sorry about forgetting to do this again.
This commit is contained in:
committed by
Zachary Yedidia
parent
924809b19b
commit
c29e58e3d4
@@ -4,35 +4,35 @@ syntax "puppet" "\.pp$"
|
||||
|
||||
#This goes first, so the normal builtins will override in some classes
|
||||
## Paramerers
|
||||
color brightwhite "^[[:space:]]([a-z][a-z0-9_]+)"
|
||||
color brightgreen "\$[a-z:][a-z0-9_:]+"
|
||||
color default "^[[:space:]]([a-z][a-z0-9_]+)"
|
||||
color identifier.var "\$[a-z:][a-z0-9_:]+"
|
||||
|
||||
## List of built in types, also catches defines
|
||||
color yellow "\<(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\>"
|
||||
color yellow "\<(class|define|if|else|undef|inherits)\>"
|
||||
color red "(=|-|~|>)"
|
||||
color type "\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\b"
|
||||
color statement "\b(class|define|if|else|undef|inherits)\b"
|
||||
color symbol "(=|-|~|>)"
|
||||
|
||||
## Constants
|
||||
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
|
||||
color identifier.var "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
|
||||
## Ruby "symbols"
|
||||
color magenta "([ ]|^):[0-9A-Z_]+\>"
|
||||
color symbol "([ ]|^):[0-9A-Z_]+\>"
|
||||
## Regular expressions
|
||||
color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
## Shell command expansion is in `backticks` or like %x{this}. These are
|
||||
## "double-quotish" (to use a perlism).
|
||||
color brightblue "`[^`]*`" "%x\{[^}]*\}"
|
||||
color constant.string "`[^`]*`" "%x\{[^}]*\}"
|
||||
## Strings, double-quoted
|
||||
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
## Expression substitution. These go inside double-quoted strings,
|
||||
## "like ${this}".
|
||||
color brightgreen "\$\{[^}]*\}"
|
||||
color special "\$\{[^}]*\}"
|
||||
## Strings, single-quoted
|
||||
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
## Comments
|
||||
color cyan "#[^{].*$" "#$"
|
||||
color brightcyan "##[^{].*$" "##$"
|
||||
color comment "#[^{].*$" "#$"
|
||||
color comment "##[^{].*$" "##$"
|
||||
## Some common markers
|
||||
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
|
||||
color todo "(XXX|TODO|FIXME|\?\?\?)"
|
||||
## Trailing spaces
|
||||
color red "[[:space:]]+$"
|
||||
color indent-char.whitespace "[[:space:]]+$"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user