From 2d2bb4ba1222cca3d70cdaa1a472c7491a5c5229 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 28 Jul 2010 17:15:43 -0500 Subject: [PATCH 001/119] First nanorc commit. --- Readme.rst | 57 +++++++++++++++++++++++++++++++++++++++++++++++ apacheconf.nanorc | 44 ++++++++++++++++++++++++++++++++++++ asm.nanorc | 17 ++++++++++++++ c.nanorc | 36 ++++++++++++++++++++++++++++++ conf.nanorc | 10 +++++++++ css.nanorc | 10 +++++++++ fortran.nanorc | 46 ++++++++++++++++++++++++++++++++++++++ gentoo.nanorc | 50 +++++++++++++++++++++++++++++++++++++++++ groff.nanorc | 24 ++++++++++++++++++++ html.nanorc | 5 +++++ java.nanorc | 12 ++++++++++ man.nanorc | 9 ++++++++ mutt.nanorc | 4 ++++ nanorc.nanorc | 16 +++++++++++++ patch.nanorc | 10 +++++++++ perl.nanorc | 11 +++++++++ php.nanorc | 20 +++++++++++++++++ pov.nanorc | 15 +++++++++++++ python.nanorc | 24 ++++++++++++++++++++ reST.nanorc | 27 ++++++++++++++++++++++ ruby.nanorc | 30 +++++++++++++++++++++++++ sh.nanorc | 13 +++++++++++ tex.nanorc | 7 ++++++ xml.nanorc | 11 +++++++++ 24 files changed, 508 insertions(+) create mode 100644 Readme.rst create mode 100644 apacheconf.nanorc create mode 100644 asm.nanorc create mode 100644 c.nanorc create mode 100644 conf.nanorc create mode 100644 css.nanorc create mode 100644 fortran.nanorc create mode 100644 gentoo.nanorc create mode 100644 groff.nanorc create mode 100644 html.nanorc create mode 100644 java.nanorc create mode 100644 man.nanorc create mode 100644 mutt.nanorc create mode 100644 nanorc.nanorc create mode 100644 patch.nanorc create mode 100644 perl.nanorc create mode 100644 php.nanorc create mode 100644 pov.nanorc create mode 100644 python.nanorc create mode 100644 reST.nanorc create mode 100644 ruby.nanorc create mode 100644 sh.nanorc create mode 100644 tex.nanorc create mode 100644 xml.nanorc diff --git a/Readme.rst b/Readme.rst new file mode 100644 index 0000000..eb42222 --- /dev/null +++ b/Readme.rst @@ -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" + diff --git a/apacheconf.nanorc b/apacheconf.nanorc new file mode 100644 index 0000000..f79343e --- /dev/null +++ b/apacheconf.nanorc @@ -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 ")" +color green "\"(\\.|[^\"])*\"" +color white "#.*" diff --git a/asm.nanorc b/asm.nanorc new file mode 100644 index 0000000..e94ee90 --- /dev/null +++ b/asm.nanorc @@ -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:]]+$" diff --git a/c.nanorc b/c.nanorc new file mode 100644 index 0000000..da8f304 --- /dev/null +++ b/c.nanorc @@ -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="\*/" diff --git a/conf.nanorc b/conf.nanorc new file mode 100644 index 0000000..2dab29f --- /dev/null +++ b/conf.nanorc @@ -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:]]*##.*$" + diff --git a/css.nanorc b/css.nanorc new file mode 100644 index 0000000..faf783a --- /dev/null +++ b/css.nanorc @@ -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 ";|:|\{|\}" diff --git a/fortran.nanorc b/fortran.nanorc new file mode 100644 index 0000000..70d4402 --- /dev/null +++ b/fortran.nanorc @@ -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 "!.*" diff --git a/gentoo.nanorc b/gentoo.nanorc new file mode 100644 index 0000000..990ccca --- /dev/null +++ b/gentoo.nanorc @@ -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)\>" "\" "\" "\" +## Highlight portage commands +color magenta "\ [!a-zA-Z0-9_+ -]*" "inherit.*" +color brightblue "\" +color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" "\" +color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +color brightblue "\" "\" +color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" +color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" +## Highlight common commands used in ebuilds +color blue "\" "\<(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 "#.*$" diff --git a/groff.nanorc b/groff.nanorc new file mode 100644 index 0000000..02b82b8 --- /dev/null +++ b/groff.nanorc @@ -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]" diff --git a/html.nanorc b/html.nanorc new file mode 100644 index 0000000..d31467d --- /dev/null +++ b/html.nanorc @@ -0,0 +1,5 @@ +## Here is a short example for HTML. +## +syntax "html" "\.html$" +color blue start="<" end=">" +color red "&[^;[[:space:]]]*;" diff --git a/java.nanorc b/java.nanorc new file mode 100644 index 0000000..a432f81 --- /dev/null +++ b/java.nanorc @@ -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:]]+$" diff --git a/man.nanorc b/man.nanorc new file mode 100644 index 0000000..85efd26 --- /dev/null +++ b/man.nanorc @@ -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)" diff --git a/mutt.nanorc b/mutt.nanorc new file mode 100644 index 0000000..2e68399 --- /dev/null +++ b/mutt.nanorc @@ -0,0 +1,4 @@ +## Here is an example for quoted emails (under e.g. mutt). +## +syntax "mutt" +color green "^>.*" diff --git a/nanorc.nanorc b/nanorc.nanorc new file mode 100644 index 0000000..f63d770 --- /dev/null +++ b/nanorc.nanorc @@ -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:]]*##.*$" diff --git a/patch.nanorc b/patch.nanorc new file mode 100644 index 0000000..a788b35 --- /dev/null +++ b/patch.nanorc @@ -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.*" diff --git a/perl.nanorc b/perl.nanorc new file mode 100644 index 0000000..7bca4cd --- /dev/null +++ b/perl.nanorc @@ -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" diff --git a/php.nanorc b/php.nanorc new file mode 100644 index 0000000..9173e74 --- /dev/null +++ b/php.nanorc @@ -0,0 +1,20 @@ +## PHP syntax highlighting +## +syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$" +#functions +color brightmagenta "([A-Za-z0-9])" +#numbers +color brightblue "[0-9]" +#special +color brightwhite "(^|[^A-Za-z0-9])(<\?php|\?>|var|and|or|default|class|extends|true|false|global|function|new|switch|case|break|next|prev|elseif|if|else|foreach|for|as|do|while|exit|die|declare|require_once|require|include_once|include|return|echo|static|array|isset)([^A-Za-z0-9])" +#types +color brightred "([^A-Za-z0-9])|[^A-Za-z](null|int|string|float|bool|object|resource)[^A-Za-z0-9_]+[^A-Za-z]" +#strings +color brightyellow ""(\\.|[^\"])*"" +color brightyellow "'(\\.|[^\'])*'" +#Variables +color brightcyan "\$[]\[A-Za-z0-9_'\"]*" +#comments +color green "//.*" +color green "#.*" +color green start="/\*" end="\*/" diff --git a/pov.nanorc b/pov.nanorc new file mode 100644 index 0000000..298b201 --- /dev/null +++ b/pov.nanorc @@ -0,0 +1,15 @@ +## Here is an example for POV-Ray. +## +syntax "pov" "\.(pov|POV|povray|POVRAY)$" +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 "^\<(texture)\>" +color brightred "\<(light_source|background)\>" +color brightred "\<(fog|object|camera)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color brightmagenta "\<(union|group|subgroup)\>" +## Comment highlighting +color brightblue "//.*" +color brightblue start="/\*" end="\*/" diff --git a/python.nanorc b/python.nanorc new file mode 100644 index 0000000..ac743db --- /dev/null +++ b/python.nanorc @@ -0,0 +1,24 @@ +## Here is an example for Python. +## +syntax "python" "\.py$" +icolor brightred "def [0-9A-Z_]+" + + + +#Keyword Color +color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" +color brightmagenta "\<(continue|break|return)\>" + +#Operator Color +color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" + +#Parenthetical Color +color magenta "[(){}]" "\[" "\]" + +#String Color +color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" +color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" +color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" + +#Comment Color +color brightblue "#.*$" diff --git a/reST.nanorc b/reST.nanorc new file mode 100644 index 0000000..233e697 --- /dev/null +++ b/reST.nanorc @@ -0,0 +1,27 @@ +## For reST +syntax "rest" "\.rest$" "\.rst$" +# italics +#color magenta "\*[^*]\*" +# bold +color red "\*\*[^*]+\*\*" +# code block +color brightred "::" +# link reference +color blue "`[^`]+`_{1,2}" +# code +color yellow "``[^`]+``" +# directives or comments +color cyan "^\.\. .*$" +# anon link targets +color cyan "^__ .*$" +# h1 +color yellow "^###+$" +color yellow "^\*\*\*+$" +# h2 +color magenta "^===+$" +# h3 +color red "^---+$" +# h4 +color green "^\^\^\^+$" +# h5 +color blue "^"""+$" diff --git a/ruby.nanorc b/ruby.nanorc new file mode 100644 index 0000000..a557287 --- /dev/null +++ b/ruby.nanorc @@ -0,0 +1,30 @@ +## Here is an example for Ruby. +## +syntax "ruby" "\.rb$" +## Asciibetical list of reserved words +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)\>" +## Constants +color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" +## Ruby "symbols" +icolor magenta "([ ]|^):[0-9A-Z_]+\>" +## Some unique things we want to stand out +color brightyellow "\<(__FILE__|__LINE__)\>" +## 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 "##[^{].*$" "##$" +## "Here" docs +color green start="<<-?'?EOT'?" end="^EOT" +## Some common markers +color brightcyan "(XXX|TODO|FIXME|\?\?\?)" diff --git a/sh.nanorc b/sh.nanorc new file mode 100644 index 0000000..be1a1a9 --- /dev/null +++ b/sh.nanorc @@ -0,0 +1,13 @@ +## Here is an example for Bourne shell scripts. +## +syntax "sh" "\.sh$" +icolor brightgreen "^[0-9A-Z_]+\(\)" +color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color green "-[Ldefgruwx]\>" +color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" +color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" +color cyan "(^|[[:space:]])#.*$" +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +#color ,green "[[:space:]]+$" diff --git a/tex.nanorc b/tex.nanorc new file mode 100644 index 0000000..3631200 --- /dev/null +++ b/tex.nanorc @@ -0,0 +1,7 @@ +## Here is a short example for TeX files. +## +syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" +icolor green "\\.|\\[A-Z]*" +color magenta "[{}]" +color blue "%.*" +color blue start="\\begin\{comment\}" end="\\end\{comment\}" diff --git a/xml.nanorc b/xml.nanorc new file mode 100644 index 0000000..0a84162 --- /dev/null +++ b/xml.nanorc @@ -0,0 +1,11 @@ +## Here is an example for xml files. +## + +syntax "ml" ".*\.([jrs]?html?|xml|sgml?)$" +color white "^.+$" +color green start="<" end=">" +color cyan "<[^> ]+" +color cyan ">" +color yellow start="" +color yellow start="" +color red "&[^;]*;" From 803e1f2b1950cc4ecfe1ac10c19392613eb20ba6 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 29 Jul 2010 10:41:45 -0500 Subject: [PATCH 002/119] Fixed typo in fortran.nanorc --- fortran.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index 70d4402..a25cdc9 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -10,7 +10,7 @@ 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 "\<(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)\>" From 8e4bd018606bab5fdeb91541af1ad13c095dd756 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 30 Aug 2010 10:10:34 -0500 Subject: [PATCH 003/119] Added 'Makefile' to sh.nanorc. --- sh.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh.nanorc b/sh.nanorc index be1a1a9..855a84b 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Bourne shell scripts. ## -syntax "sh" "\.sh$" +syntax "sh" "\.sh$" "Makefile" icolor brightgreen "^[0-9A-Z_]+\(\)" color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" From 6a8c87d9ad4987ca814e8495519f1912c5c708b0 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 30 Aug 2010 10:49:03 -0500 Subject: [PATCH 004/119] Improved fortran.nanorc. --- fortran.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index a25cdc9..c55b979 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -43,4 +43,4 @@ color magenta "[(){}]" "\[" "\]" icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" ## Comment highlighting -icolor brightred "!.*" +icolor brightred "^!.*" "^c.*" "^C.*" From ab52033828babd927a395971ca3f3439b8abba18 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 31 Aug 2010 14:01:36 -0500 Subject: [PATCH 005/119] Added .for extension to fortran. --- fortran.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index c55b979..6854138 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Fortran 90/95 -syntax "fortran" "\.(f|f90|f95)$" +syntax "fortran" "\.(f|f90|f95|for)$" #color red "\<[A-Z_]a[0-9A-Z_]+\>" color red "\<[0-9]+\>" From 15674e52cb6121586dd59041b2c0d1c76b8ed88b Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 2 Feb 2011 13:58:00 -0600 Subject: [PATCH 006/119] Added lua.nanorc --- Readme.rst | 3 +++ lua.nanorc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 lua.nanorc diff --git a/Readme.rst b/Readme.rst index eb42222..ce67085 100644 --- a/Readme.rst +++ b/Readme.rst @@ -55,3 +55,6 @@ my config file includes:: ## XML include "~/.nano/xml.nanorc" + ## Lua + include "~/.nano/lua.nanorc" + diff --git a/lua.nanorc b/lua.nanorc new file mode 100644 index 0000000..e41c8d4 --- /dev/null +++ b/lua.nanorc @@ -0,0 +1,72 @@ +############################################################################## +# +# Lua syntax highlighting for Nano. +# +# Author: Matthew Wild +# License: GPL 2 or later +# +# Version: 2007-06-06 +# +# Notes: Originally based on Ruby syntax rc by Josef 'Jupp' Schugt +############################################################################## + + +# Automatically use for '.lua' files +syntax "lua" ".*\.lua$" + +# General +color brightwhite ".+" + +# Operators +color brightyellow ":|\*\*|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>" + +# Statements +color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\>" + +# Keywords +color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\." +color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\(" + +# Standard library +color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\>" +color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|modf|pi|pow|rad|random|randomseed|sinh|tan)\>" +color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>" +color brightyellow "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>" +color brightyellow "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>" +color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>" +color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>" +color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>" + +# File handle methods +color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>" + +# false, nil, true +color brightmagenta "\<(false|nil|true)\>" + +# External files +color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>" + +# Numbers +color red "\<([0-9]+)\>" + +# Symbols +color brightmagenta "(\(|\)|\[|\]|\{|\})" + +# Strings +#color green "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" + +# Strings +color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" + +# Escapes +color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)." + + +# Shebang +color brightcyan "^#!.*" + +# Simple comments +color green "\-\-.*$" + +# Multiline comments +color green start="\-\-\[" end="]" From 436525c3437c45ebeb3e5af5e2e442220c1eaf2e Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 2 Feb 2011 20:19:36 -0600 Subject: [PATCH 007/119] Added initial Cython highlighting. --- cython.nanorc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cython.nanorc diff --git a/cython.nanorc b/cython.nanorc new file mode 100644 index 0000000..0182e65 --- /dev/null +++ b/cython.nanorc @@ -0,0 +1,28 @@ +## Cython nanorc, based off of Python nanorc. +## +syntax "python" "\.pyx$" "\.pyd$" "\.pyi$" +icolor brightred "def [0-9A-Z_]+" + + + +# Python Keyword Color +color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" +color brightmagenta "\<(continue|break|return)\>" + +# Cython Keyword Color +color green "\<(cdef|extern|namespace)\>" +color red "\<(bint|double|int)\>" + +#Operator Color +color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" + +#Parenthetical Color +color magenta "[(){}]" "\[" "\]" + +#String Color +color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" +color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" +color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" + +#Comment Color +color brightblue "#.*$" From 2944360474590724c77cf374bbf35fa483fe1ab3 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 3 Feb 2011 00:50:07 -0600 Subject: [PATCH 008/119] Some more cython improvements. --- cython.nanorc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cython.nanorc b/cython.nanorc index 0182e65..0784c05 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -1,7 +1,9 @@ ## Cython nanorc, based off of Python nanorc. ## -syntax "python" "\.pyx$" "\.pyd$" "\.pyi$" -icolor brightred "def [0-9A-Z_]+" +syntax "cython" "\.pyx$" "\.pyd$" "\.pyi$" +icolor brightred "def [ 0-9A-Z_]+" +icolor brightred "cpdef [ 0-9A-Z_]+" +icolor brightred "cdef cppclass [ 0-9A-Z_]+" @@ -10,8 +12,8 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color -color green "\<(cdef|extern|namespace)\>" -color red "\<(bint|double|int)\>" +color green "\<(cdef|cpdef|cppclass|extern|namespace)\>" +color red "\<(bint|char|double|int|public)\>" #Operator Color color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" From b407af387136f435f7938d7e2716afafc9dc0ac5 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 3 Feb 2011 01:18:24 -0600 Subject: [PATCH 009/119] Some more cython improvements. --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index 0784c05..14cb500 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -12,7 +12,7 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color -color green "\<(cdef|cpdef|cppclass|extern|namespace)\>" +color green "\<(cdef|cimport|cpdef|cppclass|extern|namespace)\>" color red "\<(bint|char|double|int|public)\>" #Operator Color From 5ce5119e17c2cf19d0af8905aabb84e291ec26ce Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 3 Feb 2011 01:19:27 -0600 Subject: [PATCH 010/119] pyd -> pxd name change. --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index 14cb500..bca84b4 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -1,6 +1,6 @@ ## Cython nanorc, based off of Python nanorc. ## -syntax "cython" "\.pyx$" "\.pyd$" "\.pyi$" +syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$" icolor brightred "def [ 0-9A-Z_]+" icolor brightred "cpdef [ 0-9A-Z_]+" icolor brightred "cdef cppclass [ 0-9A-Z_]+" From 6547a7341b83090a42f36fdf7ae3565eb3f46422 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 7 Feb 2011 14:51:21 -0600 Subject: [PATCH 011/119] Changed Cython --- cython.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cython.nanorc b/cython.nanorc index bca84b4..c73a795 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -2,8 +2,8 @@ ## syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$" icolor brightred "def [ 0-9A-Z_]+" -icolor brightred "cpdef [ 0-9A-Z_]+" -icolor brightred "cdef cppclass [ 0-9A-Z_]+" +icolor brightred "cpdef [ 0-9A-Z_]+\(.*?\):" +icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):" @@ -12,7 +12,7 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color -color green "\<(cdef|cimport|cpdef|cppclass|extern|namespace)\>" +color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|namespace|property)\>" color red "\<(bint|char|double|int|public)\>" #Operator Color From 4c6ba5bd099d527e9307ab72a9f5cf06e9be2ac6 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 9 Feb 2011 09:47:05 -0600 Subject: [PATCH 012/119] Added include to cython --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index c73a795..9413803 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -12,7 +12,7 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color -color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|namespace|property)\>" +color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property)\>" color red "\<(bint|char|double|int|public)\>" #Operator Color From dd39f5abb572ed4d268bfa40de8f6ed12f581611 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 10 Feb 2011 14:39:30 -0600 Subject: [PATCH 013/119] Added struct keywpord to cython --- cython.nanorc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cython.nanorc b/cython.nanorc index 9413803..f5ee06e 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -12,7 +12,7 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color -color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property)\>" +color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>" color red "\<(bint|char|double|int|public)\>" #Operator Color @@ -26,5 +26,5 @@ color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" -#Comment Color +# Comment Color color brightblue "#.*$" From 5d8b59ce108429aee76c95388b156cf456d6fbf3 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Fri, 11 Feb 2011 11:36:00 -0600 Subject: [PATCH 014/119] Added void keyword to cython --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index f5ee06e..66083ea 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -13,7 +13,7 @@ color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>" -color red "\<(bint|char|double|int|public)\>" +color red "\<(bint|char|double|int|public|void)\>" #Operator Color color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" From 211cd58347d5968b0a3f82adb90932012ec2133b Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 10 Apr 2011 22:35:41 -0500 Subject: [PATCH 015/119] Added *.def files to c. --- c.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c.nanorc b/c.nanorc index da8f304..1b201de 100644 --- a/c.nanorc +++ b/c.nanorc @@ -1,6 +1,6 @@ ## Here is an example for C/C++. ## -syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" +syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" 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\>" From 572a7ce25a14598dd478d7a600f868f6b5f05cdc Mon Sep 17 00:00:00 2001 From: CirKu17 Date: Wed, 15 Jun 2011 03:35:47 -0700 Subject: [PATCH 016/119] Edited html.nanorc via GitHub --- html.nanorc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/html.nanorc b/html.nanorc index d31467d..f44bb01 100644 --- a/html.nanorc +++ b/html.nanorc @@ -1,5 +1,7 @@ -## Here is a short example for HTML. +## Here is a short improved example for HTML. ## -syntax "html" "\.html$" -color blue start="<" end=">" +syntax "html" "\.htm[l]?$" +color brightblue start="<" end=">" color red "&[^;[[:space:]]]*;" +color yellow "".*"|qq\|.*\|" +color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" \ No newline at end of file From 6f8126a30c5154c6ecd5dbaf7ba215500480ae0f Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 26 Jun 2011 17:18:43 -0500 Subject: [PATCH 017/119] better tex --- tex.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tex.nanorc b/tex.nanorc index 3631200..50db5e0 100644 --- a/tex.nanorc +++ b/tex.nanorc @@ -2,6 +2,6 @@ ## syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" icolor green "\\.|\\[A-Z]*" -color magenta "[{}]" +color magenta "[{}]$" color blue "%.*" color blue start="\\begin\{comment\}" end="\\end\{comment\}" From ce6c53c28070a2a303079eb0c200b51b048efb9d Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 26 Jun 2011 17:34:26 -0500 Subject: [PATCH 018/119] Forgot some regex bs --- tex.nanorc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tex.nanorc b/tex.nanorc index 50db5e0..76cc469 100644 --- a/tex.nanorc +++ b/tex.nanorc @@ -1,7 +1,8 @@ ## Here is a short example for TeX files. ## syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" +color yellow "\$[^$]*\$" icolor green "\\.|\\[A-Z]*" -color magenta "[{}]$" +color magenta "[{}]" color blue "%.*" color blue start="\\begin\{comment\}" end="\\end\{comment\}" From 62f70450009197f673406696b9aebeccf8be429d Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 1 Feb 2012 02:14:24 -0600 Subject: [PATCH 019/119] Added yield colors to python and cython. --- cython.nanorc | 2 +- python.nanorc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cython.nanorc b/cython.nanorc index 66083ea..c7e8ff1 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -8,7 +8,7 @@ icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):" # Python Keyword Color -color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" +color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color diff --git a/python.nanorc b/python.nanorc index ac743db..bd2a5ea 100644 --- a/python.nanorc +++ b/python.nanorc @@ -6,7 +6,7 @@ icolor brightred "def [0-9A-Z_]+" #Keyword Color -color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" +color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" color brightmagenta "\<(continue|break|return)\>" #Operator Color From 3a76ad37a73219efb6f054010b3ccb4246b780d8 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 2 Feb 2012 13:18:02 -0600 Subject: [PATCH 020/119] Added highlighting for preprocessed fortran. --- fortran.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index 6854138..40623ee 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Fortran 90/95 -syntax "fortran" "\.(f|f90|f95|for)$" +syntax "fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$" #color red "\<[A-Z_]a[0-9A-Z_]+\>" color red "\<[0-9]+\>" From a60a5a653cc06e6c57b37da8fabedaf1fc18e9eb Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 6 Feb 2012 16:31:17 -0600 Subject: [PATCH 021/119] Improved fortran --- fortran.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index 40623ee..85cfee4 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -43,4 +43,4 @@ color magenta "[(){}]" "\[" "\]" icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" ## Comment highlighting -icolor brightred "^!.*" "^c.*" "^C.*" +icolor brightred "!.*$" "(^[Cc]| [Cc]) .*$" From b65096fd98f4e632a73001576b055e10c4a6e68e Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 6 Feb 2012 16:36:05 -0600 Subject: [PATCH 022/119] Add preprocessor stuff to fortran. --- fortran.nanorc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fortran.nanorc b/fortran.nanorc index 85cfee4..bf71460 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -39,6 +39,9 @@ color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" #Parenthetical Color color magenta "[(){}]" "\[" "\]" +# Add preprocessor commands. +color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" + ## String highlighting. icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" From c90d38e9281e3f8ba0a248ccb5cdef3bea19d160 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Fri, 10 Feb 2012 16:37:09 -0600 Subject: [PATCH 023/119] Fixed multiline string highlighting. --- python.nanorc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python.nanorc b/python.nanorc index bd2a5ea..b9035e5 100644 --- a/python.nanorc +++ b/python.nanorc @@ -18,7 +18,8 @@ color magenta "[(){}]" "\[" "\]" #String Color color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" -color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" +#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" +color cyan start=""""" end=""""" start="'''" end="'''" #Comment Color color brightblue "#.*$" From 6835567ed207c8e0c0aba8d0d52a68090ec7fa5f Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 20 Feb 2012 01:08:36 -0600 Subject: [PATCH 024/119] Silly python edits. --- python.nanorc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python.nanorc b/python.nanorc index b9035e5..0c75541 100644 --- a/python.nanorc +++ b/python.nanorc @@ -15,11 +15,14 @@ color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" #Parenthetical Color color magenta "[(){}]" "\[" "\]" +#Comment Color +color brightblue "#.*$" + #String Color color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" -#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" -color cyan start=""""" end=""""" start="'''" end="'''" -#Comment Color -color brightblue "#.*$" +#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" +#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" +color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" + From ca6f04ac2d9392e1c64e94dd2866a79ccb62acd6 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 20 Feb 2012 13:51:25 -0600 Subject: [PATCH 025/119] Python comments have precedence. --- python.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python.nanorc b/python.nanorc index 0c75541..b70cd62 100644 --- a/python.nanorc +++ b/python.nanorc @@ -15,9 +15,6 @@ color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" #Parenthetical Color color magenta "[(){}]" "\[" "\]" -#Comment Color -color brightblue "#.*$" - #String Color color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" @@ -26,3 +23,6 @@ color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" #color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" +#Comment Color +color brightblue "#.*$" + From 3874a5db438ccf14d865ed5362e3c2922313d029 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 4 Mar 2012 16:32:43 -0600 Subject: [PATCH 026/119] Went back to previous version of multi-line python highlighting. --- python.nanorc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python.nanorc b/python.nanorc index b70cd62..5ddf326 100644 --- a/python.nanorc +++ b/python.nanorc @@ -19,9 +19,13 @@ color magenta "[(){}]" "\[" "\]" color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" +color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" #color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" -#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" -color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" +#color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" +#color cyan start=""""" end=""""" start="'''" end="'''" +#color cyan start="("""[^"]|[^"]""")" end="("""[^"]|[^"]""")" start="'''[^']" end="'''" +#color cyan start="\"\"\"" end="\"\"\"" + #Comment Color color brightblue "#.*$" From 610a0b9acd83389fd0f056e8e3ccd7f3ff31e29e Mon Sep 17 00:00:00 2001 From: CirKu17 Date: Mon, 12 Mar 2012 15:36:30 +0100 Subject: [PATCH 027/119] Added haml.nanorc --- haml.nanorc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 haml.nanorc diff --git a/haml.nanorc b/haml.nanorc new file mode 100644 index 0000000..ef9be34 --- /dev/null +++ b/haml.nanorc @@ -0,0 +1,16 @@ +syntax "haml" "\.haml$" + +color cyan "-|=" +color white "->|=>" +icolor cyan "([ ]|^)%[0-9A-Z_]+\>" +icolor magenta ":[0-9A-Z_]+\>" +icolor yellow "\.[A-Z_]+\>" +## Double quote & single quote +color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" +color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" +## Vars +color brightgreen "#\{[^}]*\}" +color brightblue "(@|@@)[0-9A-Z_a-z]+" +## Comments +color brightcyan "#[^{].*$" "#$" + From a3ff41fbd205f9bc4deeb236cd5b5016c4e64053 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 13 Jun 2012 13:12:05 -0500 Subject: [PATCH 028/119] Added JavaScript rc --- js.nanorc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 js.nanorc diff --git a/js.nanorc b/js.nanorc new file mode 100644 index 0000000..79a4af0 --- /dev/null +++ b/js.nanorc @@ -0,0 +1,46 @@ +### all *js files ( e.g. Firefox user.js, prefs.js ) + +## Old version + +#syntax "jsfiles" "(\.|/|)js$" +#color green "//.*$" start="\/\*" end="\*\/" +#color blue "'(\\.|[^'])*'" +#color red ""(\\.|[^\"])*"" +#color brightgreen "\<(true)\>" +#color brightred "\<(false)\>" "http\:\/\/.*$" +#color brightmagenta "[0-9](\\.|[^\"])*)" + +## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting + +syntax "JavaScript" "\.(js)$" + +## Default +color white "^.+$" + +## Decimal, cotal and hexadecimal numbers +color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" + +## Floating point number with at least one digit before decimal point +color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" +color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" + +## Keywords +color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>" +color green "\<(for|function|if|in|instanceof|new|null|return|switch)\>" +color green "\<(switch|this|throw|try|typeof|undefined|var|void|while|with)\>" + +## Type specifiers +color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" +color red "\<(Number|Object|RegExp|String)\>" +color red "\<(true|false)\>" + +## String +color brightyellow "L?\"(\\"|[^"])*\"" +color brightyellow "L?'(\'|[^'])*'" + +## Escapes +color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" + +## Comments +color brightblue start="/\*" end="\*/" +color brightblue "//.*$" From 9dd7714af81316207156c44b64057f8c307f8766 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Fri, 3 Aug 2012 10:24:53 -0600 Subject: [PATCH 029/119] Updated colors for decorators. --- python.nanorc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python.nanorc b/python.nanorc index 5ddf326..3988a92 100644 --- a/python.nanorc +++ b/python.nanorc @@ -9,8 +9,11 @@ icolor brightred "def [0-9A-Z_]+" color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" color brightmagenta "\<(continue|break|return)\>" +# decorator color +color brightgreen "@.*" + #Operator Color -color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" +color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" #Parenthetical Color color magenta "[(){}]" "\[" "\]" From 61e9d99d0bfc87478008a41a7659205f091de496 Mon Sep 17 00:00:00 2001 From: Mani Tadayon Date: Wed, 12 Sep 2012 20:44:09 -0700 Subject: [PATCH 030/119] Comment out lines that cause errors on OS X --- gentoo.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gentoo.nanorc b/gentoo.nanorc index 990ccca..16a9127 100644 --- a/gentoo.nanorc +++ b/gentoo.nanorc @@ -16,10 +16,10 @@ color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\" "\" "\ [!a-zA-Z0-9_+ -]*" "inherit.*" color brightblue "\" color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" "\" -color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +# color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" color brightblue "\" "\" -color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" -color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" +# color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" +# color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" ## Highlight common commands used in ebuilds color blue "\" "\<(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) From 804c1750babe0e711f0039b18a118579dc0bba35 Mon Sep 17 00:00:00 2001 From: CirKu17 Date: Tue, 25 Sep 2012 14:18:36 -0400 Subject: [PATCH 031/119] zshrc added --- zshrc.nanorc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 zshrc.nanorc diff --git a/zshrc.nanorc b/zshrc.nanorc new file mode 100644 index 0000000..e5d4183 --- /dev/null +++ b/zshrc.nanorc @@ -0,0 +1,14 @@ +## Hightlightings for zsh configuration files (most used keywords) +syntax "zshrc" "\.?zshrc$" + +## Keywords +color red "\<(autoload|prompt(init)?|zstyle|zmodload|compinit|setopt|export|source)\>" +color magenta "\<(alias|bindkey|function)\>" + +## Strings +icolor white ""(\\.|[^"])*"" +icolor white "'(\\.|[^'])*'" + +## Comments +icolor brightblue "^[[:space:]]*#.*$" +icolor cyan "^[[:space:]]*##.*$" From 28c1a995028b47a2ad28267953dea915e6e1b0f1 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 25 Sep 2012 17:20:55 -0500 Subject: [PATCH 032/119] Added default bash files to sh.nanorc --- sh.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh.nanorc b/sh.nanorc index 855a84b..959a1b9 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Bourne shell scripts. ## -syntax "sh" "\.sh$" "Makefile" +syntax "sh" "\.sh$" "Makefile" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_profile" "bash_profile" icolor brightgreen "^[0-9A-Z_]+\(\)" color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" From ce86b23d6b9ad89322fb1f4f8c47577b354c0cec Mon Sep 17 00:00:00 2001 From: Jason Ormand Date: Wed, 26 Sep 2012 10:56:21 -0400 Subject: [PATCH 033/119] added Gemfile, Rakefile and config.ru to ruby syntax file --- ruby.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.nanorc b/ruby.nanorc index a557287..e4f0ff4 100644 --- a/ruby.nanorc +++ b/ruby.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Ruby. ## -syntax "ruby" "\.rb$" +syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" ## Asciibetical list of reserved words 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)\>" ## Constants From 24c990d008ca2814dbdd50431ca9c4141f94e60f Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Fri, 12 Oct 2012 11:26:13 -0400 Subject: [PATCH 034/119] Added extra ruby syntax files --- ruby.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.nanorc b/ruby.nanorc index e4f0ff4..830dac6 100644 --- a/ruby.nanorc +++ b/ruby.nanorc @@ -1,6 +1,6 @@ ## Here is an example for Ruby. ## -syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" +syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile" ## Asciibetical list of reserved words 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)\>" ## Constants From d59e4a65ef273d0b5f1746a80ab06e6c0b908073 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 15 Oct 2012 22:35:51 -0500 Subject: [PATCH 035/119] Added some compiletime evaluation keywords to cython. --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index c7e8ff1..8681430 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -8,7 +8,7 @@ icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):" # Python Keyword Color -color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" +color green "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color From 8af4d9a2057d6f26342efcf1a88541483128b7ad Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 8 Nov 2012 13:09:19 -0600 Subject: [PATCH 036/119] Added cmake file. --- cmake.nanorc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmake.nanorc diff --git a/cmake.nanorc b/cmake.nanorc new file mode 100644 index 0000000..3c52f7d --- /dev/null +++ b/cmake.nanorc @@ -0,0 +1,19 @@ +## CMake syntax highlighter for GNU Nano +## +syntax "cmake" "(CMakeLists\.txt|\.cmake)$" + +icolor green "^[[:space:]]*[A-Z0-9_]+" +icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>" + +icolor brightgreen "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>" +color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]" +color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]" + +icolor brightred "^[[:space:]]*\<((end)?(function|macro)|return)" + +icolor cyan start="\$(\{|ENV\{)" end="\}" +color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" + +icolor brightblue "^([[:space:]]*)?#.*" +icolor brightblue "[[:space:]]#.*" +color ,green "[[:space:]]+$" From 7489e9010918f07cf1b83b3ecb18ab887e0e7381 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 8 Nov 2012 13:22:38 -0600 Subject: [PATCH 037/119] edits to cmake to make more readable. --- cmake.nanorc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake.nanorc b/cmake.nanorc index 3c52f7d..7dd6c18 100644 --- a/cmake.nanorc +++ b/cmake.nanorc @@ -6,14 +6,17 @@ icolor green "^[[:space:]]*[A-Z0-9_]+" icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>" icolor brightgreen "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>" -color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]" +color brightgreen "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]" color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]" icolor brightred "^[[:space:]]*\<((end)?(function|macro)|return)" -icolor cyan start="\$(\{|ENV\{)" end="\}" +#String Color +color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" +color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" + +icolor brightred start="\$(\{|ENV\{)" end="\}" color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" icolor brightblue "^([[:space:]]*)?#.*" icolor brightblue "[[:space:]]#.*" -color ,green "[[:space:]]+$" From 495c715e13e5d7f194e677459a019a9e7a404d14 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sat, 17 Nov 2012 11:31:54 -0800 Subject: [PATCH 038/119] Added unsigned to cython. --- cython.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython.nanorc b/cython.nanorc index 8681430..3be7546 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -13,7 +13,7 @@ color brightmagenta "\<(continue|break|return)\>" # Cython Keyword Color color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>" -color red "\<(bint|char|double|int|public|void)\>" +color red "\<(bint|char|double|int|public|void|unsigned)\>" #Operator Color color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" From ca2ce956d2c48a0eb2b33b75fb7d854cb98a5460 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 26 Nov 2012 11:17:20 +0000 Subject: [PATCH 039/119] Added Arch Linux PKGBUILD nanorc. --- pkgbuild.nanorc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pkgbuild.nanorc diff --git a/pkgbuild.nanorc b/pkgbuild.nanorc new file mode 100644 index 0000000..aaea48e --- /dev/null +++ b/pkgbuild.nanorc @@ -0,0 +1,23 @@ +## Arch PKGBUILD files +## +syntax "pkgbuild" "^.*PKGBUILD$" +color green start="^." end="$" +color cyan "^.*(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license).*=.*$" +color brightcyan "\<(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)\>" +color brightcyan "(\$|\$\{|\$\()(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)(|\}|\))" +color cyan "^.*(depends|makedepends|optdepends|conflicts|provides|replaces).*=.*$" +color brightcyan "\<(depends|makedepends|optdepends|conflicts|provides|replaces)\>" +color brightcyan "(\$|\$\{|\$\()(depends|makedepends|optdepends|conflicts|provides|replaces)(|\}|\))" +color cyan "^.*(groups|backup|noextract|options).*=.*$" +color brightcyan "\<(groups|backup|noextract|options)\>" +color brightcyan "(\$|\$\{|\$\()(groups|backup|noextract|options)(|\}|\))" +color cyan "^.*(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums).*=.*$" +color brightcyan "\<(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)\>" +color brightcyan "(\$|\$\{|\$\()(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)(|\}|\))" +color brightcyan "\<(startdir|srcdir|pkgdir)\>" +color cyan "\.install" +color brightwhite "=" "'" "\(" "\)" "\"" "#.*$" "\," "\{" "\}" +color brightred "build\(\)" +color brightred "package_.*.*$" +color brightred "\<(configure|make|cmake|scons)\>" +color red "\<(DESTDIR|PREFIX|prefix|sysconfdir|datadir|libdir|includedir|mandir|infodir)\>" From 84808a0a460bf9edff76e42ee3505b6fa478b090 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 10 Dec 2012 20:23:03 -0600 Subject: [PATCH 040/119] Some minor changes to c and xml --- c.nanorc | 2 +- xml.nanorc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/c.nanorc b/c.nanorc index 1b201de..65e2d8d 100644 --- a/c.nanorc +++ b/c.nanorc @@ -29,7 +29,7 @@ color magenta "[(){}]" "\[" "\]" color cyan "<[^= ]*>" ""(\\.|[^"])*"" ## ## This string is VERY resource intensive! -color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" +#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" ## Comment highlighting color brightblue "//.*" diff --git a/xml.nanorc b/xml.nanorc index 0a84162..859f0dc 100644 --- a/xml.nanorc +++ b/xml.nanorc @@ -1,7 +1,7 @@ ## Here is an example for xml files. ## -syntax "ml" ".*\.([jrs]?html?|xml|sgml?)$" +syntax "ml" ".*\.([jrs]?html?|xml|sgml?|rng)$" color white "^.+$" color green start="<" end=">" color cyan "<[^> ]+" From dba968a7370d2a89933e02ed6774652bd62bce0f Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 20 Dec 2012 22:44:04 -0600 Subject: [PATCH 041/119] fixed decorator highlighting. --- python.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.nanorc b/python.nanorc index 3988a92..d76ab53 100644 --- a/python.nanorc +++ b/python.nanorc @@ -10,7 +10,7 @@ color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|fr color brightmagenta "\<(continue|break|return)\>" # decorator color -color brightgreen "@.*" +color brightgreen "@.*[(]" #Operator Color color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" From 2d87638c7a15c08f9f8f1d8aa1f866c5699b201b Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Fri, 1 Feb 2013 10:32:15 -0600 Subject: [PATCH 042/119] updated nano --- fortran.nanorc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fortran.nanorc b/fortran.nanorc index bf71460..4a8a06c 100644 --- a/fortran.nanorc +++ b/fortran.nanorc @@ -43,7 +43,8 @@ color magenta "[(){}]" "\[" "\]" color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" ## String highlighting. -icolor brightblue "<[^= ]*>" ""(\\.|[^"])*"" +icolor cyan "<[^= ]*>" ""(\\.|[^"])*"" +icolor cyan "<[^= ]*>" "'(\\.|[^"])*'" ## Comment highlighting icolor brightred "!.*$" "(^[Cc]| [Cc]) .*$" From f8e1998e278ed2384382d8f22196631220696b1f Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 27 Mar 2013 10:58:49 -0500 Subject: [PATCH 043/119] applied patch --- gentoo.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gentoo.nanorc b/gentoo.nanorc index 16a9127..a0432fe 100644 --- a/gentoo.nanorc +++ b/gentoo.nanorc @@ -16,10 +16,10 @@ color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\" "\" "\ [!a-zA-Z0-9_+ -]*" "inherit.*" color brightblue "\" color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" "\" -# color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +color brightblue "\<(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" color brightblue "\" "\" -# color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" -# color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" +color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" +color brightblue "\<(doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" ## Highlight common commands used in ebuilds color blue "\" "\<(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) From 9434b5d98e07a6285b9d64824668e3bb5cd97ec7 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Thu, 28 Mar 2013 10:03:25 -0500 Subject: [PATCH 044/119] added gitcommit rc, thanks @mikofski --- gitcommit.nanorc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gitcommit.nanorc diff --git a/gitcommit.nanorc b/gitcommit.nanorc new file mode 100644 index 0000000..0717e92 --- /dev/null +++ b/gitcommit.nanorc @@ -0,0 +1,14 @@ +syntax "gitcommit" "COMMIT_EDITMSG$" +color white "#.*" +color green "#.(modified|deleted).*" +color yellow start="# Changes.*" end="# Changed.*" +color cyan start="# Untracked.*" end="diff" +color cyan start="# Untracked.*" end="$$" +color brightred "^deleted file mode .*" +color brightgreen "^\+.*" +color brightred "^-.*" +color brightyellow "^(diff|index|---|\+\+\+).*" +color brightmagenta "@@.*@@" +color white "# (Change[ds]|Untracked) .*" +color white "#.*\(use .*" +color white "^#" From fd2e2845de6e7896499befe8b921e7c492d3b617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Fri, 31 May 2013 22:32:45 +0200 Subject: [PATCH 045/119] Nano Syntax Highlighting for Fish Shelll --- fish.nanorc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fish.nanorc diff --git a/fish.nanorc b/fish.nanorc new file mode 100644 index 0000000..d4cb305 --- /dev/null +++ b/fish.nanorc @@ -0,0 +1,15 @@ +## Here is an example for Fish shell scripts. +## +syntax "fish" "\.fish$" +magic "(Fish.*) shell script text" +icolor brightgreen "^[0-9A-Z_]+\(\)" +color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color green "\<(and|isatty|not|or|in)\>" +color yellow "--[a-z-]+" +color brightmagenta "\ -[a-z]+" +color brightblue "\<(bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set_color|status|trap|type|ulimit|umask|vared)\>" +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" +color cyan "(^|[[:space:]])#.*$" +color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color ,green "[[:space:]]+$" From b0d8af2aec7848b206c167aeab566824a1906437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Fri, 31 May 2013 22:38:52 +0200 Subject: [PATCH 046/119] Working GIT commit message syntax highligter --- git.nanorc | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 git.nanorc diff --git a/git.nanorc b/git.nanorc new file mode 100644 index 0000000..4f68d2c --- /dev/null +++ b/git.nanorc @@ -0,0 +1,64 @@ +# 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) +# +# Save this file to a directory of your choice and add it to your nanorc using +# include ${PATH_TO_THE_FILE}/git.nanorc + +# This syntax format is used for editing commit and tag messages +syntax "git commit/tag messages" "COMMIT_EDITMSG|TAG_EDITMSG" + +# Commit message +color white ".*" + +# Subject line (This is pretty weird, but it works at least for OS X' nano 2.0.6) +# color brightcyan start="^" end="$" + +# 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:" + +# Recolor hash symbols +color brightblack "#" + +# Trailing spaces +color ,red "[[:space:]]+$" + +# This syntax format is used for interactive rebasing +syntax "git rebase todo" "git-rebase-todo" + +# Default +color white ".*" + +# Comments +color brightblack "^#.*" + +# Commit IDs +color brightwhite "[0-9a-f]{7,40}" + +# 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 "#" From c2fbddca7aca3e20bb5023d695e917b020dbf680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Fri, 31 May 2013 22:41:09 +0200 Subject: [PATCH 047/119] Not working syntax --- gitcommit.nanorc | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 gitcommit.nanorc diff --git a/gitcommit.nanorc b/gitcommit.nanorc deleted file mode 100644 index 0717e92..0000000 --- a/gitcommit.nanorc +++ /dev/null @@ -1,14 +0,0 @@ -syntax "gitcommit" "COMMIT_EDITMSG$" -color white "#.*" -color green "#.(modified|deleted).*" -color yellow start="# Changes.*" end="# Changed.*" -color cyan start="# Untracked.*" end="diff" -color cyan start="# Untracked.*" end="$$" -color brightred "^deleted file mode .*" -color brightgreen "^\+.*" -color brightred "^-.*" -color brightyellow "^(diff|index|---|\+\+\+).*" -color brightmagenta "@@.*@@" -color white "# (Change[ds]|Untracked) .*" -color white "#.*\(use .*" -color white "^#" From d0cdc5d159ff89786b38281af872e1e38d3eea60 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Fri, 31 May 2013 15:45:45 -0500 Subject: [PATCH 048/119] added alias to gitcommit for backwards compatibility in nanorc files --- gitcommit.nanorc | 1 + 1 file changed, 1 insertion(+) create mode 120000 gitcommit.nanorc diff --git a/gitcommit.nanorc b/gitcommit.nanorc new file mode 120000 index 0000000..22ae20d --- /dev/null +++ b/gitcommit.nanorc @@ -0,0 +1 @@ +git.nanorc \ No newline at end of file From 297a5fcbdc2d45920659553a979e45f47d5806ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Sat, 1 Jun 2013 22:51:09 +0200 Subject: [PATCH 049/119] Improvment for git * highlight for untracked files in commit * rebase fixes (noop, commit ids, colors) * .gitconfig syntax --- git.nanorc | 54 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/git.nanorc b/git.nanorc index 4f68d2c..bce9c8a 100644 --- a/git.nanorc +++ b/git.nanorc @@ -20,14 +20,17 @@ color white ".*" # 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 blue "^# [^/?*:;{}\\]+$" + # Recolor hash symbols color brightblack "#" @@ -41,24 +44,37 @@ syntax "git rebase todo" "git-rebase-todo" color white ".*" # Comments -color brightblack "^#.*" - -# Commit IDs -color brightwhite "[0-9a-f]{7,40}" +color brightblack "^#.*" +color brightred "^noop$" # 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 )" +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 brightmagenta "^(p|pick) [0-9a-f]{7,40}" +color brightmagenta "^# (p, pick)" +color blue "^(r|reword) [0-9a-f]{7,40}" +color blue "^# (r, reword)" +color brightcyan "^(s|squash) [0-9a-f]{7,40}" +color brightcyan "^# (s, squash)" +color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}" +color yellow "^# (x, exec)" # Recolor hash symbols -color brightblack "#" +color brightblack "#" + +# Commit IDs +color white "[0-9a-f]{7,40}" + +# Derived from https://github.com/craigbarnes/nanorc +syntax "gitconfig" "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 " +" + From 9975b237ac4e9902cce685c2a3ee26abbf107a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Sat, 1 Jun 2013 22:59:28 +0200 Subject: [PATCH 050/119] Syntax for markdown format --- markdown.nanorc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 markdown.nanorc diff --git a/markdown.nanorc b/markdown.nanorc new file mode 100644 index 0000000..5a1755c --- /dev/null +++ b/markdown.nanorc @@ -0,0 +1,17 @@ +syntax "markdown" "\.(md|mkd|mkdn|markdown)$" + +# Emphasis +color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)" + +# Strong emphasis +color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)" + +color brightmagenta "^=====*$|^-----*$|^#{1,6}.*" +color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " +color black "^[[:space:]]+" +color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($$ +color brightyellow "\!?\[[^]]*\]([[:space:]]*\[[^]]*\]|\(.*\))?" +color brightyellow "^\[.*\]:[[:space:]]*[^"]*" +color yellow "`[^`]*`|^ {4}[^-+*].*" +color brightblack "^>.*" + From e5cc8be8639a9f535fb5f41d2dfa8d647bedb659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Sun, 2 Jun 2013 12:48:33 +0200 Subject: [PATCH 051/119] More syntax files from craigbarnes/nanorc --- awk.nanorc | 25 ++++++++++ coffeescript.nanorc | 16 +++++++ colortest.nanorc | 17 +++++++ csharp.nanorc | 27 +++++++++++ dot.nanorc | 8 ++++ email.nanorc | 5 ++ glsl.nanorc | 16 +++++++ go.nanorc | 23 ++++++++++ import.nanorc | 108 ++++++++++++++++++++++++++++++++++++++++++++ ini.nanorc | 11 +++++ inputrc.nanorc | 10 ++++ javascript.nanorc | 23 ++++++++++ json.nanorc | 11 +++++ keymap.nanorc | 10 ++++ kickstart.nanorc | 15 ++++++ ledger.nanorc | 9 ++++ lisp.nanorc | 14 ++++++ makefile.nanorc | 22 +++++++++ mpdconf.nanorc | 9 ++++ nginx.nanorc | 14 ++++++ peg.nanorc | 12 +++++ pkg-config.nanorc | 8 ++++ po.nanorc | 8 ++++ privoxy.nanorc | 29 ++++++++++++ rpmspec.nanorc | 27 +++++++++++ sed.nanorc | 9 ++++ sql.nanorc | 34 ++++++++++++++ systemd.nanorc | 12 +++++ vala.nanorc | 19 ++++++++ vi.nanorc | 11 +++++ xresources.nanorc | 10 ++++ yaml.nanorc | 13 ++++++ yum.nanorc | 8 ++++ 33 files changed, 593 insertions(+) create mode 100644 awk.nanorc create mode 100644 coffeescript.nanorc create mode 100644 colortest.nanorc create mode 100644 csharp.nanorc create mode 100644 dot.nanorc create mode 100644 email.nanorc create mode 100644 glsl.nanorc create mode 100644 go.nanorc create mode 100644 import.nanorc create mode 100644 ini.nanorc create mode 100644 inputrc.nanorc create mode 100644 javascript.nanorc create mode 100644 json.nanorc create mode 100644 keymap.nanorc create mode 100644 kickstart.nanorc create mode 100644 ledger.nanorc create mode 100644 lisp.nanorc create mode 100644 makefile.nanorc create mode 100644 mpdconf.nanorc create mode 100644 nginx.nanorc create mode 100644 peg.nanorc create mode 100644 pkg-config.nanorc create mode 100644 po.nanorc create mode 100644 privoxy.nanorc create mode 100644 rpmspec.nanorc create mode 100644 sed.nanorc create mode 100644 sql.nanorc create mode 100644 systemd.nanorc create mode 100644 vala.nanorc create mode 100644 vi.nanorc create mode 100644 xresources.nanorc create mode 100644 yaml.nanorc create mode 100644 yum.nanorc diff --git a/awk.nanorc b/awk.nanorc new file mode 100644 index 0000000..02ed08b --- /dev/null +++ b/awk.nanorc @@ -0,0 +1,25 @@ +syntax "awk" "\.awk$" +header "^#!.*bin/(env +)?awk( |$)" + +color brightyellow "\$[A-Za-z0-9_!@#$*?-]+" +color brightyellow "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>" +color brightyellow "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>" +color brightyellow "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>" +color brightblue "\<(function|extension|BEGIN|END)\>" +color red "[-+*/%^|!=&<>?;:]|\\|\[|\]" +color cyan "\<(for|if|while|do|else|in|delete|exit)\>" +color cyan "\<(break|continue|return)\>" +color brightblue "\<(close|getline|next|nextfile|print|printf|system|fflush)\>" +color brightblue "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>" +color brightblue "\<(asort|asorti|gensub|gsub|index|length|match)\>" +color brightblue "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>" +color brightblue "\<(mktime|strftime|systime)\>" +color brightblue "\<(and|compl|lshift|or|rshift|xor)\>" +color brightblue "\<(bindtextdomain|dcgettext|dcngettext)\>" +color magenta "/.*[^\]/" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\." +color brightblack "(^|[[:space:]])#([^{].*)?$" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/coffeescript.nanorc b/coffeescript.nanorc new file mode 100644 index 0000000..4e1650c --- /dev/null +++ b/coffeescript.nanorc @@ -0,0 +1,16 @@ +syntax "coffeescript" "\.coffee$" +header "^#!.*/(env +)?coffee" + +color red "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>" +color brightblue "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->" +color black "[()]" +color cyan "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>" +color cyan "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>" +color cyan "\<(debugger|switch|while|do|class|extends|super)\>" +color cyan "\<(undefined|then|unless|until|loop|of|by|when)\>" +color brightcyan "\<(true|false|yes|no|on|off)\>" +color brightyellow "@[A-Za-z0-9_]*" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/colortest.nanorc b/colortest.nanorc new file mode 100644 index 0000000..bf48aaf --- /dev/null +++ b/colortest.nanorc @@ -0,0 +1,17 @@ +syntax "colortest" "ColorTest$" + +color black "\" + +color red "\" +color green "\" +color yellow "\" +color blue "\" +color magenta "\" +color cyan "\" + +color brightred "\" +color brightgreen "\" +color brightyellow "\" +color brightblue "\" +color brightmagenta "\" +color brightcyan "\" diff --git a/csharp.nanorc b/csharp.nanorc new file mode 100644 index 0000000..6390b38 --- /dev/null +++ b/csharp.nanorc @@ -0,0 +1,27 @@ +syntax "c#" "\.cs$" + +# Class +color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?" + +# Annotation +color magenta "@[A-Za-z]+" + +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color green "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>" +color cyan "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>" +color cyan "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>" +# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can) +color cyan "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>" +color brightred "\<(break|continue)\>" +color brightcyan "\<(true|false)\>" +color red "[-+/*=<>?:!~%&|]" +color blue "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\([btnfr]|'|\"|\\)" +color magenta "\\u[A-Fa-f0-9]{4}" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/dot.nanorc b/dot.nanorc new file mode 100644 index 0000000..ae4f4b0 --- /dev/null +++ b/dot.nanorc @@ -0,0 +1,8 @@ +syntax "dot" "\.(dot|gv)$" + +color cyan "\<(digraph|edge|graph|node|subgraph)\>" +color magenta "\<(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\>" +color red "=|->|--" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" diff --git a/email.nanorc b/email.nanorc new file mode 100644 index 0000000..6cd564e --- /dev/null +++ b/email.nanorc @@ -0,0 +1,5 @@ +syntax "email" + +color magenta "^>([^>].*|$)" +color blue "^>>([^>].*|$)" +color green "^>>>.*" diff --git a/glsl.nanorc b/glsl.nanorc new file mode 100644 index 0000000..bdd1b08 --- /dev/null +++ b/glsl.nanorc @@ -0,0 +1,16 @@ +syntax "glsl" "\.(frag|vert|fp|vp|glsl)$" + +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color green "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>" +color green "\" +color cyan "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>" +color brightred "\<(break|continue)\>" +color brightcyan "\<(true|false)\>" +color red "[-+/*=<>?:!~%&|^]" +color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/go.nanorc b/go.nanorc new file mode 100644 index 0000000..67351ea --- /dev/null +++ b/go.nanorc @@ -0,0 +1,23 @@ +syntax "go" "\.go$" + +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color brightblue "\<(append|cap|close|complex|copy|delete|imag|len)\>" +color brightblue "\<(make|new|panic|print|println|protect|real|recover)\>" +color green "\<(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\>" +color green "\<(uintptr|byte|rune|string|interface|bool|map|chan|error)\>" +color cyan "\<(package|import|const|var|type|struct|func|go|defer|nil|iota)\>" +color cyan "\<(for|range|if|else|case|default|switch|return)\>" +color brightred "\<(go|goto|break|continue)\>" +color brightcyan "\<(true|false)\>" +color red "[-+/*=<>!~%&|^]|:=" +color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>|'.'" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\[abfnrtv'\"\\]" +color magenta "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})" +color yellow "`[^`]*`" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/import.nanorc b/import.nanorc new file mode 100644 index 0000000..70f14a1 --- /dev/null +++ b/import.nanorc @@ -0,0 +1,108 @@ +include ~/.nano/yaml.nanorc +include ~/.nano/dot.nanorc +include ~/.nano/fish.nanorc +include ~/.nano/keymap.nanorc +include ~/.nano/lua.nanorc +include ~/.nano/php.nanorc +include ~/.nano/glsl.nanorc +include ~/.nano/csharp.nanorc +include ~/.nano/kickstart.nanorc +include ~/.nano/email.nanorc +include ~/.nano/coffeescript.nanorc +include ~/.nano/json.nanorc +include ~/.nano/privoxy.nanorc +include ~/.nano/ini.nanorc +include ~/.nano/patch.nanorc +include ~/.nano/systemd.nanorc +include ~/.nano/nginx.nanorc +include ~/.nano/ledger.nanorc +include ~/.nano/awk.nanorc +include ~/.nano/sh.nanorc +include ~/.nano/ruby.nanorc +include ~/.nano/lisp.nanorc +include ~/.nano/cmake.nanorc +include ~/.nano/git.nanorc +include ~/.nano/html.nanorc +include ~/.nano/colortest.nanorc +include ~/.nano/xresources.nanorc +include ~/.nano/tex.nanorc +include ~/.nano/css.nanorc +include ~/.nano/go.nanorc +include ~/.nano/nanorc.nanorc +include ~/.nano/sql.nanorc +include ~/.nano/pkg-config.nanorc +include ~/.nano/man.nanorc +include ~/.nano/vala.nanorc +include ~/.nano/java.nanorc +include ~/.nano/yum.nanorc +include ~/.nano/inputrc.nanorc +include ~/.nano/pkgbuild.nanorc +include ~/.nano/xml.nanorc +include ~/.nano/sed.nanorc +include ~/.nano/c.nanorc +include ~/.nano/javascript.nanorc +include ~/.nano/cython.nanorc +include ~/.nano/markdown.nanorc +include ~/.nano/mpdconf.nanorc +include ~/.nano/peg.nanorc +include ~/.nano/main.nanorc +include ~/.nano/po.nanorc +include ~/.nano/python.nanorc +include ~/.nano/makefile.nanorc +include ~/.nano/vi.nanorc +include ~/.nano/rpmspec.nanorc +include ~/.nano/yaml.nanorc +include ~/.nano/dot.nanorc +include ~/.nano/fish.nanorc +include ~/.nano/keymap.nanorc +include ~/.nano/lua.nanorc +include ~/.nano/php.nanorc +include ~/.nano/glsl.nanorc +include ~/.nano/csharp.nanorc +include ~/.nano/kickstart.nanorc +include ~/.nano/email.nanorc +include ~/.nano/coffeescript.nanorc +include ~/.nano/json.nanorc +include ~/.nano/privoxy.nanorc +include ~/.nano/ini.nanorc +include ~/.nano/patch.nanorc +include ~/.nano/import.nanorc +include ~/.nano/systemd.nanorc +include ~/.nano/nginx.nanorc +include ~/.nano/ledger.nanorc +include ~/.nano/awk.nanorc +include ~/.nano/sh.nanorc +include ~/.nano/ruby.nanorc +include ~/.nano/lisp.nanorc +include ~/.nano/cmake.nanorc +include ~/.nano/git.nanorc +include ~/.nano/html.nanorc +include ~/.nano/colortest.nanorc +include ~/.nano/xresources.nanorc +include ~/.nano/tex.nanorc +include ~/.nano/css.nanorc +include ~/.nano/go.nanorc +include ~/.nano/nanorc.nanorc +include ~/.nano/sql.nanorc +include ~/.nano/pkg-config.nanorc +include ~/.nano/man.nanorc +include ~/.nano/vala.nanorc +include ~/.nano/java.nanorc +include ~/.nano/yum.nanorc +include ~/.nano/inputrc.nanorc +include ~/.nano/pkgbuild.nanorc +include ~/.nano/xml.nanorc +include ~/.nano/sed.nanorc +include ~/.nano/c.nanorc +include ~/.nano/javascript.nanorc +include ~/.nano/cython.nanorc +include ~/.nano/markdown.nanorc +include ~/.nano/mpdconf.nanorc +include ~/.nano/peg.nanorc +include ~/.nano/main.nanorc +include ~/.nano/po.nanorc +include ~/.nano/python.nanorc +include ~/.nano/makefile.nanorc +include ~/.nano/vi.nanorc +include ~/.nano/rpmspec.nanorc +include ~/.nano/import.nanorc diff --git a/ini.nanorc b/ini.nanorc new file mode 100644 index 0000000..bc4387b --- /dev/null +++ b/ini.nanorc @@ -0,0 +1,11 @@ +syntax "ini" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$" +header "^\[[A-Za-z]+\]$" + +color brightcyan "\<(true|false)\>" +color cyan "^[[:space:]]*[^=]*=" +color brightmagenta "^[[:space:]]*\[.*\]$" +color red "[=;]" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/inputrc.nanorc b/inputrc.nanorc new file mode 100644 index 0000000..16b9f30 --- /dev/null +++ b/inputrc.nanorc @@ -0,0 +1,10 @@ +syntax "inputrc" "inputrc$" + +color red "\<(off|none)\>" +color green "\" +color brightblue "\" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\.?" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/javascript.nanorc b/javascript.nanorc new file mode 100644 index 0000000..5b0e8be --- /dev/null +++ b/javascript.nanorc @@ -0,0 +1,23 @@ +syntax "JavaScript" "\.js$" + +color blue "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" +color blue "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" +color blue "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color cyan "\<(break|case|catch|continue|default|delete|do|else|finally)\>" +color cyan "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>" +color cyan "\<(switch|this|throw|try|typeof|var|void|while|with)\>" +color cyan "\<(null|undefined|NaN)\>" +color brightcyan "\<(true|false)\>" +color green "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" +color green "\<(Number|Object|RegExp|String)\>" +color red "[-+/*=<>!~%?:&|]" +color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/json.nanorc b/json.nanorc new file mode 100644 index 0000000..1740a4c --- /dev/null +++ b/json.nanorc @@ -0,0 +1,11 @@ +syntax "json" "\.json$" +header "^\{$" + +color blue "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" +color cyan "\" +color brightcyan "\<(true|false)\>" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightyellow "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:" +color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/keymap.nanorc b/keymap.nanorc new file mode 100644 index 0000000..bc2bdb9 --- /dev/null +++ b/keymap.nanorc @@ -0,0 +1,10 @@ +syntax "keymap" "\.(k|key)?map$|Xmodmap$" + +color cyan "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>" +color cyan "\<(control|alt|shift)\>" +color blue "\<[0-9]+\>" +color red "=" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "^!.*$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/kickstart.nanorc b/kickstart.nanorc new file mode 100644 index 0000000..85e2213 --- /dev/null +++ b/kickstart.nanorc @@ -0,0 +1,15 @@ +syntax "KickStart" "\.ks$" "\.kickstart$" + +color brightmagenta "%[a-z]+" +color cyan "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)" +color cyan "--(name|mirrorlist|baseurl|utc)(=|\>)" +color brightyellow "\$(releasever|basearch)\>" + +# Packages and groups +color brightblack "^@[A-Za-z][A-Za-z-]*" +color brightred "^-@[a-zA-Z0-9*-]+" +color red "^-[a-zA-Z0-9*-]+" + +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/ledger.nanorc b/ledger.nanorc new file mode 100644 index 0000000..fa08338 --- /dev/null +++ b/ledger.nanorc @@ -0,0 +1,9 @@ +syntax "ledger" "(^|\.|/)ledger$" + +color brightmagenta "^([0-9]{4}/[0-9]{2}/[0-9]{2}|[=~]) .*" +color blue "^[0-9]{4}/[0-9]{2}/[0-9]{2}" +color brightyellow "^~ .*" +color brightblue "^= .*" +color cyan "^[[:space:]]+\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" +color red "[*]" +color brightblack "^[[:space:]]*;.*" diff --git a/lisp.nanorc b/lisp.nanorc new file mode 100644 index 0000000..8094c7f --- /dev/null +++ b/lisp.nanorc @@ -0,0 +1,14 @@ +syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$" + +color brightblue "\([a-z-]+" +color red "\(([-+*/<>]|<=|>=)|'" +color black "\(" +color blue "\<[0-9]+\>" +icolor cyan "\" +color brightcyan "\<[tT]\>" +color yellow "\"(\\.|[^"])*\"" +color magenta "'[A-Za-z][A-Za-z0-9_-]+" +color magenta "\\.?" +color brightblack "(^|[[:space:]]);.*" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/makefile.nanorc b/makefile.nanorc new file mode 100644 index 0000000..3e751a2 --- /dev/null +++ b/makefile.nanorc @@ -0,0 +1,22 @@ +syntax "makefile" "([Mm]akefile|\.ma?k)$" +header "^#!.*/(env +)?[bg]?make( |$)" + +color cyan "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>" +color cyan "^(export|include|override)\>" +color brightmagenta "^[^:= ]+:" +color red "[=,%]" "\+=|\?=|:=|&&|\|\|" +color brightblue "\$\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]" +color brightblue "\$\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]" +color brightblue "\$\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]" +color brightblue "\$\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]" +color brightblue "\$\((value|warning|wildcard|word|wordlist|words)[[:space:]]" +color black "[()$]" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightyellow "\$+(\{[^} ]+\}|\([^) ]+\))" +color brightyellow "\$[@^<*?%|+]|\$\([@^<*?%+-][DF]\)" +color magenta "\$\$|\\.?" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color brightblack "^ @#.*" + +# Show trailing whitespace +color ,green "[[:space:]]+$" diff --git a/mpdconf.nanorc b/mpdconf.nanorc new file mode 100644 index 0000000..ea57468 --- /dev/null +++ b/mpdconf.nanorc @@ -0,0 +1,9 @@ +syntax "mpdconf" "mpd\.conf$" + +color cyan "\<(user|group|bind_to_address|host|port|plugin|name|type)\>" +color cyan "\<((music|playlist)_directory|(db|log|state|pid|sticker)_file)\>" +color brightmagenta "^(input|audio_output|decoder)[[:space:]]*\{|\}" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/nginx.nanorc b/nginx.nanorc new file mode 100644 index 0000000..a671237 --- /dev/null +++ b/nginx.nanorc @@ -0,0 +1,14 @@ +syntax "nginx" "nginx.*\.conf$" "\.nginx$" +header "^(server|upstream)[a-z ]*\{$" + +color brightmagenta "\<(events|server|http|location|upstream)[[:space:]]*\{" +color cyan "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)" +color black "[{}]" +color brightcyan "\<(on|off)\>" +color brightyellow "\$[A-Za-z][A-Za-z0-9_]*" +color red "[*]" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color yellow start="'$" end="';$" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/peg.nanorc b/peg.nanorc new file mode 100644 index 0000000..975c628 --- /dev/null +++ b/peg.nanorc @@ -0,0 +1,12 @@ +syntax "peg" "\.l?peg$" + +color cyan "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-" +color blue "\^[+-]?[0-9]+" +color red "[-+*?^/!&]|->|<-|=>" +color brightyellow "%[A-Za-z][A-Za-z0-9_]*" +color magenta "\[[^]]*\]" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])\-\-.*$" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/pkg-config.nanorc b/pkg-config.nanorc new file mode 100644 index 0000000..1d05b03 --- /dev/null +++ b/pkg-config.nanorc @@ -0,0 +1,8 @@ +syntax "pkg-config" "\.pc$" + +color cyan "^(Name|Description|URL|Version|Conflicts|Cflags):" +color cyan "^(Requires|Libs)(\.private)?:" +color red "=" +color brightyellow "\$\{[A-Za-z_][A-Za-z0-9_]*\}" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/po.nanorc b/po.nanorc new file mode 100644 index 0000000..79d521f --- /dev/null +++ b/po.nanorc @@ -0,0 +1,8 @@ +syntax "po" "\.pot?$" + +color cyan "\<(msgid|msgstr)\>" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color magenta "\\.?" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/privoxy.nanorc b/privoxy.nanorc new file mode 100644 index 0000000..cd8d992 --- /dev/null +++ b/privoxy.nanorc @@ -0,0 +1,29 @@ +syntax "privoxy-config" "privoxy/config$" + +color cyan "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" + +syntax "privoxy-action" "\.action$" + +color brightred "[{[:space:]]\-block([[:space:]{}]|$)" +color brightgreen "[{[:space:]]\+block([[:space:]{}]|$)" + +color brightred "-(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" +color brightgreen "\+(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" +color black "[{}]" +color magenta "\\.?" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" + +syntax "privoxy-filter" "\.filter$" + +color cyan "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER): [a-z-]+" +color brightblue "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER):" +color magenta "\\.?" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" + diff --git a/rpmspec.nanorc b/rpmspec.nanorc new file mode 100644 index 0000000..4370c1c --- /dev/null +++ b/rpmspec.nanorc @@ -0,0 +1,27 @@ +syntax "rpmspec" "\.spec$" "\.rpmspec$" + +color cyan "\<(Icon|ExclusiveOs|ExcludeOs):" +color cyan "\<(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):" +color cyan "\<(Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):" +color cyan "\<(Epoch|Serial|Nosource|Nopatch):" +color cyan "\<(AutoReq|AutoProv|AutoReqProv):" +color cyan "\<(Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):" +color cyan "\<(Name|Version|Release|Url|URL):" +color cyan start="^(Source|Patch)" end=":" +color cyan "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" +color cyan "(ifarch|ifnarch|ifos|ifnos)" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightyellow "%(if|else|endif|define|global|undefine)" +color brightyellow "%_?([A-Z_a-z_0-9_]*)" +color brightyellow start="%\{" end="\}" +color brightyellow start="%\{__" end="\}" +color brightyellow "\$(RPM_BUILD_ROOT)\>" +color brightmagenta "^%(build$|changelog|check$|clean$|description)" +color brightmagenta "^%(files|install$|package|prep$)" +color brightmagenta "^%(pre|preun|pretrans|post|postun|posttrans)" +color brightmagenta "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color blue "^\*.*$" +color ,green "[[:space:]]+$" +color ,red " +" +color brightwhite,cyan "TODO:?" diff --git a/sed.nanorc b/sed.nanorc new file mode 100644 index 0000000..37692df --- /dev/null +++ b/sed.nanorc @@ -0,0 +1,9 @@ +syntax "sed" "\.sed$" +header "^#!.*bin/(env +)?sed( |$)" + +color red "[|^$.*+]" +color brightyellow "\{[0-9]+,?[0-9]*\}" +color magenta "\\." +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/sql.nanorc b/sql.nanorc new file mode 100644 index 0000000..89417c5 --- /dev/null +++ b/sql.nanorc @@ -0,0 +1,34 @@ +syntax "sql" "\.sql$" "sqliterc$" + +icolor cyan "\<(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\>" +icolor cyan "\<(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\>" +icolor cyan "\<(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\>" +icolor cyan "\<(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\>" +icolor cyan "\<(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\>" +icolor cyan "\<(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\>" +icolor cyan "\<(GROUP|GRANT|HAVING)\>" +icolor cyan "\<(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\>" +icolor cyan "\<(JOIN|KEYS|KILL|KEY)\>" +icolor cyan "\<(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\>" +icolor cyan "\<(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\>" +icolor cyan "\<(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\>" +icolor cyan "\<(PROCEDURE|PROCEDURAL|PRIMARY)\>" +icolor cyan "\<(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\>" +icolor cyan "\<(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\>" +icolor cyan "\<(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\>" +icolor cyan "\<(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\>" +icolor cyan "\<(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\>" +color green "\<(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\>" + +# SQLite meta commands +icolor cyan "\.\<(databases|dump|echo|exit|explain|header(s)?|help)\>" +icolor cyan "\.\<(import|indices|mode|nullvalue|output|prompt|quit|read)\>" +icolor cyan "\.\<(schema|separator|show|tables|timeout|width)\>" +color brightcyan "\<(ON|OFF)\>" + +color blue "\<([0-9]+)\>" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color yellow "`(\\.|[^\\`])*`" +color brightblack "\-\-.*$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/systemd.nanorc b/systemd.nanorc new file mode 100644 index 0000000..9a7a658 --- /dev/null +++ b/systemd.nanorc @@ -0,0 +1,12 @@ +syntax "systemd" "\.(service|socket)$" +header "^\[Unit\]$" + +color cyan "^(Accept|After|Alias|AllowIsolate|Also|ANSI_COLOR|_AUDIT_LOGINUID|_AUDIT_SESSION|Backlog|Before|BindIPv6Only|BindsTo|BindToDevice|BlockIOReadBandwidth|BlockIOWeight|BlockIOWriteBandwidth|_BOOT_ID|Broadcast|BUG_REPORT_URL|BusName|Capabilities|CapabilityBoundingSet|CHASSIS|cipher|class|_CMDLINE|CODE_FILE|CODE_FUNC|CODE_LINE|_COMM|Compress|ConditionACPower|ConditionCapability|ConditionDirectoryNotEmpty|ConditionFileIsExecutable|ConditionFileNotEmpty|ConditionHost|ConditionKernelCommandLine|ConditionNull|ConditionPathExists|ConditionPathExistsGlob|ConditionPathIsDirectory|ConditionPathIsMountPoint|ConditionPathIsReadWrite|ConditionPathIsSymbolicLink|ConditionSecurity|ConditionVirtualization|Conflicts|ControlGroup|ControlGroupAttribute|ControlGroupModify|ControlGroupPersistent|controllers|Controllers|CPE_NAME|CPUAffinity|CPUSchedulingPolicy|CPUSchedulingPriority|CPUSchedulingResetOnFork|CPUShares|CrashChVT|CrashShell|__CURSOR|debug|DefaultControllers|DefaultDependencies|DefaultLimitAS|DefaultLimitCORE|DefaultLimitCPU|DefaultLimitDATA|DefaultLimitFSIZE|DefaultLimitLOCKS|DefaultLimitMEMLOCK|DefaultLimitMSGQUEUE|DefaultLimitNICE|DefaultLimitNOFILE|DefaultLimitNPROC|DefaultLimitRSS|DefaultLimitRTPRIO|DefaultLimitRTTIME|DefaultLimitSIGPENDING|DefaultLimitSTACK|DefaultStandardError|DefaultStandardOutput|Description|DeviceAllow|DeviceDeny|DirectoryMode|DirectoryNotEmpty|Documentation|DumpCore|entropy|Environment|EnvironmentFile|ERRNO|event_timeout|_EXE|ExecReload|ExecStart|ExecStartPost|ExecStartPre|ExecStop|ExecStopPost|ExecStopPre|filter|FONT|FONT_MAP|FONT_UNIMAP|ForwardToConsole|ForwardToKMsg|ForwardToSyslog|FreeBind|freq|FsckPassNo|fstab|_GID|Group|GuessMainPID|HandleHibernateKey|HandleLidSwitch|HandlePowerKey|HandleSuspendKey|hash|HibernateKeyIgnoreInhibited|HOME_URL|_HOSTNAME|ICON_NAME|ID|IdleAction|IdleActionSec|ID_LIKE|ID_MODEL|ID_MODEL_FROM_DATABASE|IgnoreOnIsolate|IgnoreOnSnapshot|IgnoreSIGPIPE|InaccessibleDirectories|InhibitDelayMaxSec|init|IOSchedulingClass|IOSchedulingPriority|IPTOS|IPTTL|JobTimeoutSec|JoinControllers|KeepAlive|KEYMAP|KEYMAP_TOGGLE|KillExcludeUsers|KillMode|KillOnlyUsers|KillSignal|KillUserProcesses|LidSwitchIgnoreInhibited|LimitAS|LimitCORE|LimitCPU|LimitDATA|LimitFSIZE|LimitLOCKS|LimitMEMLOCK|LimitMSGQUEUE|LimitNICE|LimitNOFILE|LimitNPROC|LimitRSS|LimitRTPRIO|LimitRTTIME|LimitSIGPENDING|LimitSTACK|link_priority|valueListenDatagram|ListenFIFO|ListenMessageQueue|ListenNetlink|ListenSequentialPacket|ListenSpecial|ListenStream|LogColor|LogLevel|LogLocation|LogTarget|luks|_MACHINE_ID|MakeDirectory|Mark|MaxConnections|MaxFileSec|MaxLevelConsole|MaxLevelKMsg|MaxLevelStore|MaxLevelSyslog|MaxRetentionSec|MemoryLimit|MemorySoftLimit|MESSAGE|MESSAGE_ID|MessageQueueMaxMessages|MessageQueueMessageSize|__MONOTONIC_TIMESTAMP|MountFlags|NAME|NAutoVTs|Nice|NonBlocking|NoNewPrivileges|NotifyAccess|OnActiveSec|OnBootSec|OnCalendar|OnFailure|OnFailureIsolate|OnStartupSec|OnUnitActiveSec|OnUnitInactiveSec|OOMScoreAdjust|Options|output|PAMName|PartOf|PassCredentials|PassSecurity|PathChanged|PathExists|PathExistsGlob|PathModified|PermissionsStartOnly|_PID|PIDFile|PipeSize|PowerKeyIgnoreInhibited|PRETTY_HOSTNAME|PRETTY_NAME|Priority|PRIORITY|PrivateNetwork|PrivateTmp|PropagatesReloadTo|pss|RateLimitBurst|RateLimitInterval|ReadOnlyDirectories|ReadWriteDirectories|__REALTIME_TIMESTAMP|ReceiveBuffer|RefuseManualStart|RefuseManualStop|rel|ReloadPropagatedFrom|RemainAfterExit|RequiredBy|Requires|RequiresMountsFor|RequiresOverridable|Requisite|RequisiteOverridable|ReserveVT|ResetControllers|Restart|RestartPreventExitStatus|RestartSec|RootDirectory|RootDirectoryStartOnly|RuntimeKeepFree|RuntimeMaxFileSize|RuntimeMaxUse|RuntimeWatchdogSec|samples|scale_x|scale_y|Seal|SecureBits|_SELINUX_CONTEXT|SendBuffer|SendSIGKILL|Service|ShowStatus|ShutdownWatchdogSec|size|SmackLabel|SmackLabelIPIn|SmackLabelIPOut|SocketMode|Sockets|SourcePath|_SOURCE_REALTIME_TIMESTAMP|SplitMode|StandardError|StandardInput|StandardOutput|StartLimitAction|StartLimitBurst|StartLimitInterval|static_node|StopWhenUnneeded|Storage|string_escape|none|replaceSuccessExitStatus|SupplementaryGroups|SUPPORT_URL|SuspendKeyIgnoreInhibited|SyslogFacility|SYSLOG_FACILITY|SyslogIdentifier|SYSLOG_IDENTIFIER|SyslogLevel|SyslogLevelPrefix|SYSLOG_PID|SystemCallFilter|SYSTEMD_ALIAS|_SYSTEMD_CGROUP|_SYSTEMD_OWNER_UID|SYSTEMD_READY|_SYSTEMD_SESSION|_SYSTEMD_UNIT|_SYSTEMD_USER_UNIT|SYSTEMD_WANTS|SystemKeepFree|SystemMaxFileSize|SystemMaxUse|SysVStartPriority|TCPCongestion|TCPWrapName|timeout|TimeoutSec|TimeoutStartSec|TimeoutStopSec|TimerSlackNSec|Transparent|_TRANSPORT|tries|TTYPath|TTYReset|TTYVHangup|TTYVTDisallocate|Type|_UID|UMask|Unit|User|UtmpIdentifier|VERSION|VERSION_ID|WantedBy|Wants|WatchdogSec|What|Where|WorkingDirectory)=" +color brightblue "^\.include\>" +color red "=" +color brightmagenta "^\[(Unit|Install|Service|Socket)\]" +color brightyellow "\$MAINPID" +color brightcyan "\<(true|false)\>" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/vala.nanorc b/vala.nanorc new file mode 100644 index 0000000..bedac18 --- /dev/null +++ b/vala.nanorc @@ -0,0 +1,19 @@ +syntax "vala" "\.vala$" + +color green "\<(float|double|bool|char|int|uint|short|long|void|(un)?signed)\>" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color cyan "\<(for|if|while|do|else|case|default|switch|try|throw|catch)\>" +color cyan "\<(inline|typedef|struct|enum|union|extern|static|const)\>" +color cyan "\<(operator|new|delete|return|null)\>" +color cyan "\<(class|override|private|public|signal|this|weak)\>" +color brightred "\<(goto|break|continue)\>" +color brightcyan "\<(true|false)\>" +color blue "\<([0-9]+)\>" +color red "[-+/*=<>?:!~%&|]" "->" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])//.*" +color brightblack start="/\*" end="\*/" +color brightwhite,cyan "TODO:?" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/vi.nanorc b/vi.nanorc new file mode 100644 index 0000000..6098b82 --- /dev/null +++ b/vi.nanorc @@ -0,0 +1,11 @@ +syntax "vi" "(^|/|\.)(ex|vim)rc$|\.vim" + +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" +color black "[(]" +color cyan "\<([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\>" +color cyan "\<(snor|nun|nm|set|if|endif|let|unlet)\>" +color red "[!&=]" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])\"[^"]*$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/xresources.nanorc b/xresources.nanorc new file mode 100644 index 0000000..3a6287f --- /dev/null +++ b/xresources.nanorc @@ -0,0 +1,10 @@ +syntax "xresources" "X(defaults|resources)$" + +color green "^[[:alnum:]]+\*" +color brightyellow "\*[[:alnum:]]+\:" +color blue "\<[0-9]+\>" +color red "[*:=]" +color brightcyan "\<(true|false)\>" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/yaml.nanorc b/yaml.nanorc new file mode 100644 index 0000000..9956ac7 --- /dev/null +++ b/yaml.nanorc @@ -0,0 +1,13 @@ +syntax "yaml" "\.ya?ml$" +header "^---" "%YAML" + +color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " +color brightcyan "\<(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\>" +color brightcyan "\<(true|false)\>" +color red ":[[:space:]]" "\[" "\]" ":[[:space:]]+[|>]" "^[[:space:]]*- " +color brightyellow "[[:space:]][\*&][A-Za-z0-9]+" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color brightmagenta "^---" "^\.\.\." "^%YAML" "^%TAG" +color ,green "[[:space:]]+$" +color ,red " +" diff --git a/yum.nanorc b/yum.nanorc new file mode 100644 index 0000000..58c1a0b --- /dev/null +++ b/yum.nanorc @@ -0,0 +1,8 @@ +syntax "yum" "\.repo$|yum.*\.conf$" + +color cyan "^[[:space:]]*[^=]*=" +color brightmagenta "^[[:space:]]*\[.*\]$" +color brightyellow "\$(releasever|arch|basearch|uuid|YUM[0-9])" +color brightblack "(^|[[:space:]])#([^{].*)?$" +color ,green "[[:space:]]+$" +color ,red " +" From 79e744c456e778ee28829dfaf80e9f6b12477fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Sun, 2 Jun 2013 13:07:20 +0200 Subject: [PATCH 052/119] Improved git * added branch info * added coloring for Changes to... sections * better changes id in rebase --- git.nanorc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git.nanorc b/git.nanorc index bce9c8a..179fcfc 100644 --- a/git.nanorc +++ b/git.nanorc @@ -34,6 +34,8 @@ color blue "^# [^/?*:;{}\\]+$" # Recolor hash symbols color brightblack "#" +color magenta "#[[:space:]]Changes to be committed:" + # Trailing spaces color ,red "[[:space:]]+$" From 590e5df50fe7a596017887ef432c41622e8abc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Smyku=C5=82a?= Date: Sun, 2 Jun 2013 13:10:40 +0200 Subject: [PATCH 053/119] Fix previous commit --- git.nanorc | 78 ++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/git.nanorc b/git.nanorc index 179fcfc..9ab2b35 100644 --- a/git.nanorc +++ b/git.nanorc @@ -1,3 +1,13 @@ +syntax "gitconfig" "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. # @@ -6,17 +16,10 @@ # A nano configuration file to enable syntax highlighting of some Git specific # files with the GNU nano text editor (http://www.nano-editor.org) # -# Save this file to a directory of your choice and add it to your nanorc using -# include ${PATH_TO_THE_FILE}/git.nanorc - -# This syntax format is used for editing commit and tag messages syntax "git commit/tag messages" "COMMIT_EDITMSG|TAG_EDITMSG" # Commit message -color white ".*" - -# Subject line (This is pretty weird, but it works at least for OS X' nano 2.0.6) -# color brightcyan start="^" end="$" +color yellow ".*" # Comments color brightblack "^#.*" @@ -29,54 +32,49 @@ color brightgreen "#[[:space:]]new file:" color brightblue "#[[:space:]]renamed:" # Untracked filenames -color blue "^# [^/?*:;{}\\]+$" +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 "#" -color magenta "#[[:space:]]Changes to be committed:" - -# Trailing spaces +# Trailing spaces (+LINT is not ok, git uses tabs) color ,red "[[:space:]]+$" + # This syntax format is used for interactive rebasing syntax "git rebase todo" "git-rebase-todo" # Default -color white ".*" +color yellow ".*" # Comments -color brightblack "^#.*" -color brightred "^noop$" +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 brightmagenta "^(p|pick) [0-9a-f]{7,40}" -color brightmagenta "^# (p, pick)" -color blue "^(r|reword) [0-9a-f]{7,40}" -color blue "^# (r, reword)" -color brightcyan "^(s|squash) [0-9a-f]{7,40}" -color brightcyan "^# (s, squash)" -color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}" -color yellow "^# (x, exec)" +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 "#" +color brightblack "#" # Commit IDs -color white "[0-9a-f]{7,40}" - -# Derived from https://github.com/craigbarnes/nanorc -syntax "gitconfig" "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 " +" +color brightblue "[0-9a-f]{7,40}" From 424a4587a68e5d1ca3941c4926d72286c7e06db0 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 15 Jul 2013 16:39:41 -0500 Subject: [PATCH 054/119] fixed md bug --- markdown.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown.nanorc b/markdown.nanorc index 5a1755c..5c513bd 100644 --- a/markdown.nanorc +++ b/markdown.nanorc @@ -9,7 +9,7 @@ color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)" color brightmagenta "^=====*$|^-----*$|^#{1,6}.*" color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " color black "^[[:space:]]+" -color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($$ +color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($$)" color brightyellow "\!?\[[^]]*\]([[:space:]]*\[[^]]*\]|\(.*\))?" color brightyellow "^\[.*\]:[[:space:]]*[^"]*" color yellow "`[^`]*`|^ {4}[^-+*].*" From e2769e766187ac44f4a47c41421f4946c80b9542 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 22 Jul 2013 21:24:55 -0700 Subject: [PATCH 055/119] Compatibility fixes for OSX. Closes scoptaz/nanorc#13 * cython.nanorc: Remove non-greedy repetition operator, as it is not supported on OSX * fish.nanorc: Remove incompatible "magic" hint * pkgbuild.nanorc: Remove empty sub-expressions --- cython.nanorc | 4 ++-- fish.nanorc | 1 - pkgbuild.nanorc | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cython.nanorc b/cython.nanorc index 3be7546..2e7b958 100644 --- a/cython.nanorc +++ b/cython.nanorc @@ -2,8 +2,8 @@ ## syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$" icolor brightred "def [ 0-9A-Z_]+" -icolor brightred "cpdef [ 0-9A-Z_]+\(.*?\):" -icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):" +icolor brightred "cpdef [0-9A-Z_]+\(.*\):" +icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*\):" diff --git a/fish.nanorc b/fish.nanorc index d4cb305..97d7d55 100644 --- a/fish.nanorc +++ b/fish.nanorc @@ -1,7 +1,6 @@ ## Here is an example for Fish shell scripts. ## syntax "fish" "\.fish$" -magic "(Fish.*) shell script text" icolor brightgreen "^[0-9A-Z_]+\(\)" color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" diff --git a/pkgbuild.nanorc b/pkgbuild.nanorc index aaea48e..c601523 100644 --- a/pkgbuild.nanorc +++ b/pkgbuild.nanorc @@ -4,16 +4,16 @@ syntax "pkgbuild" "^.*PKGBUILD$" color green start="^." end="$" color cyan "^.*(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license).*=.*$" color brightcyan "\<(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)\>" -color brightcyan "(\$|\$\{|\$\()(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)(|\}|\))" +color brightcyan "(\$|\$\{|\$\()(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)(\}|\))" color cyan "^.*(depends|makedepends|optdepends|conflicts|provides|replaces).*=.*$" color brightcyan "\<(depends|makedepends|optdepends|conflicts|provides|replaces)\>" -color brightcyan "(\$|\$\{|\$\()(depends|makedepends|optdepends|conflicts|provides|replaces)(|\}|\))" +color brightcyan "(\$|\$\{|\$\()(depends|makedepends|optdepends|conflicts|provides|replaces)(\}|\))" color cyan "^.*(groups|backup|noextract|options).*=.*$" color brightcyan "\<(groups|backup|noextract|options)\>" -color brightcyan "(\$|\$\{|\$\()(groups|backup|noextract|options)(|\}|\))" +color brightcyan "(\$|\$\{|\$\()(groups|backup|noextract|options)(\}|\))" color cyan "^.*(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums).*=.*$" color brightcyan "\<(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)\>" -color brightcyan "(\$|\$\{|\$\()(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)(|\}|\))" +color brightcyan "(\$|\$\{|\$\()(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)(\}|\))" color brightcyan "\<(startdir|srcdir|pkgdir)\>" color cyan "\.install" color brightwhite "=" "'" "\(" "\)" "\"" "#.*$" "\," "\{" "\}" From e5284fd33286e8ff9159ca74b82eb4b808781347 Mon Sep 17 00:00:00 2001 From: Ghost-NULL Date: Mon, 21 Oct 2013 00:03:28 +0200 Subject: [PATCH 056/119] Fix a very small typo :) --- Readme.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.rst b/Readme.rst index ce67085..85c5b21 100644 --- a/Readme.rst +++ b/Readme.rst @@ -2,7 +2,7 @@ Improved Nano Syntax Highlighting Files *************************************** -This repository holds {lang}.nanorc files that have imporved +This repository holds {lang}.nanorc files that have improved definitions of syntax highlighting for various languages. These should be placed inside of the ``~/.nano/`` directory. From 86e835de6451e83aef81f8ab79d57db87f60340c Mon Sep 17 00:00:00 2001 From: Daniel Kaplun Date: Thu, 19 Dec 2013 23:48:22 -0600 Subject: [PATCH 057/119] Sort and remove duplicates from import.nanorc --- import.nanorc | 156 +++++++++++++++++++------------------------------- 1 file changed, 58 insertions(+), 98 deletions(-) diff --git a/import.nanorc b/import.nanorc index 70f14a1..4cc77c7 100644 --- a/import.nanorc +++ b/import.nanorc @@ -1,108 +1,68 @@ -include ~/.nano/yaml.nanorc -include ~/.nano/dot.nanorc -include ~/.nano/fish.nanorc -include ~/.nano/keymap.nanorc -include ~/.nano/lua.nanorc -include ~/.nano/php.nanorc -include ~/.nano/glsl.nanorc -include ~/.nano/csharp.nanorc -include ~/.nano/kickstart.nanorc -include ~/.nano/email.nanorc -include ~/.nano/coffeescript.nanorc -include ~/.nano/json.nanorc -include ~/.nano/privoxy.nanorc -include ~/.nano/ini.nanorc -include ~/.nano/patch.nanorc -include ~/.nano/systemd.nanorc -include ~/.nano/nginx.nanorc -include ~/.nano/ledger.nanorc +include ~/.nano/apacheconf.nanorc +include ~/.nano/asm.nanorc include ~/.nano/awk.nanorc -include ~/.nano/sh.nanorc -include ~/.nano/ruby.nanorc -include ~/.nano/lisp.nanorc -include ~/.nano/cmake.nanorc -include ~/.nano/git.nanorc -include ~/.nano/html.nanorc -include ~/.nano/colortest.nanorc -include ~/.nano/xresources.nanorc -include ~/.nano/tex.nanorc -include ~/.nano/css.nanorc -include ~/.nano/go.nanorc -include ~/.nano/nanorc.nanorc -include ~/.nano/sql.nanorc -include ~/.nano/pkg-config.nanorc -include ~/.nano/man.nanorc -include ~/.nano/vala.nanorc -include ~/.nano/java.nanorc -include ~/.nano/yum.nanorc -include ~/.nano/inputrc.nanorc -include ~/.nano/pkgbuild.nanorc -include ~/.nano/xml.nanorc -include ~/.nano/sed.nanorc include ~/.nano/c.nanorc -include ~/.nano/javascript.nanorc +include ~/.nano/cmake.nanorc +include ~/.nano/coffeescript.nanorc +include ~/.nano/colortest.nanorc +include ~/.nano/conf.nanorc +include ~/.nano/csharp.nanorc +include ~/.nano/css.nanorc include ~/.nano/cython.nanorc +include ~/.nano/dot.nanorc +include ~/.nano/email.nanorc +include ~/.nano/fish.nanorc +include ~/.nano/fortran.nanorc +include ~/.nano/gentoo.nanorc +include ~/.nano/git.nanorc +include ~/.nano/gitcommit.nanorc +include ~/.nano/glsl.nanorc +include ~/.nano/go.nanorc +include ~/.nano/groff.nanorc +include ~/.nano/haml.nanorc +include ~/.nano/html.nanorc +include ~/.nano/import.nanorc +include ~/.nano/ini.nanorc +include ~/.nano/inputrc.nanorc +include ~/.nano/java.nanorc +include ~/.nano/javascript.nanorc +include ~/.nano/js.nanorc +include ~/.nano/json.nanorc +include ~/.nano/keymap.nanorc +include ~/.nano/kickstart.nanorc +include ~/.nano/ledger.nanorc +include ~/.nano/lisp.nanorc +include ~/.nano/lua.nanorc +include ~/.nano/main.nanorc +include ~/.nano/makefile.nanorc +include ~/.nano/man.nanorc include ~/.nano/markdown.nanorc include ~/.nano/mpdconf.nanorc -include ~/.nano/peg.nanorc -include ~/.nano/main.nanorc -include ~/.nano/po.nanorc -include ~/.nano/python.nanorc -include ~/.nano/makefile.nanorc -include ~/.nano/vi.nanorc -include ~/.nano/rpmspec.nanorc -include ~/.nano/yaml.nanorc -include ~/.nano/dot.nanorc -include ~/.nano/fish.nanorc -include ~/.nano/keymap.nanorc -include ~/.nano/lua.nanorc -include ~/.nano/php.nanorc -include ~/.nano/glsl.nanorc -include ~/.nano/csharp.nanorc -include ~/.nano/kickstart.nanorc -include ~/.nano/email.nanorc -include ~/.nano/coffeescript.nanorc -include ~/.nano/json.nanorc -include ~/.nano/privoxy.nanorc -include ~/.nano/ini.nanorc -include ~/.nano/patch.nanorc -include ~/.nano/import.nanorc -include ~/.nano/systemd.nanorc -include ~/.nano/nginx.nanorc -include ~/.nano/ledger.nanorc -include ~/.nano/awk.nanorc -include ~/.nano/sh.nanorc -include ~/.nano/ruby.nanorc -include ~/.nano/lisp.nanorc -include ~/.nano/cmake.nanorc -include ~/.nano/git.nanorc -include ~/.nano/html.nanorc -include ~/.nano/colortest.nanorc -include ~/.nano/xresources.nanorc -include ~/.nano/tex.nanorc -include ~/.nano/css.nanorc -include ~/.nano/go.nanorc +include ~/.nano/mutt.nanorc include ~/.nano/nanorc.nanorc -include ~/.nano/sql.nanorc -include ~/.nano/pkg-config.nanorc -include ~/.nano/man.nanorc -include ~/.nano/vala.nanorc -include ~/.nano/java.nanorc -include ~/.nano/yum.nanorc -include ~/.nano/inputrc.nanorc -include ~/.nano/pkgbuild.nanorc -include ~/.nano/xml.nanorc -include ~/.nano/sed.nanorc -include ~/.nano/c.nanorc -include ~/.nano/javascript.nanorc -include ~/.nano/cython.nanorc -include ~/.nano/markdown.nanorc -include ~/.nano/mpdconf.nanorc +include ~/.nano/nginx.nanorc +include ~/.nano/patch.nanorc include ~/.nano/peg.nanorc -include ~/.nano/main.nanorc +include ~/.nano/perl.nanorc +include ~/.nano/php.nanorc +include ~/.nano/pkg-config.nanorc +include ~/.nano/pkgbuild.nanorc include ~/.nano/po.nanorc +include ~/.nano/pov.nanorc +include ~/.nano/privoxy.nanorc include ~/.nano/python.nanorc -include ~/.nano/makefile.nanorc -include ~/.nano/vi.nanorc +include ~/.nano/reST.nanorc include ~/.nano/rpmspec.nanorc -include ~/.nano/import.nanorc +include ~/.nano/ruby.nanorc +include ~/.nano/sed.nanorc +include ~/.nano/sh.nanorc +include ~/.nano/sql.nanorc +include ~/.nano/systemd.nanorc +include ~/.nano/tex.nanorc +include ~/.nano/vala.nanorc +include ~/.nano/vi.nanorc +include ~/.nano/xml.nanorc +include ~/.nano/xresources.nanorc +include ~/.nano/yaml.nanorc +include ~/.nano/yum.nanorc +include ~/.nano/zshrc.nanorc From 3aa0f4c199bc628f0e4d753c2786f5ec4581cd82 Mon Sep 17 00:00:00 2001 From: Daniel Kaplun Date: Thu, 19 Dec 2013 23:51:40 -0600 Subject: [PATCH 058/119] Removes nonexistent main.nanorc and circular import.nanorc import --- import.nanorc | 2 -- 1 file changed, 2 deletions(-) diff --git a/import.nanorc b/import.nanorc index 4cc77c7..264da2d 100644 --- a/import.nanorc +++ b/import.nanorc @@ -21,7 +21,6 @@ include ~/.nano/go.nanorc include ~/.nano/groff.nanorc include ~/.nano/haml.nanorc include ~/.nano/html.nanorc -include ~/.nano/import.nanorc include ~/.nano/ini.nanorc include ~/.nano/inputrc.nanorc include ~/.nano/java.nanorc @@ -33,7 +32,6 @@ include ~/.nano/kickstart.nanorc include ~/.nano/ledger.nanorc include ~/.nano/lisp.nanorc include ~/.nano/lua.nanorc -include ~/.nano/main.nanorc include ~/.nano/makefile.nanorc include ~/.nano/man.nanorc include ~/.nano/markdown.nanorc From 40bffae91dce412b8727c5c673d08d9c9652b238 Mon Sep 17 00:00:00 2001 From: Daniel Kaplun Date: Thu, 19 Dec 2013 23:58:35 -0600 Subject: [PATCH 059/119] Includes instructions for import.nanorc in Readme.rst --- Readme.rst | 50 +++----------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/Readme.rst b/Readme.rst index 85c5b21..09bdc5f 100644 --- a/Readme.rst +++ b/Readme.rst @@ -7,54 +7,10 @@ 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:: +nano configuration file ``~/.nanorc``. For example:: ## 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" - - ## Lua - include "~/.nano/lua.nanorc" - +You can also copy the contents of ``import.nanorc`` into your +``~/.nanorc`` to include all languages. From 9a1aa67b2068a89311dbdce3874c5e24b77f9d5d Mon Sep 17 00:00:00 2001 From: Daniel Kaplun Date: Fri, 20 Dec 2013 00:05:51 -0600 Subject: [PATCH 060/119] Adds instructions and formatting fixes to Readme.rst --- Readme.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Readme.rst b/Readme.rst index 09bdc5f..c9f257f 100644 --- a/Readme.rst +++ b/Readme.rst @@ -2,9 +2,12 @@ Improved Nano Syntax Highlighting Files *************************************** -This repository holds {lang}.nanorc files that have improved +This repository holds ``{lang}.nanorc`` files that have improved definitions of syntax highlighting for various languages. These should be placed inside of the ``~/.nano/`` directory. +Alternatively:: + + git clone git@github.com:scopatz/nanorc.git ~/.nano Once there you should add the languages you want to your nano configuration file ``~/.nanorc``. For example:: @@ -12,5 +15,7 @@ nano configuration file ``~/.nanorc``. For example:: ## C/C++ include "~/.nano/c.nanorc" -You can also copy the contents of ``import.nanorc`` into your -``~/.nanorc`` to include all languages. +You can also append the contents of ``~/.nano/nanorc`` into your +``~/.nanorc`` to include all languages:: + + cat ~/.nano/nanorc >> ~/.nanorc From 81fbb9b393ca59ae227594c146d6dc86cffad239 Mon Sep 17 00:00:00 2001 From: Daniel Kaplun Date: Fri, 20 Dec 2013 00:07:22 -0600 Subject: [PATCH 061/119] Renames import.nanorc to nanorc --- import.nanorc => nanorc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename import.nanorc => nanorc (100%) diff --git a/import.nanorc b/nanorc similarity index 100% rename from import.nanorc rename to nanorc From d566590602b76c5ffa349bce9b72a56111d11c12 Mon Sep 17 00:00:00 2001 From: Anomitee Date: Sat, 4 Jan 2014 17:32:57 +1100 Subject: [PATCH 062/119] Added highlighting of trailing whitespace --- c.nanorc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c.nanorc b/c.nanorc index 65e2d8d..6641fae 100644 --- a/c.nanorc +++ b/c.nanorc @@ -34,3 +34,6 @@ color cyan "<[^= ]*>" ""(\\.|[^"])*"" ## Comment highlighting color brightblue "//.*" color brightblue start="/\*" end="\*/" + +## Trailing whitespace +color ,green "[[:space:]]+$" From 722ed013a6375e48bd7d5724f5e20c4ce4564380 Mon Sep 17 00:00:00 2001 From: Anomitee Date: Sat, 4 Jan 2014 17:42:19 +1100 Subject: [PATCH 063/119] Made whitespace highlighting optional --- c.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c.nanorc b/c.nanorc index 6641fae..ea08fb3 100644 --- a/c.nanorc +++ b/c.nanorc @@ -36,4 +36,4 @@ color brightblue "//.*" color brightblue start="/\*" end="\*/" ## Trailing whitespace -color ,green "[[:space:]]+$" +#color ,green "[[:space:]]+$" From 9611872cd24f85ffd3e0218d4bcfe42099cdcda9 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sat, 22 Feb 2014 19:26:13 -0600 Subject: [PATCH 064/119] fist stab at asciidoc --- asciidoc.nanorc | 40 ++++++++++++++++++++++++++++++++++++++++ nanorc | 1 + 2 files changed, 41 insertions(+) create mode 100644 asciidoc.nanorc diff --git a/asciidoc.nanorc b/asciidoc.nanorc new file mode 100644 index 0000000..5b97a3f --- /dev/null +++ b/asciidoc.nanorc @@ -0,0 +1,40 @@ +syntax "asciidoc" "\.(asc|asciidoc)$" + +# main header +color red "^====+$" +# h1 +color red "^==[[:space:]].*$" +color red "^----+$" +# h2 +color magenta "^===[[:space:]].*$" +color magenta "^~~~~+$" +# h4 +color green "^====[[:space:]].*$" +color green "^\^\^\^\^+$" +# h5 +color brightblue "^=====[[:space:]].*$" +color brightblue "^\+\+\+\++$" + +# attributes +color brightgreen ":.*:" +color brightred "\{[a-z0-9]*\}" +color red "\\\{[a-z0-9]*\}" +color red "\+\+\+\{[a-z0-9]*\}\+\+\+" + +# Paragraph Title +color yellow "^\..*$" + +# source +color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]" + +# Other markup +color yellow ".*\+$" +color yellow "_.+_" +color yellow "\*.+\*" +color yellow "\+.+\+" +color yellow "`.+`" +color yellow "\^.+\^" +color yellow "~.+~" +color yellow "'.+'" + +color cyan "`{1,2}.+'{1,2}" diff --git a/nanorc b/nanorc index 264da2d..ef30a6a 100644 --- a/nanorc +++ b/nanorc @@ -1,4 +1,5 @@ include ~/.nano/apacheconf.nanorc +include ~/.nano/asciidoc.nanorc include ~/.nano/asm.nanorc include ~/.nano/awk.nanorc include ~/.nano/c.nanorc From b1b372c916c06da158c689372b930c1aa0dae8f4 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Sun, 23 Feb 2014 11:50:40 -0600 Subject: [PATCH 065/119] more asciidoc fixes --- asciidoc.nanorc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/asciidoc.nanorc b/asciidoc.nanorc index 5b97a3f..37e6453 100644 --- a/asciidoc.nanorc +++ b/asciidoc.nanorc @@ -1,5 +1,9 @@ syntax "asciidoc" "\.(asc|asciidoc)$" +# anchors +color brightwhite "\[\[.*\]\]" +color brightwhite "<<.*>>" + # main header color red "^====+$" # h1 @@ -29,12 +33,12 @@ color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]" # Other markup color yellow ".*\+$" -color yellow "_.+_" -color yellow "\*.+\*" -color yellow "\+.+\+" -color yellow "`.+`" -color yellow "\^.+\^" -color yellow "~.+~" -color yellow "'.+'" +color yellow "_[^_]+_" +color yellow "\*[^\*]+\*" +color yellow "\+[^\+]+\+" +color yellow "`[^`]+`" +color yellow "\^[^\^]+\^" +color yellow "~[^~]+~" +color yellow "'[^']+'" -color cyan "`{1,2}.+'{1,2}" +color cyan "`{1,2}[^']+'{1,2}" From c98a379e0c365baaa6e802bc147bce8bc7b97c18 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 4 Mar 2014 21:52:19 -0600 Subject: [PATCH 066/119] license --- asciidoc.nanorc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/asciidoc.nanorc b/asciidoc.nanorc index 37e6453..9de3c6f 100644 --- a/asciidoc.nanorc +++ b/asciidoc.nanorc @@ -1,9 +1,5 @@ syntax "asciidoc" "\.(asc|asciidoc)$" -# anchors -color brightwhite "\[\[.*\]\]" -color brightwhite "<<.*>>" - # main header color red "^====+$" # h1 @@ -32,7 +28,7 @@ color yellow "^\..*$" color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]" # Other markup -color yellow ".*\+$" +color yellow ".*[[:space:]]\+$" color yellow "_[^_]+_" color yellow "\*[^\*]+\*" color yellow "\+[^\+]+\+" @@ -42,3 +38,10 @@ color yellow "~[^~]+~" color yellow "'[^']+'" color cyan "`{1,2}[^']+'{1,2}" + +# bullets +color brightmagenta "^[[:space:]]*[\*\.-]{1,5}[[:space:]]" + +# anchors +color brightwhite "\[\[.*\]\]" +color brightwhite "<<.*>>" From 1c2bba7b935bf5f3d57480e489592091b18c07a2 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 4 Mar 2014 22:54:17 -0600 Subject: [PATCH 067/119] whoops needed to do add --- license | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 license diff --git a/license b/license new file mode 100644 index 0000000..9032bab --- /dev/null +++ b/license @@ -0,0 +1,15 @@ + nano run control files + Copyright (C) 2014+ Anthony Scopatz et al. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . From 9eb0975839826ece6da700e2743fcffdcd441286 Mon Sep 17 00:00:00 2001 From: floomby Date: Thu, 6 Mar 2014 16:41:01 -0700 Subject: [PATCH 068/119] added highlighting for undo option in nanorc files --- nanorc.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanorc.nanorc b/nanorc.nanorc index f63d770..1eb940f 100644 --- a/nanorc.nanorc +++ b/nanorc.nanorc @@ -4,7 +4,7 @@ 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 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|undo|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))?\>" From b31ddc56454b98b7f597380e378b90f7826ade5d Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sun, 11 May 2014 18:41:00 -0400 Subject: [PATCH 069/119] Fixed css comment highlighting. Removed extra whitespace. --- css.nanorc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css.nanorc b/css.nanorc index faf783a..9115c07 100644 --- a/css.nanorc +++ b/css.nanorc @@ -4,7 +4,7 @@ syntax "css" "\.css$" color brightred "." color brightyellow start="\{" end="\}" -color brightwhite start=":" end="[;^\{]" +color brightwhite start=":" end="[;^\{]" color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" -color brightblue start="\/\*" end="\\*/" +color brightblue start="\/\*" end="\*\/" color green ";|:|\{|\}" From 56f3b17cbcab642bcba4f1eaa9bbccd81ce032dd Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Mon, 12 May 2014 00:57:15 -0400 Subject: [PATCH 070/119] Changed css file regex to also match scss files. --- css.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css.nanorc b/css.nanorc index 9115c07..d002ad6 100644 --- a/css.nanorc +++ b/css.nanorc @@ -1,7 +1,7 @@ ## Here is an example for css files. ## -syntax "css" "\.css$" +syntax "css" "\.(css|scss)$" color brightred "." color brightyellow start="\{" end="\}" color brightwhite start=":" end="[;^\{]" From c75e630b1be3e3b13e3065b783c0aaa60a7eb73c Mon Sep 17 00:00:00 2001 From: kaernyk Date: Fri, 20 Jun 2014 14:23:58 -0400 Subject: [PATCH 071/119] add alternate cloning method Upon first try I recived a permission denied msg when attempting to clone the repository. For ease of use when future users attempt to use this repository, I've added an alternative method as a backup. --- Readme.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Readme.rst b/Readme.rst index c9f257f..61f3bfb 100644 --- a/Readme.rst +++ b/Readme.rst @@ -8,6 +8,11 @@ These should be placed inside of the ``~/.nano/`` directory. Alternatively:: git clone git@github.com:scopatz/nanorc.git ~/.nano + +*Note - if you have any issues, alternatively use:: + + git clone https://github.com/scopatz/nanorc.git ~/.nano + Once there you should add the languages you want to your nano configuration file ``~/.nanorc``. For example:: From b19f77feef7db00ac2fac4bce7ab8d2a4de859cd Mon Sep 17 00:00:00 2001 From: Steven Honeyman Date: Sun, 22 Jun 2014 00:02:33 +0100 Subject: [PATCH 072/119] Minor improvements to sh.nanorc - Removed "makefile" (it has its own highlighting) - Added header filter to detect files without an extension - Added .bash_functions as a "known file" --- sh.nanorc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh.nanorc b/sh.nanorc index 959a1b9..d0552bc 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -1,6 +1,7 @@ ## Here is an example for Bourne shell scripts. ## -syntax "sh" "\.sh$" "Makefile" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_profile" "bash_profile" +syntax "sh" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_profile" "bash_profile" +header "^#!.*/(ba)?sh" icolor brightgreen "^[0-9A-Z_]+\(\)" color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" From ad3fff659d84f2626b1243b989a9a69fa72aec63 Mon Sep 17 00:00:00 2001 From: Ville Pulkkinen Date: Thu, 31 Jul 2014 13:57:13 +0300 Subject: [PATCH 073/119] Fixed a problem where path with stars was mixed up with a comment within a text delimiter characters --- javascript.nanorc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript.nanorc b/javascript.nanorc index 5b0e8be..fa2d6c5 100644 --- a/javascript.nanorc +++ b/javascript.nanorc @@ -14,10 +14,10 @@ color green "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" color green "\<(Number|Object|RegExp|String)\>" color red "[-+/*=<>!~%?:&|]" color magenta "/[^*]([^/]|(\\/))*[^\\]/[gim]*" -color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color magenta "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" color brightblack "(^|[[:space:]])//.*" -color brightblack start="/\*" end="\*/" +color brightblack "/\*.+\*/" color brightwhite,cyan "TODO:?" +color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color ,green "[[:space:]]+$" color ,red " +" From 8db30f67699b896d772ad733c10543bf7bb52bd0 Mon Sep 17 00:00:00 2001 From: Paul Inder Date: Fri, 1 Aug 2014 19:29:24 -0400 Subject: [PATCH 074/119] added scala syntax highlighting v1 --- scala.nanorc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scala.nanorc diff --git a/scala.nanorc b/scala.nanorc new file mode 100644 index 0000000..d9e8384 --- /dev/null +++ b/scala.nanorc @@ -0,0 +1,12 @@ +## Here is an example for Scala. +## +syntax "scala" "\.scala$" +color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" +color red "\<(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" +color cyan "\<(def|object|case|trait|lazy|implicit|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:]]+$" From cf0c2f6d84681b08a5370ccdeb21631f2de09480 Mon Sep 17 00:00:00 2001 From: Paul Inder Date: Fri, 1 Aug 2014 19:33:21 -0400 Subject: [PATCH 075/119] added scala.nanorc to the .nanorc template --- nanorc | 1 + 1 file changed, 1 insertion(+) diff --git a/nanorc b/nanorc index ef30a6a..bdbff80 100644 --- a/nanorc +++ b/nanorc @@ -53,6 +53,7 @@ include ~/.nano/python.nanorc include ~/.nano/reST.nanorc include ~/.nano/rpmspec.nanorc include ~/.nano/ruby.nanorc +include ~/.nano/scala.nanorc include ~/.nano/sed.nanorc include ~/.nano/sh.nanorc include ~/.nano/sql.nanorc From 7f97ded8d8532fea550e69f257ed04c620117ac8 Mon Sep 17 00:00:00 2001 From: Sina Date: Sat, 2 Aug 2014 05:24:56 +0100 Subject: [PATCH 076/119] Update php.nanorc A much better grammar for php. Found and taken from: https://code.google.com/p/nanosyntax/issues/detail?id=4 --- php.nanorc | 60 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/php.nanorc b/php.nanorc index 9173e74..fed87f8 100644 --- a/php.nanorc +++ b/php.nanorc @@ -1,20 +1,40 @@ -## PHP syntax highlighting -## -syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$" -#functions -color brightmagenta "([A-Za-z0-9])" -#numbers -color brightblue "[0-9]" -#special -color brightwhite "(^|[^A-Za-z0-9])(<\?php|\?>|var|and|or|default|class|extends|true|false|global|function|new|switch|case|break|next|prev|elseif|if|else|foreach|for|as|do|while|exit|die|declare|require_once|require|include_once|include|return|echo|static|array|isset)([^A-Za-z0-9])" -#types -color brightred "([^A-Za-z0-9])|[^A-Za-z](null|int|string|float|bool|object|resource)[^A-Za-z0-9_]+[^A-Za-z]" -#strings -color brightyellow ""(\\.|[^\"])*"" -color brightyellow "'(\\.|[^\'])*'" -#Variables -color brightcyan "\$[]\[A-Za-z0-9_'\"]*" -#comments -color green "//.*" -color green "#.*" -color green start="/\*" end="\*/" +## PHP Syntax Highlighting +syntax "php" "\.php[2345s~]?$" +color white start="<\?(php|=)?" end="\?>" +# Functions +color brightblue "([a-zA-Z0-9_-]*)\(" +# Constructs +color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)" +color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|returtrue|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in)[^a-z0-9_-]{1}" +color brightblue "[a-zA-Z0-9]+:" +# Variables +color white "\$[a-zA-Z_0-9$]*|[=!<>]" +color white "\->[a-zA-Z_0-9$]*|[=!<>]" +# Special Characters +color yellow "[.,{}();]" +color yellow "\[" +color yellow "\]" +color yellow "[=][^>]" +# Numbers +color magenta "[+-]*([0-9]\.)*[0-9]+([eE][+-]?([0-9]\.)*[0-9])*" +color magenta "0x[0-9a-zA-Z]*" +# Special Variables +color brightblue "(\$this|parent::|self::|\$this-\>)" +# Bitwise Operations +color magenta "(\;|\||\^){1}" +# And/Or/SRO/etc +color green "(\;\;|\|\||::|=>|->)" +# Online Comments +color brightyellow "(#.*|//.*)$" +# STRINGS! +color red "('[^']*?')|(\"[^\"]*?\")" +# Inline Variables +color white "\{\$[^}]*\}" +# PHP Tags +color red "(<\?(php)?|\?>)" +# General HTML +color red start="\?>" end="<\?(php|=)?" +# trailing whitespace +color ,green "[^[:space:]]{1}[[:space:]]+$" +# multi-line comments +color brightyellow start="/\*" end="\*/" From 0fe06445a9d3fc0c6e9824605177b73e34d966f4 Mon Sep 17 00:00:00 2001 From: Bryan Ross Date: Sat, 2 Aug 2014 09:05:51 +0100 Subject: [PATCH 077/119] added puppet and ERB highlighting --- erb.nanorc | 24 ++++++++++++++++++++++++ puppet.nanorc | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 erb.nanorc create mode 100644 puppet.nanorc diff --git a/erb.nanorc b/erb.nanorc new file mode 100644 index 0000000..55b0d71 --- /dev/null +++ b/erb.nanorc @@ -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|\?\?\?)" + diff --git a/puppet.nanorc b/puppet.nanorc new file mode 100644 index 0000000..3e387ab --- /dev/null +++ b/puppet.nanorc @@ -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:]]+$" + From 2f105dc7ba3da06e4d07fc3c324b7ed9830d79fc Mon Sep 17 00:00:00 2001 From: Sina Date: Sat, 2 Aug 2014 22:23:19 +0100 Subject: [PATCH 078/119] Update php.nanorc Small typo error fix --- php.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php.nanorc b/php.nanorc index fed87f8..d2fd4af 100644 --- a/php.nanorc +++ b/php.nanorc @@ -5,7 +5,7 @@ color white start="<\?(php|=)?" end="\?>" color brightblue "([a-zA-Z0-9_-]*)\(" # Constructs color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)" -color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|returtrue|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in)[^a-z0-9_-]{1}" +color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in)[^a-z0-9_-]{1}" color brightblue "[a-zA-Z0-9]+:" # Variables color white "\$[a-zA-Z_0-9$]*|[=!<>]" From a98449b46636ff9fe7eb21b58cd9c22c1fdaafe9 Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Sat, 2 Aug 2014 23:12:13 +0100 Subject: [PATCH 079/119] significantly improved zsh* syntax highlighting (started from sh.nanorc) --- nanorc | 2 +- zsh.nanorc | 37 +++++++++++++++++++++++++++++++++++++ zshrc.nanorc | 14 -------------- 3 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 zsh.nanorc delete mode 100644 zshrc.nanorc diff --git a/nanorc b/nanorc index bdbff80..7bfefdf 100644 --- a/nanorc +++ b/nanorc @@ -65,4 +65,4 @@ include ~/.nano/xml.nanorc include ~/.nano/xresources.nanorc include ~/.nano/yaml.nanorc include ~/.nano/yum.nanorc -include ~/.nano/zshrc.nanorc +include ~/.nano/zsh.nanorc diff --git a/zsh.nanorc b/zsh.nanorc new file mode 100644 index 0000000..443c0a3 --- /dev/null +++ b/zsh.nanorc @@ -0,0 +1,37 @@ +## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc) +syntax "zsh" "\.?zsh[^\.]+?$" +header "^#!.*/(env +)?zsh( |$)" + +## Numbers +color brightyellow "\b[0-9]+\b" + +## Conditionals and control flow +color green "\<(always|case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" +color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +## Conditional flags +color green "-[Ldefgruwx]\>" +color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" + +## Bash-inherited +color brightblue "\<(alias|bindkey|builtin|cd|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\>" +## ZSH-specific +color brightblue "\<(add-zsh-hook|autoload|compinit|echotc|emulate|print|prompt(init)?|setopt|zle|zmodload|zstyle)\>" +## Common linux commands +color brightmagenta "\<(cat|chmod|chown|cp|cut|echo|env|false|find|grep|head|install|kill|less|ln|make|mkdir|mv|nice|pwd|rm|rmdir|sed|tar|true|touch|uname|wc|whoami)\>" + +## Function definition +icolor brightgreen "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)" + +## Variables +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" + +## Strings +color yellow ""(\\.|[^"])*"" +color yellow "'(\\.|[^'])*'" + +## Comments +color cyan "(^|[[:space:]])#.*$" +color brightcyan "(^|[[:space:]])##.*$" + +## Trailing spaces +color ,blue "[[:space:]]+$" diff --git a/zshrc.nanorc b/zshrc.nanorc deleted file mode 100644 index e5d4183..0000000 --- a/zshrc.nanorc +++ /dev/null @@ -1,14 +0,0 @@ -## Hightlightings for zsh configuration files (most used keywords) -syntax "zshrc" "\.?zshrc$" - -## Keywords -color red "\<(autoload|prompt(init)?|zstyle|zmodload|compinit|setopt|export|source)\>" -color magenta "\<(alias|bindkey|function)\>" - -## Strings -icolor white ""(\\.|[^"])*"" -icolor white "'(\\.|[^'])*'" - -## Comments -icolor brightblue "^[[:space:]]*#.*$" -icolor cyan "^[[:space:]]*##.*$" From e9c885e82e8712b4c267d7f44c9dde552f465945 Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Sat, 2 Aug 2014 23:18:46 +0100 Subject: [PATCH 080/119] Add tcl syntax highlighting from https://code.google.com/p/nanosyntax/ (lightly altered) --- nanorc | 1 + tcl.nanorc | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tcl.nanorc diff --git a/nanorc b/nanorc index bdbff80..a1bde41 100644 --- a/nanorc +++ b/nanorc @@ -58,6 +58,7 @@ include ~/.nano/sed.nanorc include ~/.nano/sh.nanorc include ~/.nano/sql.nanorc include ~/.nano/systemd.nanorc +include ~/.nano/tcl.nanorc include ~/.nano/tex.nanorc include ~/.nano/vala.nanorc include ~/.nano/vi.nanorc diff --git a/tcl.nanorc b/tcl.nanorc new file mode 100644 index 0000000..2959512 --- /dev/null +++ b/tcl.nanorc @@ -0,0 +1,24 @@ +syntax "tcl" "\.tcl$" +header "^#!.*/(env +)?tclsh( |$)" + +## Standard Tcl [info commands] +color cyan "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>" +## Basic Tcl sub commands +color cyan "\<(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\>" +color cyan "\<(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\>" +## Extended TclX [info commands] +color cyan "\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>" +## Function declaration +color brightblue "proc[[:space:]]" "(\{|\})" +## Syntax +color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)" +## Numbers +color brightyellow "\<[0-9]+(\.[0-9]+)?\>" +## Strings +color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +## Variables +icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" +## Comments +color magenta "(^|;)[[:space:]]*#.*" +## Trailing whitespace +color ,blue "[[:space:]]+$" From 44139392ac267f424d86bb6b27ce96d3a7493d4d Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Sat, 2 Aug 2014 23:22:17 +0100 Subject: [PATCH 081/119] Significant Python highlighting improvements (mostly from https://code.google.com/p/nanosyntax/) --- python.nanorc | 51 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/python.nanorc b/python.nanorc index d76ab53..b1ccf49 100644 --- a/python.nanorc +++ b/python.nanorc @@ -1,35 +1,48 @@ ## Here is an example for Python. ## syntax "python" "\.py$" -icolor brightred "def [0-9A-Z_]+" +header "^#!.*/(env +)?python( |$)" +## built-in objects +color cyan "\<(None|self)\>" +## built-in attributes +color cyan "\<(__builtin__|__dict__|__methods__|__members__|__class__|__bases__|__import__|__name__|__doc__|__self__|__debug__)\>" +## built-in functions +color cyan "\<(abs|append|apply|buffer|callable|chr|clear|close|closed|cmp|coerce|compile|complex|conjugate|copy|count|delattr|dir|divmod|eval|execfile|extend|fileno|filter|float|flush|get|getattr|globals|has_key|hasattr|hash|hex|id|index|input|insert|int|intern|isatty|isinstance|issubclass|items|keys|len|list|locals|long|map|max|min|mode|name|oct|open|ord|pop|pow|range|raw_input|read|readline|readlines|reduce|reload|remove|repr|reverse|round|seek|setattr|slice|softspace|sort|str|tell|truncate|tuple|type|unichr|unicode|update|values|vars|write|writelines|xrange|zip)\>" +## special method names +color cyan "\<(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\>" +## exception classes +# color cyan "\<(Exception|StandardError|ArithmeticError|LookupError|EnvironmentError|AssertionError|AttributeError|EOFError|FloatingPointError|IOError|ImportError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|RuntimeError|SyntaxError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|ValueError|WindowsError|ZeroDivisionError)\>" +## types +color brightcyan "\<(NoneType|TypeType|IntType|LongType|FloatType|ComplexType|StringType|UnicodeType|BufferType|TupleType|ListType|DictType|FunctionType|LambdaType|CodeType|ClassType|UnboundMethodType|InstanceType|MethodType|BuiltinFunctionType|BuiltinMethodType|ModuleType|FileType|XRangeType|TracebackType|FrameType|SliceType|EllipsisType)\>" +## definitions +color brightcyan "def [a-zA-Z_0-9]+" +## keywords +color brightblue "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|return|try|with|while|yield)\>" - -#Keyword Color -color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" -color brightmagenta "\<(continue|break|return)\>" - -# decorator color +## decorators color brightgreen "@.*[(]" -#Operator Color -color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" +## operators +color magenta "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" -#Parenthetical Color +## parentheses color magenta "[(){}]" "\[" "\]" -#String Color -color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" -color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" +## numbers +color brightyellow "\b[0-9]+\b" -color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" +## strings +color yellow "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" +color yellow "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" + +## comments +color green "#.*$" + +## block comments +color green start=""""([^"]|$)" end=""""" start="'''([^']|$)" end="'''" #color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" #color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" #color cyan start=""""" end=""""" start="'''" end="'''" #color cyan start="("""[^"]|[^"]""")" end="("""[^"]|[^"]""")" start="'''[^']" end="'''" #color cyan start="\"\"\"" end="\"\"\"" - - -#Comment Color -color brightblue "#.*$" - From 6e75adacec2237334fb403b973187cbf192f54b6 Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Sat, 2 Aug 2014 23:25:00 +0100 Subject: [PATCH 082/119] Add header directives for perl and ruby, make the sh header directive more flexible, add header keyword to nanorc highlighting --- nanorc.nanorc | 2 +- perl.nanorc | 2 ++ ruby.nanorc | 2 ++ sh.nanorc | 7 ++++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/nanorc.nanorc b/nanorc.nanorc index 1eb940f..1aa85e0 100644 --- a/nanorc.nanorc +++ b/nanorc.nanorc @@ -5,7 +5,7 @@ syntax "nanorc" "\.?nanorc$" 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|undo|view|whitespace|wordbounds)\>" -icolor green "^[[:space:]]*(set|unset|include|syntax)\>" +icolor green "^[[:space:]]*(set|unset|include|syntax|header)\>" ## 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)=" diff --git a/perl.nanorc b/perl.nanorc index 7bca4cd..9a96528 100644 --- a/perl.nanorc +++ b/perl.nanorc @@ -1,6 +1,8 @@ ## Here is an example for Perl. ## syntax "perl" "\.p[lm]$" +header "^#!.*/(env +)?perl( |$)" + 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_]|-)" diff --git a/ruby.nanorc b/ruby.nanorc index 830dac6..36cadf8 100644 --- a/ruby.nanorc +++ b/ruby.nanorc @@ -1,6 +1,8 @@ ## Here is an example for Ruby. ## syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile" +header "^#!.*/(env +)?ruby( |$)" + ## Asciibetical list of reserved words 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)\>" ## Constants diff --git a/sh.nanorc b/sh.nanorc index d0552bc..abf6619 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -1,14 +1,15 @@ ## Here is an example for Bourne shell scripts. ## syntax "sh" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_profile" "bash_profile" -header "^#!.*/(ba)?sh" -icolor brightgreen "^[0-9A-Z_]+\(\)" +header "^#!.*/(env +)?(ba)?sh( |$)" + color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" +icolor brightgreen "^\s+?[0-9A-Z_]+\s+?\(\)" icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" -color cyan "(^|[[:space:]])#.*$" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" +color cyan "(^|[[:space:]])#.*$" #color ,green "[[:space:]]+$" From e5dd5c5f42b9c43757bc428958971b1cf4bf7a50 Mon Sep 17 00:00:00 2001 From: Kyle Stiemann Date: Tue, 30 Sep 2014 17:40:22 -0400 Subject: [PATCH 083/119] Fixes #43: html.nanorc yellow regex is greedy and matches all quotes until the final quote. Since the non-greedy operator `?` causes an error, I've implemented non-greedy matching using not-quote zero or more times (`[^"]*`) instead. --- html.nanorc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html.nanorc b/html.nanorc index f44bb01..62984df 100644 --- a/html.nanorc +++ b/html.nanorc @@ -3,5 +3,5 @@ syntax "html" "\.htm[l]?$" color brightblue start="<" end=">" color red "&[^;[[:space:]]]*;" -color yellow "".*"|qq\|.*\|" -color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" \ No newline at end of file +color yellow ""[^"]*"|qq\|.*\|" +color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" From 146c3848b5588f5f23e2ed2c50a570d42e554584 Mon Sep 17 00:00:00 2001 From: Ian Mustafa Date: Sun, 5 Oct 2014 07:42:44 +0700 Subject: [PATCH 084/119] Remove lazy operator for OS X compatibility Should work well as of pull request #14 --- php.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php.nanorc b/php.nanorc index d2fd4af..8021cac 100644 --- a/php.nanorc +++ b/php.nanorc @@ -27,7 +27,7 @@ color green "(\;\;|\|\||::|=>|->)" # Online Comments color brightyellow "(#.*|//.*)$" # STRINGS! -color red "('[^']*?')|(\"[^\"]*?\")" +color red "('[^']*')|(\"[^\"]*\")" # Inline Variables color white "\{\$[^}]*\}" # PHP Tags From d8f0c106a5b8e6a97ef4e02fadec7e38df8768b7 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Tue, 14 Apr 2015 10:14:31 +0100 Subject: [PATCH 085/119] Add htaccess to file patter --- apacheconf.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apacheconf.nanorc b/apacheconf.nanorc index f79343e..d95d15b 100644 --- a/apacheconf.nanorc +++ b/apacheconf.nanorc @@ -1,5 +1,5 @@ # Apache files -syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*" +syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*|\.htaccess" 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)" From da811ad87e8118e867896bcaba663886247d6620 Mon Sep 17 00:00:00 2001 From: Michael Lopez Date: Tue, 21 Apr 2015 09:00:55 +0200 Subject: [PATCH 086/119] Fixed for bad regex. From justinribeiro/nanorc@449447fffeba --- sh.nanorc | 2 +- zsh.nanorc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sh.nanorc b/sh.nanorc index abf6619..5f0f729 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -8,7 +8,7 @@ color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" -icolor brightgreen "^\s+?[0-9A-Z_]+\s+?\(\)" +icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)" icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" color cyan "(^|[[:space:]])#.*$" diff --git a/zsh.nanorc b/zsh.nanorc index 443c0a3..d9949b6 100644 --- a/zsh.nanorc +++ b/zsh.nanorc @@ -1,5 +1,5 @@ ## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc) -syntax "zsh" "\.?zsh[^\.]+?$" +syntax "zsh" "\.zsh[^\.]+$" header "^#!.*/(env +)?zsh( |$)" ## Numbers @@ -20,7 +20,7 @@ color brightblue "\<(add-zsh-hook|autoload|compinit|echotc|emulate|print|prompt( color brightmagenta "\<(cat|chmod|chown|cp|cut|echo|env|false|find|grep|head|install|kill|less|ln|make|mkdir|mv|nice|pwd|rm|rmdir|sed|tar|true|touch|uname|wc|whoami)\>" ## Function definition -icolor brightgreen "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)" +icolor brightgreen "^\s+(function\s+)[0-9A-Z_]+\s+\(\)" ## Variables icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" From bd7da6b59e5874b2bcb01d7a5939331fd343437f Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Wed, 17 Jun 2015 19:33:00 +0300 Subject: [PATCH 087/119] Extend ledger syntax to include beancount --- ledger.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ledger.nanorc b/ledger.nanorc index fa08338..8b13fdd 100644 --- a/ledger.nanorc +++ b/ledger.nanorc @@ -1,7 +1,7 @@ -syntax "ledger" "(^|\.|/)ledger$" +syntax "ledger" "(^|\.|/)ledger|beancount$" -color brightmagenta "^([0-9]{4}/[0-9]{2}/[0-9]{2}|[=~]) .*" -color blue "^[0-9]{4}/[0-9]{2}/[0-9]{2}" +color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*" +color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" color brightyellow "^~ .*" color brightblue "^= .*" color cyan "^[[:space:]]+\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" From 65446005a58eb0a601d6c342151659105eaca978 Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Sun, 21 Jun 2015 19:05:44 +0300 Subject: [PATCH 088/119] True and False are Python built-in objects --- python.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.nanorc b/python.nanorc index b1ccf49..7ef5d1a 100644 --- a/python.nanorc +++ b/python.nanorc @@ -4,7 +4,7 @@ syntax "python" "\.py$" header "^#!.*/(env +)?python( |$)" ## built-in objects -color cyan "\<(None|self)\>" +color cyan "\<(None|self|True|False)\>" ## built-in attributes color cyan "\<(__builtin__|__dict__|__methods__|__members__|__class__|__bases__|__import__|__name__|__doc__|__self__|__debug__)\>" ## built-in functions From 12e994ba093c7933e513911ebbf89810b3c41611 Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Sun, 21 Jun 2015 21:12:50 +0300 Subject: [PATCH 089/119] Ledger: allow flag to be an exclamation mark --- ledger.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledger.nanorc b/ledger.nanorc index 8b13fdd..3d62e82 100644 --- a/ledger.nanorc +++ b/ledger.nanorc @@ -5,5 +5,5 @@ color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" color brightyellow "^~ .*" color brightblue "^= .*" color cyan "^[[:space:]]+\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" -color red "[*]" +color red "[*!]" color brightblack "^[[:space:]]*;.*" From bf0512d73ebe5d64be6056fcc40da99acad18bb2 Mon Sep 17 00:00:00 2001 From: grandtheftjiujitsu Date: Sun, 21 Jun 2015 15:09:30 -0400 Subject: [PATCH 090/119] added hybrid perl5 / perl6 syntax highlighting from CPAN --- perl6.nanorc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 perl6.nanorc diff --git a/perl6.nanorc b/perl6.nanorc new file mode 100644 index 0000000..ae13d8b --- /dev/null +++ b/perl6.nanorc @@ -0,0 +1,19 @@ +## Here is an example for perl +## Hybrid perl5 / perl6 syntax highlighting +### Found in CPAN - http://cpansearch.perl.org/src/NIGE/Goo-0.09/lib/.gooskel/nanorc + +syntax "perl" "\.p6$" +color brightblue +"\<(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|seekdir|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 brightblue +"\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" + +# Perl 6 words +color brightcyan +"\<(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\>" +color brightmagenta start="[$@%]" end="( |\\W|-)" +color brightred "".*"|qq\|.*\|" +color white "[sm]/.*/" +color brightblue start="(^use| = new)" end=";" +color brightgreen "#.*" +color brightred start="< Date: Sun, 28 Jun 2015 20:40:08 +0300 Subject: [PATCH 091/119] Allow flagging a transaction leg --- ledger.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledger.nanorc b/ledger.nanorc index 3d62e82..e0344fa 100644 --- a/ledger.nanorc +++ b/ledger.nanorc @@ -4,6 +4,6 @@ color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*" color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" color brightyellow "^~ .*" color brightblue "^= .*" -color cyan "^[[:space:]]+\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" +color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" color red "[*!]" color brightblack "^[[:space:]]*;.*" From 157ee8ca277e80094398dd0aa599dd6338bb40ce Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Mon, 29 Jun 2015 19:37:34 +0300 Subject: [PATCH 092/119] Add a separate rule for beancount account name syntax --- ledger.nanorc | 1 + 1 file changed, 1 insertion(+) diff --git a/ledger.nanorc b/ledger.nanorc index e0344fa..9fb6cd6 100644 --- a/ledger.nanorc +++ b/ledger.nanorc @@ -5,5 +5,6 @@ color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" color brightyellow "^~ .*" color brightblue "^= .*" color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?" +color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_-]+(:[A-Za-z_-]+)*\)?" color red "[*!]" color brightblack "^[[:space:]]*;.*" From 0f3f348b1cf298baa313cdac8769f28697ffadcc Mon Sep 17 00:00:00 2001 From: amateursuperuser Date: Thu, 23 Jul 2015 12:39:17 -0500 Subject: [PATCH 093/119] fixed line errors that caused nano to complain GNU nano was complaining about syntax errors for parsing perl6.nanorc. nanorc reserved word "color" needs 2 parameters. Works on Arch Linux with nano 2.4.2 --- perl6.nanorc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/perl6.nanorc b/perl6.nanorc index ae13d8b..a192ba3 100644 --- a/perl6.nanorc +++ b/perl6.nanorc @@ -3,14 +3,11 @@ ### Found in CPAN - http://cpansearch.perl.org/src/NIGE/Goo-0.09/lib/.gooskel/nanorc syntax "perl" "\.p6$" -color brightblue -"\<(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|seekdir|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 brightblue -"\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" +color brightblue "\<(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|seekdir|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 brightblue "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" # Perl 6 words -color brightcyan -"\<(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\>" +color brightcyan "\<(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\>" color brightmagenta start="[$@%]" end="( |\\W|-)" color brightred "".*"|qq\|.*\|" color white "[sm]/.*/" From 4948936397bdc3ad392ea685a7c62a35bd6f6530 Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Thu, 30 Jul 2015 23:14:19 +0300 Subject: [PATCH 094/119] Allow short ledger and beancount extensions --- ledger.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledger.nanorc b/ledger.nanorc index 9fb6cd6..18fbb7a 100644 --- a/ledger.nanorc +++ b/ledger.nanorc @@ -1,4 +1,4 @@ -syntax "ledger" "(^|\.|/)ledger|beancount$" +syntax "ledger" "(^|\.|/)ledger|ldgr|beancount|bnct$" color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*" color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" From fa671c9b0930d9ebbef5783a0f57a1c12f57f9d0 Mon Sep 17 00:00:00 2001 From: Natalie Somersall Date: Thu, 20 Aug 2015 09:14:32 -0400 Subject: [PATCH 095/119] Add support for SaltStack states (*.sls). --- nanorc | 1 + sls.nanorc | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 sls.nanorc diff --git a/nanorc b/nanorc index e363aa7..16849ec 100644 --- a/nanorc +++ b/nanorc @@ -56,6 +56,7 @@ include ~/.nano/ruby.nanorc include ~/.nano/scala.nanorc include ~/.nano/sed.nanorc include ~/.nano/sh.nanorc +include ~/.nano/sls.nanorc include ~/.nano/sql.nanorc include ~/.nano/systemd.nanorc include ~/.nano/tcl.nanorc diff --git a/sls.nanorc b/sls.nanorc new file mode 100644 index 0000000..c600865 --- /dev/null +++ b/sls.nanorc @@ -0,0 +1,26 @@ +## SaltStack files (*.sls) +## + +syntax "salt" "\.sls$" + +# Anything ending in a colon (:), including things that start with a dash (-) +color blue "^[^ -].*:$" +color blue ".*:" +# Except for salt:// URLs +color white "salt:" + +# Numbers, etc +color red "/*[0-9]/*" +color red "\<(True|False)\>" + +# Anything between two single quotes +color green ""(\\.|[^"])*"|'(\\.|[^'])*'" + +# Matching keywords +color yellow "\<(grain|grains|compound|pcre|grain_pcre|list|pillar)\>" + +# Comments +color brightblack "^#.*" + +# Logic keywords +color magenta "\<(if|elif|else|or|not|and|endif|end)\>" From d7915db91b50f1e50ec74f2ba1473c96cf393312 Mon Sep 17 00:00:00 2001 From: Brandon Gulla Date: Fri, 18 Sep 2015 14:28:59 -0400 Subject: [PATCH 096/119] Added Dockerfile syntax abilities. --- Dockerfile.nanorc | 26 ++++++++++++++++++++++++++ nanorc | 1 + 2 files changed, 27 insertions(+) create mode 100644 Dockerfile.nanorc diff --git a/Dockerfile.nanorc b/Dockerfile.nanorc new file mode 100644 index 0000000..80e56df --- /dev/null +++ b/Dockerfile.nanorc @@ -0,0 +1,26 @@ +## Syntax highlighting for Dockerfiles +syntax "Dockerfile" "Dockerfile[^/]*$" + +## Keywords +icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]" + +## Brackets & parenthesis +color brightgreen "(\(|\)|\[|\])" + +## Double ampersand +color brightmagenta "&&" + +## Comments +icolor cyan "^[[:space:]]*#.*$" + +## Blank space at EOL +color ,green "[[:space:]]+$" + +## Strings, single-quoted +color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" + +## Strings, double-quoted +color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" + +## Single and double quotes +color brightyellow "('|\")" diff --git a/nanorc b/nanorc index 16849ec..2f028ec 100644 --- a/nanorc +++ b/nanorc @@ -12,6 +12,7 @@ include ~/.nano/css.nanorc include ~/.nano/cython.nanorc include ~/.nano/dot.nanorc include ~/.nano/email.nanorc +include ~/.nano/Dockerfile.nanorc include ~/.nano/fish.nanorc include ~/.nano/fortran.nanorc include ~/.nano/gentoo.nanorc From 270fec7f8de836f240df82e3ba26c5426409ce00 Mon Sep 17 00:00:00 2001 From: Dan Kaplun Date: Sat, 19 Sep 2015 22:21:48 -0400 Subject: [PATCH 097/119] Adds missing zshrc symlink --- zshrc.nanorc | 1 + 1 file changed, 1 insertion(+) create mode 120000 zshrc.nanorc diff --git a/zshrc.nanorc b/zshrc.nanorc new file mode 120000 index 0000000..925a14a --- /dev/null +++ b/zshrc.nanorc @@ -0,0 +1 @@ +zsh.nanorc \ No newline at end of file From 8cfddac05d38a4c69f76e252688a79b1bae9b61f Mon Sep 17 00:00:00 2001 From: Bryan Ross Date: Sun, 20 Sep 2015 22:42:07 +0100 Subject: [PATCH 098/119] improved highlighting from https://github.com/llowder/puppet-nano/ --- puppet.nanorc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/puppet.nanorc b/puppet.nanorc index 3e387ab..022c1fc 100644 --- a/puppet.nanorc +++ b/puppet.nanorc @@ -5,9 +5,12 @@ 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_:]+" ## 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|)\>" +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 "(=|-|~|>)" ## Constants color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" @@ -31,5 +34,5 @@ color brightcyan "##[^{].*$" "##$" ## Some common markers color brightcyan "(XXX|TODO|FIXME|\?\?\?)" ## Trailing spaces -color ,red "[[:space:]]+$" +color red "[[:space:]]+$" From 06ae63d9f4da0f68b7d257973a208b6e032a529c Mon Sep 17 00:00:00 2001 From: Sander M Date: Sat, 26 Sep 2015 21:13:07 +0200 Subject: [PATCH 099/119] Add another popular file name extension 'adoc' --- asciidoc.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc.nanorc b/asciidoc.nanorc index 9de3c6f..de486ed 100644 --- a/asciidoc.nanorc +++ b/asciidoc.nanorc @@ -1,4 +1,4 @@ -syntax "asciidoc" "\.(asc|asciidoc)$" +syntax "asciidoc" "\.(asc|asciidoc|adoc)$" # main header color red "^====+$" From 58b164c0074c3399c6cc35f2e40e240df357930c Mon Sep 17 00:00:00 2001 From: Brandon Gulla Date: Wed, 21 Oct 2015 09:27:43 -0400 Subject: [PATCH 100/119] Added dockerfile syntax highlighting for *.dockerfile --- Dockerfile.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.nanorc b/Dockerfile.nanorc index 80e56df..435b52c 100644 --- a/Dockerfile.nanorc +++ b/Dockerfile.nanorc @@ -1,5 +1,5 @@ ## Syntax highlighting for Dockerfiles -syntax "Dockerfile" "Dockerfile[^/]*$" +syntax "Dockerfile" "Dockerfile[^/]*$" "\.dockerfile$" ## Keywords icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]" From b64de434670af2b75ad1b15c0fe9d06d088dd032 Mon Sep 17 00:00:00 2001 From: Jody Leonard Date: Sat, 24 Oct 2015 05:52:47 -0400 Subject: [PATCH 101/119] Change tab coloring behavior for several rc's The commit mariuszs/nanorc@e5cc8be8639a9f535fb5f41d2dfa8d647bedb659 introduced a number of rc files that cause tabs to always show as red (even with trailing spaces). Adjust the behavior according to changes in https://github.com/nanorc/nanorc/blob/master/mixins/lint.nanorc, which seems to be an updated source of the original commit. Make tabs appear green without trailing characters, red with trailing spaces, and uncolored when followed by any other character. --- awk.nanorc | 2 +- coffeescript.nanorc | 2 +- csharp.nanorc | 2 +- glsl.nanorc | 2 +- go.nanorc | 2 +- ini.nanorc | 2 +- inputrc.nanorc | 2 +- javascript.nanorc | 2 +- json.nanorc | 2 +- keymap.nanorc | 2 +- kickstart.nanorc | 2 +- lisp.nanorc | 2 +- mpdconf.nanorc | 2 +- nginx.nanorc | 2 +- peg.nanorc | 2 +- pkg-config.nanorc | 2 +- po.nanorc | 2 +- privoxy.nanorc | 6 +++--- rpmspec.nanorc | 2 +- sed.nanorc | 2 +- sql.nanorc | 2 +- systemd.nanorc | 2 +- vala.nanorc | 2 +- vi.nanorc | 2 +- xresources.nanorc | 2 +- yaml.nanorc | 2 +- yum.nanorc | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/awk.nanorc b/awk.nanorc index 02ed08b..e037b65 100644 --- a/awk.nanorc +++ b/awk.nanorc @@ -22,4 +22,4 @@ color magenta "\\." color brightblack "(^|[[:space:]])#([^{].*)?$" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/coffeescript.nanorc b/coffeescript.nanorc index 4e1650c..110b65a 100644 --- a/coffeescript.nanorc +++ b/coffeescript.nanorc @@ -13,4 +13,4 @@ color brightyellow "@[A-Za-z0-9_]*" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/csharp.nanorc b/csharp.nanorc index 6390b38..3c8a25b 100644 --- a/csharp.nanorc +++ b/csharp.nanorc @@ -24,4 +24,4 @@ color brightblack "(^|[[:space:]])//.*" color brightblack start="/\*" end="\*/" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/glsl.nanorc b/glsl.nanorc index bdd1b08..546765d 100644 --- a/glsl.nanorc +++ b/glsl.nanorc @@ -13,4 +13,4 @@ color brightblack "(^|[[:space:]])//.*" color brightblack start="/\*" end="\*/" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/go.nanorc b/go.nanorc index 67351ea..5bf3182 100644 --- a/go.nanorc +++ b/go.nanorc @@ -20,4 +20,4 @@ color brightblack "(^|[[:space:]])//.*" color brightblack start="/\*" end="\*/" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/ini.nanorc b/ini.nanorc index bc4387b..26daea3 100644 --- a/ini.nanorc +++ b/ini.nanorc @@ -8,4 +8,4 @@ color red "[=;]" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/inputrc.nanorc b/inputrc.nanorc index 16b9f30..c0b8f6e 100644 --- a/inputrc.nanorc +++ b/inputrc.nanorc @@ -7,4 +7,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color magenta "\\.?" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/javascript.nanorc b/javascript.nanorc index fa2d6c5..898b7a2 100644 --- a/javascript.nanorc +++ b/javascript.nanorc @@ -20,4 +20,4 @@ color brightblack "/\*.+\*/" color brightwhite,cyan "TODO:?" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/json.nanorc b/json.nanorc index 1740a4c..d6338c9 100644 --- a/json.nanorc +++ b/json.nanorc @@ -8,4 +8,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightyellow "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:" color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/keymap.nanorc b/keymap.nanorc index bc2bdb9..bd89707 100644 --- a/keymap.nanorc +++ b/keymap.nanorc @@ -7,4 +7,4 @@ color red "=" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "^!.*$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/kickstart.nanorc b/kickstart.nanorc index 85e2213..255618f 100644 --- a/kickstart.nanorc +++ b/kickstart.nanorc @@ -12,4 +12,4 @@ color red "^-[a-zA-Z0-9*-]+" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/lisp.nanorc b/lisp.nanorc index 8094c7f..b4b0791 100644 --- a/lisp.nanorc +++ b/lisp.nanorc @@ -11,4 +11,4 @@ color magenta "'[A-Za-z][A-Za-z0-9_-]+" color magenta "\\.?" color brightblack "(^|[[:space:]]);.*" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/mpdconf.nanorc b/mpdconf.nanorc index ea57468..347e6f4 100644 --- a/mpdconf.nanorc +++ b/mpdconf.nanorc @@ -6,4 +6,4 @@ color brightmagenta "^(input|audio_output|decoder)[[:space:]]*\{|\}" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/nginx.nanorc b/nginx.nanorc index a671237..d3b6bca 100644 --- a/nginx.nanorc +++ b/nginx.nanorc @@ -11,4 +11,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color yellow start="'$" end="';$" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/peg.nanorc b/peg.nanorc index 975c628..858d5f8 100644 --- a/peg.nanorc +++ b/peg.nanorc @@ -9,4 +9,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])\-\-.*$" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/pkg-config.nanorc b/pkg-config.nanorc index 1d05b03..6dff0f6 100644 --- a/pkg-config.nanorc +++ b/pkg-config.nanorc @@ -5,4 +5,4 @@ color cyan "^(Requires|Libs)(\.private)?:" color red "=" color brightyellow "\$\{[A-Za-z_][A-Za-z0-9_]*\}" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/po.nanorc b/po.nanorc index 79d521f..f35e49f 100644 --- a/po.nanorc +++ b/po.nanorc @@ -5,4 +5,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color magenta "\\.?" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/privoxy.nanorc b/privoxy.nanorc index cd8d992..8f4be96 100644 --- a/privoxy.nanorc +++ b/privoxy.nanorc @@ -3,7 +3,7 @@ syntax "privoxy-config" "privoxy/config$" color cyan "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" syntax "privoxy-action" "\.action$" @@ -16,7 +16,7 @@ color black "[{}]" color magenta "\\.?" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" syntax "privoxy-filter" "\.filter$" @@ -25,5 +25,5 @@ color brightblue "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEAD color magenta "\\.?" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/rpmspec.nanorc b/rpmspec.nanorc index 4370c1c..e05ad6a 100644 --- a/rpmspec.nanorc +++ b/rpmspec.nanorc @@ -23,5 +23,5 @@ color brightmagenta "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript) color brightblack "(^|[[:space:]])#([^{].*)?$" color blue "^\*.*$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" color brightwhite,cyan "TODO:?" diff --git a/sed.nanorc b/sed.nanorc index 37692df..84cbafc 100644 --- a/sed.nanorc +++ b/sed.nanorc @@ -6,4 +6,4 @@ color brightyellow "\{[0-9]+,?[0-9]*\}" color magenta "\\." color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/sql.nanorc b/sql.nanorc index 89417c5..650214a 100644 --- a/sql.nanorc +++ b/sql.nanorc @@ -31,4 +31,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color yellow "`(\\.|[^\\`])*`" color brightblack "\-\-.*$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/systemd.nanorc b/systemd.nanorc index 9a7a658..1a3ea91 100644 --- a/systemd.nanorc +++ b/systemd.nanorc @@ -9,4 +9,4 @@ color brightyellow "\$MAINPID" color brightcyan "\<(true|false)\>" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/vala.nanorc b/vala.nanorc index bedac18..512356b 100644 --- a/vala.nanorc +++ b/vala.nanorc @@ -16,4 +16,4 @@ color brightblack "(^|[[:space:]])//.*" color brightblack start="/\*" end="\*/" color brightwhite,cyan "TODO:?" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/vi.nanorc b/vi.nanorc index 6098b82..8c5a001 100644 --- a/vi.nanorc +++ b/vi.nanorc @@ -8,4 +8,4 @@ color red "[!&=]" color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])\"[^"]*$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/xresources.nanorc b/xresources.nanorc index 3a6287f..a49cb3f 100644 --- a/xresources.nanorc +++ b/xresources.nanorc @@ -7,4 +7,4 @@ color red "[*:=]" color brightcyan "\<(true|false)\>" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/yaml.nanorc b/yaml.nanorc index 9956ac7..c2b926b 100644 --- a/yaml.nanorc +++ b/yaml.nanorc @@ -10,4 +10,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" color brightblack "(^|[[:space:]])#([^{].*)?$" color brightmagenta "^---" "^\.\.\." "^%YAML" "^%TAG" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" diff --git a/yum.nanorc b/yum.nanorc index 58c1a0b..6ca9f05 100644 --- a/yum.nanorc +++ b/yum.nanorc @@ -5,4 +5,4 @@ color brightmagenta "^[[:space:]]*\[.*\]$" color brightyellow "\$(releasever|arch|basearch|uuid|YUM[0-9])" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" -color ,red " +" +color ,red " + +| + +" From b1c896c01c644c627c5e6c923ce3a394fd9ccd97 Mon Sep 17 00:00:00 2001 From: Jody Leonard Date: Sat, 24 Oct 2015 07:55:49 -0400 Subject: [PATCH 102/119] Remove black coloring for several rc's Some of the configurations turn parentheses and or curly braces black, which become invisible against the default nano black background color. --- coffeescript.nanorc | 2 +- csharp.nanorc | 3 +-- glsl.nanorc | 3 +-- go.nanorc | 3 +-- javascript.nanorc | 1 - lisp.nanorc | 1 - nginx.nanorc | 1 - privoxy.nanorc | 1 - vala.nanorc | 3 +-- vi.nanorc | 3 +-- 10 files changed, 6 insertions(+), 15 deletions(-) diff --git a/coffeescript.nanorc b/coffeescript.nanorc index 110b65a..cf75b6c 100644 --- a/coffeescript.nanorc +++ b/coffeescript.nanorc @@ -3,7 +3,7 @@ header "^#!.*/(env +)?coffee" color red "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>" color brightblue "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->" -color black "[()]" +color brightblue "[()]" color cyan "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>" color cyan "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>" color cyan "\<(debugger|switch|while|do|class|extends|super)\>" diff --git a/csharp.nanorc b/csharp.nanorc index 3c8a25b..8c25d1d 100644 --- a/csharp.nanorc +++ b/csharp.nanorc @@ -6,8 +6,7 @@ color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?" # Annotation color magenta "@[A-Za-z]+" -color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" color green "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>" color cyan "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>" color cyan "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>" diff --git a/glsl.nanorc b/glsl.nanorc index 546765d..6da2639 100644 --- a/glsl.nanorc +++ b/glsl.nanorc @@ -1,7 +1,6 @@ syntax "glsl" "\.(frag|vert|fp|vp|glsl)$" -color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" color green "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>" color green "\" color cyan "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>" diff --git a/go.nanorc b/go.nanorc index 5bf3182..92803cd 100644 --- a/go.nanorc +++ b/go.nanorc @@ -1,7 +1,6 @@ syntax "go" "\.go$" -color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" color brightblue "\<(append|cap|close|complex|copy|delete|imag|len)\>" color brightblue "\<(make|new|panic|print|println|protect|real|recover)\>" color green "\<(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\>" diff --git a/javascript.nanorc b/javascript.nanorc index 898b7a2..4b6a46e 100644 --- a/javascript.nanorc +++ b/javascript.nanorc @@ -4,7 +4,6 @@ color blue "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\ color blue "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color blue "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" color cyan "\<(break|case|catch|continue|default|delete|do|else|finally)\>" color cyan "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>" color cyan "\<(switch|this|throw|try|typeof|var|void|while|with)\>" diff --git a/lisp.nanorc b/lisp.nanorc index b4b0791..f892a70 100644 --- a/lisp.nanorc +++ b/lisp.nanorc @@ -2,7 +2,6 @@ syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$" color brightblue "\([a-z-]+" color red "\(([-+*/<>]|<=|>=)|'" -color black "\(" color blue "\<[0-9]+\>" icolor cyan "\" color brightcyan "\<[tT]\>" diff --git a/nginx.nanorc b/nginx.nanorc index d3b6bca..66148b3 100644 --- a/nginx.nanorc +++ b/nginx.nanorc @@ -3,7 +3,6 @@ header "^(server|upstream)[a-z ]*\{$" color brightmagenta "\<(events|server|http|location|upstream)[[:space:]]*\{" color cyan "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)" -color black "[{}]" color brightcyan "\<(on|off)\>" color brightyellow "\$[A-Za-z][A-Za-z0-9_]*" color red "[*]" diff --git a/privoxy.nanorc b/privoxy.nanorc index 8f4be96..473df51 100644 --- a/privoxy.nanorc +++ b/privoxy.nanorc @@ -12,7 +12,6 @@ color brightgreen "[{[:space:]]\+block([[:space:]{}]|$)" color brightred "-(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" color brightgreen "\+(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" -color black "[{}]" color magenta "\\.?" color brightblack "(^|[[:space:]])#([^{].*)?$" color ,green "[[:space:]]+$" diff --git a/vala.nanorc b/vala.nanorc index 512356b..34509bd 100644 --- a/vala.nanorc +++ b/vala.nanorc @@ -1,8 +1,7 @@ syntax "vala" "\.vala$" color green "\<(float|double|bool|char|int|uint|short|long|void|(un)?signed)\>" -color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" color cyan "\<(for|if|while|do|else|case|default|switch|try|throw|catch)\>" color cyan "\<(inline|typedef|struct|enum|union|extern|static|const)\>" color cyan "\<(operator|new|delete|return|null)\>" diff --git a/vi.nanorc b/vi.nanorc index 8c5a001..719dd16 100644 --- a/vi.nanorc +++ b/vi.nanorc @@ -1,7 +1,6 @@ syntax "vi" "(^|/|\.)(ex|vim)rc$|\.vim" -color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]" -color black "[(]" +color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" color cyan "\<([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\>" color cyan "\<(snor|nun|nm|set|if|endif|let|unlet)\>" color red "[!&=]" From d87b3263ebf492e1586d8947fde44c3eff3965e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Bernardini?= Date: Sat, 14 Nov 2015 10:22:22 +0100 Subject: [PATCH 103/119] Add the new conky.nanorc from official repository of brndnmtthws/conky --- conky.nanorc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 conky.nanorc diff --git a/conky.nanorc b/conky.nanorc new file mode 100644 index 0000000..6150c4f --- /dev/null +++ b/conky.nanorc @@ -0,0 +1,18 @@ +## +## Syntax highlighting for conkyrc files. +## +## +syntax "conky" "(\.*conkyrc.*$|conky.conf)" + +## Configuration items +color green "\<(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>" + +## Configuration item constants +color yellow "\<(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\>" + +## Variables +color brightblue "\<(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\>" + +color brightblue "\$\{?[0-9A-Z_!@#$*?-]+\}?" +color cyan "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" +color brightred "^TEXT$" From a737f17fc29a4547afc059b8138a12e42474fe3c Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 15:34:03 -0500 Subject: [PATCH 104/119] Added rust nanorc file --- rust.nanorc | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 rust.nanorc diff --git a/rust.nanorc b/rust.nanorc new file mode 100644 index 0000000..a8e2e90 --- /dev/null +++ b/rust.nanorc @@ -0,0 +1,36 @@ +# Nano configuration for Rust +# Copyright 2015 The Rust Project Developers. +# +# NOTE: Rules are applied in order: later rules re-colorize matching text. +syntax "rust" "\.rs" + +# function definition +color magenta "fn [a-z0-9_]+" + +# Reserved words +color yellow "\<(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\>" + +# macros +color red "[a-z_]+!" + +# Constants +color magenta "[A-Z][A-Z_]+" + +# Traits/Enums/Structs/Types/etc. +color magenta "[A-Z][a-z]+" + +# Strings +color green "\".*\"" +color green start="\".*\\$" end=".*\"" +# NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal +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|\?\?\?)" From fce98d078249be402c453e4014b353f3bd84b29c Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 20:54:49 -0500 Subject: [PATCH 105/119] Added nanorc for arduino sketch files --- arduino.nanorc | 116 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 arduino.nanorc diff --git a/arduino.nanorc b/arduino.nanorc new file mode 100644 index 0000000..3cddedb --- /dev/null +++ b/arduino.nanorc @@ -0,0 +1,116 @@ + +## FILENAME: arduino.nanorc +## +## DESCRIPTION: The arduino.nanorc syntax files allows syntax highlighting +## for Arduino sketch files in the GNU nano text editor. +## +## Maintainer: Nicholas Wilde +## Version: 0.1 +## DATE: 06/23/2011 +## +## HOMEPAGE: http://code.google.com/p/arduino-nano-editor-syntax/ +## +## COMMENTS: -Most of the code was taken from the c.nanorc code found with +## GNU nano 2.2.6. +## -Direction was taken from the arduino vim syntax code by johannes +## +## -Tested on Ubuntu Server 11.04 Natty Narwhal and GNU nano 2.2.6 +## +## DIRECTIONS: For Ubuntu Server 11.04 Natty Narwhal: +## -Move this file to the nano directory +## /usr/share/nano/ +## -Add arduino.nanorc reference to the nanorc settings file +## /etc/nanorc +## ... +## ## Arduino +## /usr/share/nano/arduino.nanorc +## ... + +syntax "ino" "\.?ino$" + +## +color brightred "\<[A-Z_][0-9A-Z_]+\>" + +## +color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>" + +## Constants +icolor green "\<(HIGH|LOW|INPUT|OUTPUT)\>" + +## Serial Print +icolor red "\<(DEC|BIN|HEX|OCT|BYTE)\>" + +## PI Constants +icolor green "\<(PI|HALF_PI|TWO_PI)\>" + +## ShiftOut +icolor green "\<(LSBFIRST|MSBFIRST)\>" + +## Attach Interrupt +icolor green "\<(CHANGE|FALLING|RISING)\>" + +## Analog Reference +icolor green "\<(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\>" + +## === FUNCTIONS === ## + +## Data Types +color green "\<(boolean|byte|char|float|int|long|word)\>" + +## Control Structions +color brightyellow "\<(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\>" +color magenta "\<(goto|continue|break|return)\>" + +## Math +color brightyellow "\<(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\>" + +## Bits & Bytes +color brightyellow "\<(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\>" + +## Analog I/O +color brightyellow "\<(analogReference|analogRead|analogWrite)\>" + +## External Interrupts +color brightyellow "\<(attachInterrupt|detachInterrupt)\>" + +## Time +color brightyellow "\<(delay|delayMicroseconds|millis|micros)\>" + +## Digital I/O +color brightyellow "\<(pinMode|digitalWrite|digitalRead)\>" + +## Interrupts +color brightyellow "\<(interrupts|noInterrupts)\>" + +## Advanced I/O +color brightyellow "\<(noTone|pulseIn|shiftIn|shiftOut|tone)\>" + +## Serial +color magenta "\<(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\>" + +## Structure +color brightyellow "\<(setup|loop)\>" + +## +color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)" + +## +color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" + +## GCC builtins +color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" + +## 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 brightyellow "<[^= ]*>" ""(\\.|[^"])*"" + +## This string is VERY resource intensive! +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +## Comments +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +## Trailing whitespace +color ,green "[[:space:]]+$" From 6ccff4b618f63114a843f7cb36ab3af09ccdb399 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 21:07:42 -0500 Subject: [PATCH 106/119] Updated nanorc file with new nanorc's recently added Added two lines including the new rust nanorc and the new arduino nanorc --- nanorc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nanorc b/nanorc index 2f028ec..1fd7cee 100644 --- a/nanorc +++ b/nanorc @@ -1,4 +1,5 @@ include ~/.nano/apacheconf.nanorc +include ~/.nano/arduino.nanorc include ~/.nano/asciidoc.nanorc include ~/.nano/asm.nanorc include ~/.nano/awk.nanorc @@ -54,6 +55,7 @@ include ~/.nano/python.nanorc include ~/.nano/reST.nanorc include ~/.nano/rpmspec.nanorc include ~/.nano/ruby.nanorc +include ~/.nano/rust.nanorc include ~/.nano/scala.nanorc include ~/.nano/sed.nanorc include ~/.nano/sh.nanorc From 8842f692a2b1585d1f7baba0175fb8d7d341a4b5 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 21:18:32 -0500 Subject: [PATCH 107/119] Added ocaml nanorc Adapted from NAS-tweaks --- ocaml.nanorc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ocaml.nanorc diff --git a/ocaml.nanorc b/ocaml.nanorc new file mode 100644 index 0000000..6f9fc60 --- /dev/null +++ b/ocaml.nanorc @@ -0,0 +1,25 @@ +syntax "ocaml" "\.mli?$" +#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)\>" +#patterns-modifiers +color yellow "\<(as|when|of)\>" +#conditions +color cyan "\<(if|then|else)\>" +#blocs +color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>" +#constantes +color green "\<(true|false)\>" +#modules/classes +color green "\<(include|inherit|initializer)\>" +#expr modifiers +color yellow "\<(new|ref|mutable|lazy|assert|raise)\>" +#comments +color white start="\(\*" end="\*\)" +#strings (no multiline handling yet) +color brightblack ""[^\"]*"" From a345c2bd7b82b50d137e82b869badf8a11b56e5e Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 21:19:58 -0500 Subject: [PATCH 108/119] Updated nanorc with ocaml.nanorc --- nanorc | 1 + 1 file changed, 1 insertion(+) diff --git a/nanorc b/nanorc index 1fd7cee..864c92b 100644 --- a/nanorc +++ b/nanorc @@ -42,6 +42,7 @@ include ~/.nano/mpdconf.nanorc include ~/.nano/mutt.nanorc include ~/.nano/nanorc.nanorc include ~/.nano/nginx.nanorc +include ~/.nano/ocaml.nanorc include ~/.nano/patch.nanorc include ~/.nano/peg.nanorc include ~/.nano/perl.nanorc From b627b455aee05a7e6436940da941a611fc7f2d86 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 22:02:50 -0500 Subject: [PATCH 109/119] Added automatic installer --- install.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..6f3ba8e --- /dev/null +++ b/install.sh @@ -0,0 +1,20 @@ +wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip +if [ ! -d ~/.nano/ ] +then + mkdir ~/.nano/ +fi + +cd ~/.nano/ + +unzip -o "/tmp/nanorc.zip" +mv nanorc-master/* ./ +rm -rf nanorc-master + +if [ ! -f ~/.nanorc ] +then + touch ~/.nanorc +fi + +cat ~/.nano/nanorc >> ~/.nanorc +sort -u ~/.nanorc > /tmp/nanorc2 +cat /tmp/nanorc2 > ~/.nanorc From c46ed9cb1cc833eb2694e066743c1c4533b06040 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Mon, 14 Dec 2015 22:05:43 -0500 Subject: [PATCH 110/119] Updated readme with installer instructions --- Readme.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Readme.rst b/Readme.rst index 61f3bfb..2958ca4 100644 --- a/Readme.rst +++ b/Readme.rst @@ -24,3 +24,7 @@ You can also append the contents of ``~/.nano/nanorc`` into your ``~/.nanorc`` to include all languages:: cat ~/.nano/nanorc >> ~/.nanorc + +Finally, you can run an automatic installer using the following code:: + + $ curl https://github.com/scopatz/nanorc/raw/installer.sh | sh From 178ce558f99ad2a398546a684d76aab7a6e5410b Mon Sep 17 00:00:00 2001 From: John S Long Date: Tue, 15 Dec 2015 01:44:09 -0600 Subject: [PATCH 111/119] Add namespace/use keywords for PHP --- php.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php.nanorc b/php.nanorc index 8021cac..1ed281c 100644 --- a/php.nanorc +++ b/php.nanorc @@ -5,7 +5,7 @@ color white start="<\?(php|=)?" end="\?>" color brightblue "([a-zA-Z0-9_-]*)\(" # Constructs color brightblue "(class|extends|goto) ([a-zA-Z0-9_]*)" -color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in)[^a-z0-9_-]{1}" +color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}" color brightblue "[a-zA-Z0-9]+:" # Variables color white "\$[a-zA-Z_0-9$]*|[=!<>]" From 15dc8541bfcd3cca9d94d500d4e80e27c84b2457 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Tue, 15 Dec 2015 06:32:12 -0500 Subject: [PATCH 112/119] Updated Readme with correct URL --- Readme.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.rst b/Readme.rst index 2958ca4..d2d98ac 100644 --- a/Readme.rst +++ b/Readme.rst @@ -27,4 +27,4 @@ You can also append the contents of ``~/.nano/nanorc`` into your Finally, you can run an automatic installer using the following code:: - $ curl https://github.com/scopatz/nanorc/raw/installer.sh | sh + $ curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh From f0db3a7bbb7b26f16cb3f9f2fa230460d96acc64 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Tue, 15 Dec 2015 15:17:06 -0500 Subject: [PATCH 113/119] Added nanorc for popular functional language haskell --- haskell.nanorc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 haskell.nanorc diff --git a/haskell.nanorc b/haskell.nanorc new file mode 100644 index 0000000..8c6bdf0 --- /dev/null +++ b/haskell.nanorc @@ -0,0 +1,31 @@ +syntax "haskell" "\.hs$" + +## Keywords +color red "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]" +color red "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]" +color red "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)" + +## Various symbols +color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})" + +## Operators +color magenta "(==|/=|&&|\|\||<|>|<=|>=)" + +## Various symbols +color cyan "(->|<-)" +color magenta "\.|\$" + +## Data constructors +color magenta "(True|False|Nothing|Just|Left|Right|LT|EQ|GT)" + +## Data classes +color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)" + +## Strings +color yellow ""[^\"]*"" + +## Comments +color green "--.*" +color green start="\{-" end="-\}" + +color brightred "undefined" From 29e315402dd7395f96d68b2c4707379565c321e3 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Tue, 15 Dec 2015 15:36:21 -0500 Subject: [PATCH 114/119] Updated nanorc file with haskell --- nanorc | 1 + 1 file changed, 1 insertion(+) diff --git a/nanorc b/nanorc index 864c92b..cefa10f 100644 --- a/nanorc +++ b/nanorc @@ -23,6 +23,7 @@ include ~/.nano/glsl.nanorc include ~/.nano/go.nanorc include ~/.nano/groff.nanorc include ~/.nano/haml.nanorc +include ~/.nano/haskell.nanorc include ~/.nano/html.nanorc include ~/.nano/ini.nanorc include ~/.nano/inputrc.nanorc From 0e981feffe9bc23e23030112239e52e4131295e3 Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Wed, 16 Dec 2015 14:57:23 -0500 Subject: [PATCH 115/119] Fixes #66 --- nanorc | 150 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/nanorc b/nanorc index cefa10f..0c41250 100644 --- a/nanorc +++ b/nanorc @@ -1,75 +1,75 @@ -include ~/.nano/apacheconf.nanorc -include ~/.nano/arduino.nanorc -include ~/.nano/asciidoc.nanorc -include ~/.nano/asm.nanorc -include ~/.nano/awk.nanorc -include ~/.nano/c.nanorc -include ~/.nano/cmake.nanorc -include ~/.nano/coffeescript.nanorc -include ~/.nano/colortest.nanorc -include ~/.nano/conf.nanorc -include ~/.nano/csharp.nanorc -include ~/.nano/css.nanorc -include ~/.nano/cython.nanorc -include ~/.nano/dot.nanorc -include ~/.nano/email.nanorc -include ~/.nano/Dockerfile.nanorc -include ~/.nano/fish.nanorc -include ~/.nano/fortran.nanorc -include ~/.nano/gentoo.nanorc -include ~/.nano/git.nanorc -include ~/.nano/gitcommit.nanorc -include ~/.nano/glsl.nanorc -include ~/.nano/go.nanorc -include ~/.nano/groff.nanorc -include ~/.nano/haml.nanorc -include ~/.nano/haskell.nanorc -include ~/.nano/html.nanorc -include ~/.nano/ini.nanorc -include ~/.nano/inputrc.nanorc -include ~/.nano/java.nanorc -include ~/.nano/javascript.nanorc -include ~/.nano/js.nanorc -include ~/.nano/json.nanorc -include ~/.nano/keymap.nanorc -include ~/.nano/kickstart.nanorc -include ~/.nano/ledger.nanorc -include ~/.nano/lisp.nanorc -include ~/.nano/lua.nanorc -include ~/.nano/makefile.nanorc -include ~/.nano/man.nanorc -include ~/.nano/markdown.nanorc -include ~/.nano/mpdconf.nanorc -include ~/.nano/mutt.nanorc -include ~/.nano/nanorc.nanorc -include ~/.nano/nginx.nanorc -include ~/.nano/ocaml.nanorc -include ~/.nano/patch.nanorc -include ~/.nano/peg.nanorc -include ~/.nano/perl.nanorc -include ~/.nano/php.nanorc -include ~/.nano/pkg-config.nanorc -include ~/.nano/pkgbuild.nanorc -include ~/.nano/po.nanorc -include ~/.nano/pov.nanorc -include ~/.nano/privoxy.nanorc -include ~/.nano/python.nanorc -include ~/.nano/reST.nanorc -include ~/.nano/rpmspec.nanorc -include ~/.nano/ruby.nanorc -include ~/.nano/rust.nanorc -include ~/.nano/scala.nanorc -include ~/.nano/sed.nanorc -include ~/.nano/sh.nanorc -include ~/.nano/sls.nanorc -include ~/.nano/sql.nanorc -include ~/.nano/systemd.nanorc -include ~/.nano/tcl.nanorc -include ~/.nano/tex.nanorc -include ~/.nano/vala.nanorc -include ~/.nano/vi.nanorc -include ~/.nano/xml.nanorc -include ~/.nano/xresources.nanorc -include ~/.nano/yaml.nanorc -include ~/.nano/yum.nanorc -include ~/.nano/zsh.nanorc +include "~/.nano/apacheconf.nanorc" +include "~/.nano/arduino.nanorc" +include "~/.nano/asciidoc.nanorc" +include "~/.nano/asm.nanorc" +include "~/.nano/awk.nanorc" +include "~/.nano/c.nanorc" +include "~/.nano/cmake.nanorc" +include "~/.nano/coffeescript.nanorc" +include "~/.nano/colortest.nanorc" +include "~/.nano/conf.nanorc" +include "~/.nano/csharp.nanorc" +include "~/.nano/css.nanorc" +include "~/.nano/cython.nanorc" +include "~/.nano/dot.nanorc" +include "~/.nano/email.nanorc" +include "~/.nano/Dockerfile.nanorc" +include "~/.nano/fish.nanorc" +include "~/.nano/fortran.nanorc" +include "~/.nano/gentoo.nanorc" +include "~/.nano/git.nanorc" +include "~/.nano/gitcommit.nanorc" +include "~/.nano/glsl.nanorc" +include "~/.nano/go.nanorc" +include "~/.nano/groff.nanorc" +include "~/.nano/haml.nanorc" +include "~/.nano/haskell.nanorc" +include "~/.nano/html.nanorc" +include "~/.nano/ini.nanorc" +include "~/.nano/inputrc.nanorc" +include "~/.nano/java.nanorc" +include "~/.nano/javascript.nanorc" +include "~/.nano/js.nanorc" +include "~/.nano/json.nanorc" +include "~/.nano/keymap.nanorc" +include "~/.nano/kickstart.nanorc" +include "~/.nano/ledger.nanorc" +include "~/.nano/lisp.nanorc" +include "~/.nano/lua.nanorc" +include "~/.nano/makefile.nanorc" +include "~/.nano/man.nanorc" +include "~/.nano/markdown.nanorc" +include "~/.nano/mpdconf.nanorc" +include "~/.nano/mutt.nanorc" +include "~/.nano/nanorc.nanorc" +include "~/.nano/nginx.nanorc" +include "~/.nano/ocaml.nanorc" +include "~/.nano/patch.nanorc" +include "~/.nano/peg.nanorc" +include "~/.nano/perl.nanorc" +include "~/.nano/php.nanorc" +include "~/.nano/pkg-config.nanorc" +include "~/.nano/pkgbuild.nanorc" +include "~/.nano/po.nanorc" +include "~/.nano/pov.nanorc" +include "~/.nano/privoxy.nanorc" +include "~/.nano/python.nanorc" +include "~/.nano/reST.nanorc" +include "~/.nano/rpmspec.nanorc" +include "~/.nano/ruby.nanorc" +include "~/.nano/rust.nanorc" +include "~/.nano/scala.nanorc" +include "~/.nano/sed.nanorc" +include "~/.nano/sh.nanorc" +include "~/.nano/sls.nanorc" +include "~/.nano/sql.nanorc" +include "~/.nano/systemd.nanorc" +include "~/.nano/tcl.nanorc" +include "~/.nano/tex.nanorc" +include "~/.nano/vala.nanorc" +include "~/.nano/vi.nanorc" +include "~/.nano/xml.nanorc" +include "~/.nano/xresources.nanorc" +include "~/.nano/yaml.nanorc" +include "~/.nano/yum.nanorc" +include "~/.nano/zsh.nanorc" From 2a9b803c13c026c8e40508e28d645fb173a23ff0 Mon Sep 17 00:00:00 2001 From: Lephend Date: Tue, 5 Jan 2016 17:39:28 +0200 Subject: [PATCH 116/119] Added 'sealed' keyword --- scala.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scala.nanorc b/scala.nanorc index d9e8384..b5cf0ea 100644 --- a/scala.nanorc +++ b/scala.nanorc @@ -3,7 +3,7 @@ syntax "scala" "\.scala$" color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" color red "\<(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" -color cyan "\<(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" +color cyan "\<(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\>" color red ""[^"]*"" color yellow "\<(true|false|null)\>" color blue "//.*" From 3fb33bdc1faab68e08f561a0cd04bd4282674c1d Mon Sep 17 00:00:00 2001 From: nl6720 Date: Fri, 5 Feb 2016 18:34:08 +0200 Subject: [PATCH 117/119] Add zprofile, zlogin, zlogout to zsh --- zsh.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh.nanorc b/zsh.nanorc index d9949b6..618b250 100644 --- a/zsh.nanorc +++ b/zsh.nanorc @@ -1,5 +1,5 @@ ## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc) -syntax "zsh" "\.zsh[^\.]+$" +syntax "zsh" "\.zsh$" "\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$" header "^#!.*/(env +)?zsh( |$)" ## Numbers From f47c34c539de0f8c7536a5906be8714e044f066d Mon Sep 17 00:00:00 2001 From: nl6720 Date: Sun, 7 Feb 2016 13:07:59 +0200 Subject: [PATCH 118/119] Add more conditionals to zsh --- zsh.nanorc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh.nanorc b/zsh.nanorc index 618b250..605bef3 100644 --- a/zsh.nanorc +++ b/zsh.nanorc @@ -6,7 +6,8 @@ header "^#!.*/(env +)?zsh( |$)" color brightyellow "\b[0-9]+\b" ## Conditionals and control flow -color green "\<(always|case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" +color green "\<(always|break|bye|case|continue|disown|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" + color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" ## Conditional flags color green "-[Ldefgruwx]\>" From cbb1386386844ed27924eb3e66b5b1fdd51c42fa Mon Sep 17 00:00:00 2001 From: nl6720 Date: Sun, 7 Feb 2016 13:44:50 +0200 Subject: [PATCH 119/119] add various commands --- zsh.nanorc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zsh.nanorc b/zsh.nanorc index 605bef3..2947db0 100644 --- a/zsh.nanorc +++ b/zsh.nanorc @@ -14,11 +14,14 @@ color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" ## Bash-inherited -color brightblue "\<(alias|bindkey|builtin|cd|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\>" +color brightblue "\<((un)?alias|bindkey|builtin|cd|declare|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\>" ## ZSH-specific -color brightblue "\<(add-zsh-hook|autoload|compinit|echotc|emulate|print|prompt(init)?|setopt|zle|zmodload|zstyle)\>" +color brightblue "\<(add-zsh-hook|autoload|chdir|compinit|dirs|(dis|en)able|echotc|emulate|print|prompt(init)?|(un)?setopt|zle|zmodload|zstyle|whence)\>" + ## Common linux commands -color brightmagenta "\<(cat|chmod|chown|cp|cut|echo|env|false|find|grep|head|install|kill|less|ln|make|mkdir|mv|nice|pwd|rm|rmdir|sed|tar|true|touch|uname|wc|whoami)\>" +color brightmagenta "\<((g|ig)?awk|find|\w{0,4}grep|kill|killall|\w{0,4}less|make|pkill|sed|tar)\>" +## Coreutils commands +color brightmagenta "\<(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|echo|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes|)\>" ## Function definition icolor brightgreen "^\s+(function\s+)[0-9A-Z_]+\s+\(\)"