forked from scopatz/nanorc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2d2bb4b
Showing
24 changed files
with
508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
*************************************** | ||
Improved Nano Syntax Highlighting Files | ||
*************************************** | ||
|
||
This repository holds {lang}.nanorc files that have imporved | ||
definitions of syntax highlighting for various languages. | ||
These should be placed inside of the ``~/.nano/`` directory. | ||
|
||
Once there you should add the languages you want to your | ||
nano configuration file ``~/.nanorc``. For example, | ||
my config file includes:: | ||
|
||
## C/C++ | ||
include "~/.nano/c.nanorc" | ||
|
||
## Fortran | ||
include "~/.nano/fortran.nanorc" | ||
|
||
## HTML | ||
include "~/.nano/html.nanorc" | ||
|
||
## Patch files | ||
include "~/.nano/patch.nanorc" | ||
|
||
## Manpages | ||
include "~/.nano/man.nanorc" | ||
|
||
## Perl | ||
include "~/.nano/perl.nanorc" | ||
|
||
## Python | ||
include "~/.nano/python.nanorc" | ||
|
||
## reST | ||
include "~/.nano/reST.nanorc" | ||
|
||
## Ruby | ||
include "~/.nano/ruby.nanorc" | ||
|
||
## Bourne shell scripts | ||
include "~/.nano/sh.nanorc" | ||
|
||
## makefile .am | ||
include "~/.nano/gentoo.nanorc" | ||
|
||
## TeX | ||
include "~/.nano/tex.nanorc" | ||
|
||
## CSS | ||
include "~/.nano/css.nanorc" | ||
|
||
## php | ||
include "~/.nano/php.nanorc" | ||
|
||
## XML | ||
include "~/.nano/xml.nanorc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Apache files | ||
syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*" | ||
color yellow ".+" | ||
color brightcyan "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)" | ||
color brightcyan "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)" | ||
color brightcyan "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)" | ||
color brightcyan "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)" | ||
color brightcyan "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)" | ||
color brightcyan "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)" | ||
color brightcyan "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)" | ||
color brightcyan "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)" | ||
color brightcyan "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)" | ||
color brightcyan "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)" | ||
color brightcyan "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)" | ||
color brightcyan "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)" | ||
color brightcyan "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)" | ||
color brightcyan "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)" | ||
color brightcyan "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)" | ||
color brightcyan "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)" | ||
color brightcyan "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)" | ||
color brightcyan "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)" | ||
color brightcyan "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)" | ||
color brightcyan "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)" | ||
color brightcyan "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)" | ||
color brightcyan "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)" | ||
color brightcyan "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)" | ||
color brightcyan "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)" | ||
color brightcyan "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)" | ||
color brightcyan "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)" | ||
color brightcyan "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)" | ||
color brightcyan "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)" | ||
color brightcyan "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)" | ||
color brightcyan "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)" | ||
color brightcyan "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)" | ||
color brightcyan "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)" | ||
color brightcyan "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)" | ||
color brightcyan "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)" | ||
color brightcyan "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)" | ||
color brightcyan "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)" | ||
color yellow "<[^>]+>" | ||
color brightcyan "</?[A-Za-z]+" | ||
color brightcyan "(<|</|>)" | ||
color green "\"(\\.|[^\"])*\"" | ||
color white "#.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Here is an example for assembler. | ||
## | ||
syntax "asm" "\.(S|s|asm)$" | ||
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)" | ||
icolor brightred "^[[:space:]]*[.0-9A-Z_]*:" | ||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" | ||
## Highlight strings (note: VERY resource intensive) | ||
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" | ||
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" | ||
## Highlight comments | ||
color brightblue "//.*" | ||
color brightblue start="/\*" end="\*/" | ||
## Highlight trailing whitespace | ||
color ,green "[[:space:]]+$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Here is an example for C/C++. | ||
## | ||
syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" | ||
color brightred "\<[A-Z_][0-9A-Z_]+\>" | ||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" | ||
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>" | ||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" | ||
color green "\<(for|if|while|do|else|case|default|switch)\>" | ||
color green "\<(try|throw|catch|operator|new|delete)\>" | ||
color brightmagenta "\<(goto|continue|break|return)\>" | ||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" | ||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" | ||
|
||
## | ||
## GCC builtins | ||
color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" | ||
|
||
#Operator Color | ||
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" | ||
|
||
#Parenthetical Color | ||
color magenta "[(){}]" "\[" "\]" | ||
|
||
|
||
## | ||
## String highlighting. You will in general want your comments and | ||
## strings to come last, because syntax highlighting rules will be | ||
## applied in the order they are read in. | ||
color cyan "<[^= ]*>" ""(\\.|[^"])*"" | ||
## | ||
## This string is VERY resource intensive! | ||
color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" | ||
|
||
## Comment highlighting | ||
color brightblue "//.*" | ||
color brightblue start="/\*" end="\*/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Here is an example for nanorc files. | ||
## | ||
syntax "conf" "\.c[o]?nf$" | ||
## Possible errors and parameters | ||
## Strings | ||
icolor white ""(\\.|[^"])*"" | ||
## Comments | ||
icolor brightblue "^[[:space:]]*#.*$" | ||
icolor cyan "^[[:space:]]*##.*$" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Here is an example for css files. | ||
## | ||
|
||
syntax "css" "\.css$" | ||
color brightred "." | ||
color brightyellow start="\{" end="\}" | ||
color brightwhite start=":" end="[;^\{]" | ||
color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" | ||
color brightblue start="\/\*" end="\\*/" | ||
color green ";|:|\{|\}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Here is an example for Fortran 90/95 | ||
|
||
syntax "fortran" "\.(f|f90|f95)$" | ||
|
||
#color red "\<[A-Z_]a[0-9A-Z_]+\>" | ||
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)\>" | ||
|
||
#Operator Color | ||
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" | ||
|
||
#Parenthetical Color | ||
color magenta "[(){}]" "\[" "\]" | ||
|
||
## String highlighting. | ||
icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" | ||
|
||
## Comment highlighting | ||
icolor brightred "!.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## Here is an example for ebuilds/eclasses | ||
## | ||
syntax "ebuild" "\.e(build|class)$" | ||
## All the standard portage functions | ||
color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" | ||
## Highlight bash related syntax | ||
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>" | ||
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" | ||
color green "-(e|d|f|r|g|u|w|x|L)\>" | ||
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" | ||
## Highlight variables ... official portage ones in red, all others in bright red | ||
color brightred "\$\{?[a-zA-Z_0-9]+\}?" | ||
color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>" | ||
color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" | ||
## Highlight portage commands | ||
color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*" | ||
color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>" | ||
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>" | ||
color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" | ||
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" | ||
color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" | ||
color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" | ||
## Highlight common commands used in ebuilds | ||
color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" | ||
## Highlight comments (doesnt work that well) | ||
color yellow "#.*$" | ||
## Highlight strings (doesnt work that well) | ||
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" | ||
## Trailing space is bad! | ||
color ,green "[[:space:]]+$" | ||
|
||
## Here is an example for Portage control files | ||
## | ||
syntax "/etc/portage" "\.(keywords|mask|unmask|use)$" | ||
## Base text: | ||
color green "^.+$" | ||
## Use flags: | ||
color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+" | ||
color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+" | ||
## Likely version numbers: | ||
color magenta "-[[:digit:]].*([[:space:]]|$)" | ||
## Accepted arches: | ||
color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>" | ||
color white "[[:space:]][~-]?\*" | ||
## Categories: | ||
color cyan "^[[:space:]]*.*/" | ||
## Masking regulators: | ||
color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" | ||
## Comments: | ||
color yellow "#.*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Here is an example for groff. | ||
## | ||
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac." | ||
## The argument of .ds or .nr | ||
color cyan "^\.(ds|nr) [^[[:space:]]]*" | ||
## Single character escapes | ||
color brightmagenta "\\." | ||
## Highlight the argument of \f or \s in the same color | ||
color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]" | ||
## Newlines | ||
color cyan "(\\|\\\\)n(.|\(..)" | ||
color cyan start="(\\|\\\\)n\[" end="]" | ||
## Requests | ||
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" | ||
## Comments | ||
color yellow "^\.\\".*$" | ||
## Strings | ||
color green "(\\|\\\\)\*(.|\(..)" | ||
color green start="(\\|\\\\)\*\[" end="]" | ||
## Characters | ||
color brightred "\\\(.." | ||
color brightred start="\\\[" end="]" | ||
## Macro arguments | ||
color brightcyan "\\\\\$[1-9]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Here is a short example for HTML. | ||
## | ||
syntax "html" "\.html$" | ||
color blue start="<" end=">" | ||
color red "&[^;[[:space:]]]*;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Here is an example for Java. | ||
## | ||
syntax "java" "\.java$" | ||
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|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:]]+$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Here is an example for manpages. | ||
## | ||
syntax "man" "\.[1-9]x?$" | ||
color green "\.(S|T)H.*$" | ||
color brightgreen "\.(S|T)H" "\.TP" | ||
color brightred "\.(BR?|I[PR]?).*$" | ||
color brightblue "\.(BR?|I[PR]?|PP)" | ||
color brightwhite "\\f[BIPR]" | ||
color yellow "\.(br|DS|RS|RE|PD)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Here is an example for quoted emails (under e.g. mutt). | ||
## | ||
syntax "mutt" | ||
color green "^>.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Here is an example for nanorc files. | ||
## | ||
syntax "nanorc" "\.?nanorc$" | ||
## Possible errors and parameters | ||
icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$" | ||
## Keywords | ||
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace|wordbounds)\>" | ||
icolor green "^[[:space:]]*(set|unset|include|syntax)\>" | ||
## Colors | ||
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" | ||
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" | ||
## Strings | ||
icolor white ""(\\.|[^"])*"" | ||
## Comments | ||
icolor brightblue "^[[:space:]]*#.*$" | ||
icolor cyan "^[[:space:]]*##.*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Here is an example for patch files. | ||
## | ||
syntax "patch" "\.(patch|diff)$" | ||
color brightgreen "^\+.*" | ||
color green "^\+\+\+.*" | ||
color brightblue "^ .*" | ||
color brightred "^-.*" | ||
color red "^---.*" | ||
color brightyellow "^@@.*" | ||
color magenta "^diff.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Here is an example for Perl. | ||
## | ||
syntax "perl" "\.p[lm]$" | ||
color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>" | ||
color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" | ||
icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)" | ||
color yellow "".*"|qq\|.*\|" | ||
color white "[sm]/.*/" | ||
color white start="(^use| = new)" end=";" | ||
color green "#.*" | ||
color yellow start="<< 'STOP'" end="STOP" |
Oops, something went wrong.