mirror of
https://github.com/scopatz/nanorc
synced 2024-11-22 08:35:39 +01:00
added puppet and ERB highlighting
This commit is contained in:
parent
da5510f8fa
commit
0fe06445a9
24
erb.nanorc
Normal file
24
erb.nanorc
Normal file
@ -0,0 +1,24 @@
|
||||
## A HTML+Ruby set for Syntax Highlighting .erb files (Embedded RubyRails Views etc) ERB
|
||||
## (c) 2009, Georgios V. Michalakidis - g.michalakidis@computer.org
|
||||
## Licensed under the CC (Creative Commons) License.
|
||||
##
|
||||
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
|
||||
|
||||
syntax "erb" "\.erb$" "\.rhtml$"
|
||||
color blue start="<" end=">"
|
||||
color white start="<%" end="%>"
|
||||
color red "&[^;[[:space:]]]*;"
|
||||
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
|
||||
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
|
||||
icolor magenta "([ ]|^):[0-9A-Z_]+\>"
|
||||
color brightyellow "\<(__FILE__|__LINE__)\>"
|
||||
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
color brightblue "`[^`]*`" "%x\{[^}]*\}"
|
||||
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
color brightgreen "#\{[^}]*\}"
|
||||
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
color cyan "#[^{].*$" "#$"
|
||||
color brightcyan "##[^{].*$" "##$"
|
||||
color green start="<<-?'?EOT'?" end="^EOT"
|
||||
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
|
||||
|
35
puppet.nanorc
Normal file
35
puppet.nanorc
Normal file
@ -0,0 +1,35 @@
|
||||
## Nano syntax highlighting for Puppet.
|
||||
##
|
||||
syntax "puppet" "\.pp$"
|
||||
|
||||
#This goes first, so the normal builtins will override in some classes
|
||||
## Paramerers
|
||||
color brightwhite "^[[:space:]]([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|)\>"
|
||||
|
||||
## Constants
|
||||
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
|
||||
## Ruby "symbols"
|
||||
color magenta "([ ]|^):[0-9A-Z_]+\>"
|
||||
## Regular expressions
|
||||
color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
|
||||
## Shell command expansion is in `backticks` or like %x{this}. These are
|
||||
## "double-quotish" (to use a perlism).
|
||||
color brightblue "`[^`]*`" "%x\{[^}]*\}"
|
||||
## Strings, double-quoted
|
||||
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
|
||||
## Expression substitution. These go inside double-quoted strings,
|
||||
## "like ${this}".
|
||||
color brightgreen "\$\{[^}]*\}"
|
||||
## Strings, single-quoted
|
||||
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
|
||||
## Comments
|
||||
color cyan "#[^{].*$" "#$"
|
||||
color brightcyan "##[^{].*$" "##$"
|
||||
## Some common markers
|
||||
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
|
||||
## Trailing spaces
|
||||
color ,red "[[:space:]]+$"
|
||||
|
Loading…
Reference in New Issue
Block a user