Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Sample initialization file for GNU nano.
- ##
- ## Please note that you must have configured nano with --enable-nanorc
- ## for this file to be read! Also note that this file should not be in
- ## DOS or Mac format, and that characters specially interpreted by the
- ## shell should not be escaped here.
- ##
- ## To make sure a value is disabled, use "unset <option>".
- ##
- ## For the options that take parameters, the default value is given.
- ## Other options are unset by default.
- ##
- ## Quotes inside string parameters don't have to be escaped with
- ## backslashes. The last double quote in the string will be treated as
- ## its end. For example, for the "brackets" option, ""')>]}" will match
- ## ", ', ), >, ], and }.
- set tabsize 4
- ## Use auto-indentation.
- set autoindent
- ## Backup files to filename~.
- # set backup
- ## The directory to put unique backup files in.
- # set backupdir ""
- ## Do backwards searches by default.
- # set backwards
- ## Use bold text instead of reverse video text.
- # set boldtext
- ## The characters treated as closing brackets when justifying
- ## paragraphs. They cannot contain blank characters. Only closing
- ## punctuation, optionally followed by closing brackets, can end
- ## sentences.
- ##
- # set brackets ""')>]}"
- ## Do case sensitive searches by default.
- # set casesensitive
- ## Constantly display the cursor position in the statusbar. Note that
- ## this overrides "quickblank".
- set const
- ## Use cut to end of line by default.
- # set cut
- ## Set the line length for wrapping text and justifying paragraphs.
- ## If fill is 0 or less, the line length will be the screen width less
- ## this number.
- ##
- # set fill -8
- ## Enable ~/.nano_history for saving and reading search/replace strings.
- # set historylog
- ## The opening and closing brackets that can be found by bracket
- ## searches. They cannot contain blank characters. The former set must
- ## come before the latter set, and both must be in the same order.
- ##
- # set matchbrackets "(<[{)>]}"
- ## Use the blank line below the titlebar as extra editing space.
- # set morespace
- ## Enable mouse support, if available for your system. When enabled,
- ## mouse clicks can be used to place the cursor, set the mark (with a
- ## double click), and execute shortcuts. The mouse will work in the X
- ## Window System, and on the console when gpm is running.
- ##
- # set mouse
- ## Allow multiple file buffers (inserting a file will put it into a
- ## separate buffer). You must have configured with --enable-multibuffer
- ## for this to work.
- ##
- # set multibuffer
- ## Don't convert files from DOS/Mac format.
- # set noconvert
- ## Don't follow symlinks when writing files.
- # set nofollow
- ## Don't display the helpful shortcut lists at the bottom of the screen.
- # set nohelp
- ## Don't add newlines to the ends of files.
- # set nonewlines
- ## Don't wrap text at all.
- # set nowrap
- ## Set operating directory. nano will not read or write files outside
- ## this directory and its subdirectories. Also, the current directory
- ## is changed to here, so any files are inserted from this dir. A blank
- ## string means the operating directory feature is turned off.
- ##
- # set operatingdir ""
- ## Preserve the XON and XOFF keys (^Q and ^S).
- # set preserve
- ## The characters treated as closing punctuation when justifying
- ## paragraphs. They cannot contain blank characters. Only closing
- ## punctuation, optionally followed by closing brackets, can end
- ## sentences.
- ##
- # set punct "!.?"
- ## Do quick statusbar blanking. Statusbar messages will disappear after
- ## 1 keystroke instead of 26. Note that "const" overrides this.
- ##
- # set quickblank
- ## The email-quote string, used to justify email-quoted paragraphs.
- ## This is an extended regular expression if your system supports them,
- ## otherwise a literal string. Default:
- # set quotestr "^([ ]*[#:>\|}])+"
- ## if you have extended regular expression support, otherwise:
- # set quotestr "> "
- ## Fix Backspace/Delete confusion problem.
- # set rebinddelete
- ## Fix numeric keypad key confusion problem.
- # set rebindkeypad
- ## Do extended regular expression searches by default.
- # set regexp
- ## Make the Home key smarter. When Home is pressed anywhere but at the
- ## very beginning of non-whitespace characters on a line, the cursor
- ## will jump to that beginning (either forwards or backwards). If the
- ## cursor is already at that position, it will jump to the true
- ## beginning of the line.
- # set smarthome
- ## Use smooth scrolling as the default.
- # set smooth
- ## Use this spelling checker instead of the internal one. This option
- ## does not properly have a default value.
- ##
- # set speller "aspell -x -c"
- ## Allow nano to be suspended.
- # set suspend
- ## Use this tab size instead of the default; it must be greater than 0.
- # set tabsize 8
- ## Convert typed tabs to spaces.
- # set tabstospaces
- ## Save automatically on exit, don't prompt.
- # set tempfile
- ## Disallow file modification; why would you want this in an rcfile? ;)
- # set view
- ## The two single-column characters used to display the first characters
- ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
- ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
- # set whitespace " "
- ## Detect word boundaries more accurately by treating punctuation
- ## characters as part of a word.
- # set wordbounds
- ## Color setup
- ##
- ## Format:
- ##
- ## syntax "short description" ["filename regex" ...]
- ##
- ## The "none" syntax is reserved; specifying it on the command line is
- ## the same as not having a syntax at all. The "default" syntax is
- ## special: it takes no filename regexes, and applies to files that
- ## don't match any other syntax's filename regexes.
- ##
- ## color foreground,background "regex" ["regex"...]
- ## or
- ## icolor foreground,background "regex" ["regex"...]
- ##
- ## "color" will do case sensitive matches, while "icolor" will do case
- ## insensitive matches.
- ##
- ## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
- ## For foreground colors, you may use the prefix "bright" to get a
- ## stronger highlight.
- ##
- ## To use multi-line regexes, use the start="regex" end="regex"
- ## [start="regex" end="regex"...] format.
- ##
- ## If your system supports transparency, not specifying a background
- ## color will use a transparent color. If you don't want this, be sure
- ## to set the background color to black or white.
- ##
- ## If you wish, you may put your syntaxes in separate files. You can
- ## make use of such files (which can only include "syntax", "color", and
- ## "icolor" commands) as follows:
- ##
- ## include "/path/to/syntax_file.nanorc"
- ##
- ## Unless otherwise noted, the name of the syntax file (without the
- ## ".nanorc" extension) should be the same as the "short description"
- ## name inside that file. These names are kept fairly short to make
- ## them easier to remember and faster to type using nano's -Y option.
- ##
- ## All regexes should be extended regular expressions.
- #####################################################################################################################
- ## Default - makes ## as comment
- ##include "/usr/share/nano/default.nanorc"
- syntax "default"
- color green "^#.*"
- color brightgreen "^##.*"
- color yellow "^###.*"
- #color green "^[ \t]*#.*
- #####################################################################################################################
- ## Emacs
- ##include "/usr/share/nano/dotemacs.nanorc"
- syntax "dotemacs" "^.emacs$"
- color green "^;.*"
- #####################################################################################################################
- ## C/C++
- ##include "/usr/share/nano/c.nanorc"
- ## 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 brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
- color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
- color magenta "\<(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 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="^(\\.|[^"])*""
- ## Comment highlighting
- color brightblue "//.*"
- color brightblue start="/\*" end="\*/"
- #####################################################################################################################
- ## HTML
- #there is better one in xml.nanorc
- # include "/usr/share/nano/html.nanorc"
- ## Here is a short example for HTML.
- ##
- syntax "html" "\.html$"
- color blue start="<" end=">"
- color red "&[^;[[:space:]]]*;"
- #####################################################################################################################
- ## TeX
- ##include "/usr/share/nano/tex.nanorc"
- ## Here is a short example for TeX files.
- ##
- syntax "tex" "\.tex$"
- icolor green "\\.|\\[A-Z]*"
- color magenta "[{}]"
- color blue "%.*"
- #####################################################################################################################
- ## Quoted emails (under e.g. mutt)
- ##include "/usr/share/nano/mutt.nanorc"
- ## Here is an example for quoted emails (under e.g. mutt).
- ##
- syntax "mutt"
- color green "^>.*"
- #####################################################################################################################
- ## Patch files
- ##include "/usr/share/nano/patch.nanorc"
- ## 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.*"
- #####################################################################################################################
- ## Manpages
- ##include "/usr/share/nano/man.nanorc"
- ## 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)"
- #####################################################################################################################
- ## Groff
- ##include "/usr/share/nano/groff.nanorc"
- ## 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]"
- #####################################################################################################################
- ## Perl
- ##include "/usr/share/nano/perl.nanorc"
- ## 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"
- #####################################################################################################################
- ## Python
- ##include "/usr/share/nano/python.nanorc"
- ## Here is an example for Python.
- ##
- syntax "python" "\.py$"
- icolor brightblue "def [0-9A-Z_]+"
- color brightcyan "\<(and|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|while)\>"
- color brightgreen "["'].*[^\\]["']" "["']{3}.*[^\\]["']{3}"
- color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
- color brightred "#.*$"
- #####################################################################################################################
- ## Ruby
- ##include "/usr/share/nano/ruby.nanorc"
- ## 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|\?\?\?)"
- #####################################################################################################################
- ## Java
- ##include "/usr/share/nano/java.nanorc"
- ## 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:]]+$"
- #####################################################################################################################
- ## Assembler
- ##include "/usr/share/nano/asm.nanorc"
- ## 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="\*/"
- #####################################################################################################################
- ## Bourne shell scripts
- ##include "/usr/share/nano/sh.nanorc"
- ## Here is an example for Bourne shell scripts.
- ##
- syntax "sh" "\.sh$"
- icolor red "^[a-zA-Z_0-9]+\(\)"
- color brightblue "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
- color white "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
- color green "-[Ldefgruwx]\>"
- color white "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
- color white "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
- icolor cyan "\$\{?[0-9A-Z_!@#$*?-]+\}?"
- color green "(^|[[:space:]])#.*$"
- color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
- #####################################################################################################################
- ## Gentoo ebuilds and such
- ##include "/usr/share/nano/gentoo.nanorc"
- ## 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)\>"
- color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
- color green "-(e|d|f|r|g|u|w|x|L)\>"
- color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
- ## Highlight variables ... official portage ones in red, all others in bright red
- color brightred "\$\{?[a-zA-Z_0-9]+\}?"
- color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
- color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
- ## Highlight portage commands
- color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
- color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>"
- color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
- color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
- color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
- color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
- color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
- ## Highlight common commands used in ebuilds
- color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
- ## Highlight comments (doesnt work that well)
- color yellow "#.*$"
- ## Highlight strings (doesnt work that well)
- color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
- ## 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 "#.*$"
- #####################################################################################################################
- ## PHP something missing in there...
- #include "/usr/share/nano/php.nanorc"
- syntax "php" "\.php[2345s~]?$"
- color brightblue "(.*)\("
- color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
- color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
- color green "[.,{}();]"
- color red "('.*')|(\".*\")"
- color brightyellow "(#.*|//.*)$"
- color brightyellow start="/\*" end="\*/"
- color brightblue "(<\?(php)?|\?>)"
- color white start="\?>" end="<\?(php)?"
- #####################################################################################################################
- ## PHP
- ##include "/usr/share/nano/php2.nanorc"
- # PHP Syntax Highlighting
- syntax "php2" "\.php[2345s~]?$"
- color brightblue "(.*)\("
- color blue "\$[a-zA-Z_0-9$]*|[=!<>]"
- color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
- color green "[.,{}();]"
- color red "('.*')|(\".*\")"
- color brightyellow "(#.*|//.*)$"
- color brightyellow start="/\*" end="\*/"
- color brightblue "(<\?(php)?|\?>)"
- color white start="\?>" end="<\?(php)?"
- #####################################################################################################################
- ## Xorg config
- ##include "/usr/share/nano/xorg.nanorc"
- ## syntax highlighting in xorg.conf
- ##
- syntax "xorg" "xorg\.conf$"
- color brightwhite "[^A-Za-z0-9](End)?Sub[sS]ection([^A-Za-z0-9]|[[:space:]]*)"
- color brightwhite "^[[:space:]]*(End)?Section([^A-Za-z0-9]|[[:space:]]*)"
- color yellow "[^A-Za-z0-9](Monitor|View[pP]ort|Virtual)[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9]Mod(e|es|eline|ulePath|elName)[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](\+vsync|\+hsync|HorizSync|VertRefresh)[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](Rgb|Font)Path[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](Default(Color)?)?Depth[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](Input)?Device[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](Identifier|Screen|Option)[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9]((Left|Right)Of|Driver|Load)[^A-Za-z0-9]"
- color yellow "[^A-Za-z0-9](VendorName|BoardName|BusID)[^A-Za-z0-9]"
- color magenta "[0-9]"
- color white ""(\\.|[^\"])*""
- color green "#.*"
- #####################################################################################################################
- ## XML
- ##include "/usr/share/nano/xml.nanorc"
- ##****************************************************************************
- #
- # Syntax highlighting for XML files
- #
- # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
- # License: GPL 2 or later
- #
- # Version: 2004-02-25
- #
- ##****************************************************************************
- syntax "ml" ".*\.([jrs]?html?|xml|sgml?|lhtml|opml|kdevelop|vcproj|glade|xsd|plist|gcs|dtd|dcl)$" "catalog$" "docbook"
- color white "^.+$"
- color green start="<" end=">"
- color cyan "<[^> ]+"
- color cyan ">"
- color yellow start="<!DOCTYPE" end="[/]?>"
- color yellow start="<!--" end="-->"
- color red "&[^;]*;"
- #####################################################################################################################
- ## URLS
- ##include "/usr/share/nano/urls.nanorc"
- ##****************************************************************************
- #
- # Syntax highlighting for HTTP codes
- #
- # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
- # License: GPL 2 or later
- #
- # Version: 2004-02-25
- #
- ##****************************************************************************
- syntax "urls"
- color brightmagenta "^.*$"
- color cyan "^(1[0-9][0-9]|20[256]|30[45]).*$"
- color green "^20[03].*$"
- color brightyellow "^(201|30[0-37]).*$"
- color brightred "^(204|[45][0-9][0-9]|666).*$"
- #####################################################################################################################
- ## CSS
- ##include "/usr/share/nano/css.nanorc"
- ##****************************************************************************
- #
- # Syntax highlighting for CSS files
- #
- # Author: Simon Rupf, simon.rupf(a)int-ag.ch
- # License: GPL 2 or later
- #
- # Version: 2005-02-14
- #
- ##****************************************************************************
- 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 ";|:|\{|\}"
- #####################################################################################################################
- ## Conky
- ##include "/usr/share/nano/conky.nanorc"
- ## Conky config highlighting
- ##
- syntax "Conky" ".conkyrc$"
- color brightblue "(use_spacer|background|use_xft|xftfont|xftalpha)"
- color brightblue "(mail_spool|update_interval|own_window)"
- color brightblue "(double_buffer|minimum_size)"
- color brightblue "(draw_(outline|borders|shades)|stippled_borders)"
- color brightblue "border_(margin|width)"
- color brightblue "default_((shade_|outline_)?color)"
- color brightblue "(alignment|gap_x|gap_y|no_buffers|uppercase)"
- color brightblue "^TEXT[[:space:]]*$"
- color brightred "[[:space:]]+(yes|no)[[:space:]]*"
- color brightred "(top_left|top_right|bottom_left|bottom_right)[[:space:]]*$"
- color magenta "[[:space:]]+([[:space:]]*([0-9]\.?))+[[:space:]]*"
- color brightred "\$\{?[a-zA-Z_0-9\# ]+\}?"
- color green "^[[:space:]]*#.*"
- color white "[[:space:]]+\#[0-9A-Fa-f]{6}"
- #####################################################################################################################
- ## .cf
- ##include "/usr/share/nano/maincf.nanorc"
- ### all *cf files (e.g. main.cf, Postfix )
- syntax "maincf" "(\.|/|)cf$"
- color magenta "\=.*$"
- color green "#.*$"
- color cyan "[A-Z0-9\_]+="
- color blue ""(\\.|[^\"])*""
- color red "\@"
- #####################################################################################################################
- ## *rc - catches more files for now
- ##include "/usr/share/nano/rcfiles.nanorc"
- ### all *rc files ( e.g. .bashrc, inputrc, xtermcontrol .... )
- syntax "rcfiles" "\rc$" "(\.|/|)control$"
- color red "'(\\.|[^'])*'"
- color blue ""(\\.|[^\"])*""
- color magenta "[A-Z0-9\_]+="
- color magenta "\<(sudo)\>"
- color cyan "\<(alias)\>"
- color brightcyan "\<(export)\>"
- color yellow "\<(shopt)\>"
- color brightred "\<(umask)\>.*$"
- color green "#.*$"
- #####################################################################################################################
- ## *rc
- ##include "/usr/share/nano/rcfiles-new.nanorc"
- ## this .rc is not meant for rcs in etc but those used in apps like wine
- syntax "rc" "\.rc$"
- color cyan start="\{" end="\}"
- color brightgreen start="<" end=">"
- color brightyellow "(\"(\\.|[^\"])*\"|[0-9])"
- color green start="\/\*" end="\*\/"
- color yellow "(#(define|include)|LANGUAGE|FONT)"
- ### all *rc files ( e.g. .bashrc, inputrc, xtermcontrol .... )
- ##syntax "rcfiles" "(\.|/|)rc$" "(\.|/|)control$"
- syntax "rcfiles2" "((.ba|ba|c|.c)sh|input|xinit|eix|(.w|w)minet)|gtk|rc$"
- color red "'(\\.|[^'])*'"
- color blue ""(\\.|[^\"])*""
- color magenta "[A-Z0-9\_]+="
- color magenta "\<(sudo)\>"
- color cyan "\<(alias)\>"
- color brightcyan "\<(export)\>"
- color yellow "\<(shopt)\>"
- color brightred "\<(umask)\>.*$"
- color green "#.*$"
- ## rc...
- syntax "rc2" "(wop|wget)rc$"
- color cyan "\=.*$"
- color brightgreen start="<" end=">"
- color brightyellow "[0-9]"
- icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]\="
- color brightred "[[:space:]]off"
- color brightgreen "[[:space:]]on"
- color green "#.*$"
- #####################################################################################################################
- ## profile
- ##include "/usr/share/nano/profile.nanorc"
- ### all *profile files ( ~/.bash_profile, /etc/profile)
- syntax "profiles" "(\.|/|)profile$"
- color red "'(\\.|[^'])*'"
- color blue ""(\\.|[^\"])*""
- color magenta "[a-zA-Z0-9\_]+="
- color magenta "\<(sudo)\>"
- color cyan "\<(export)\>" "\<(alias)\>"
- color brightred "\<(umask)\>.*$"
- color green "#.*$"
- #####################################################################################################################
- ## java script
- ##include "/usr/share/nano/js.nanorc"
- ### all *js files ( e.g. Firefox user.js, prefs.js )
- syntax "jsfiles" "(\.|/|)js$"
- color green "//.*$" start="\/\*" end="\*\/"
- color blue "'(\\.|[^'])*'"
- color red ""(\\.|[^\"])*""
- color brightgreen "\<(true)\>"
- color brightred "\<(false)\>" "http\:\/\/.*$"
- color brightmagenta "[0-9](\\.|[^\"])*)"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/configfiles.nanorc"
- ### all *conf files (e.g. make.conf, xorg.conf, grub.conf, make.globals, Xfce files...)
- syntax "configfiles" "(\.|/|)conf$" "(\.|/|)ample$" "(\.|/|)globals$" "xfce.*$" "syslog-ng" "sudoers"
- color brightwhite "\<(alias)\>"
- color blue "<(\\.|[^'])*>"
- color magenta "[a-zA-Z0-9\_]+="
- color white ">(\\.|[^'><])*</"
- color green "//.*$"
- color red ""(\\.|[^\"])*""
- color red "title.*$" "\<(server)\>" "\<(logfile)\>" "\<(driftfile)\>" "\<(restrict)\>"
- color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
- color magenta "'(\\.|[^'])*'"
- color brightwhite "[0-9]"
- color brightwhite "[<>]"
- color magenta "Section" "EndSection" "SubSection" "EndSubSection"
- color red "\<(root)\>"
- color brightred,blue "^.*-->" start="<!--.*" end="$"
- color green "#.*$" start="<!--" end="-->"
- #####################################################################################################################
- ## Xstuff
- ##include "/usr/share/nano/xdefaults.nanorc"
- ## Xdefaults
- syntax "Xdefaults" "(\.|/|)default.$" "(\.|/|)resource.$" "fonts.alias"
- color magenta "XTerm"
- color cyan "Rxvt"
- color white "\*(\\.|[^'])*\:"
- color brightblue "\<(true)\>"
- color brightred "\<(false)\>"
- color brightwhite "[0-9]"
- color green "!.*$" "#.*$"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/config.nanorc"
- ### several config files
- syntax "config" "(\.|/|)config$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$"
- color red "/.*$" "TERM" "\..*$" "=.*$" "\*.*$"
- color white ":unscaled" "[0-9]"
- color blue "setenv|export" "\;"
- color green "#.*$"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/config2.nanorc"
- ### more config files
- syntax "config2" "(\.|/|)env$" "(\.|/|)server.$" "hosts" "gpm" "local.*$" "bootsplash" "crypto-loop"
- color red "/.*$" "http\:\/\/.*$"
- color white ":unscaled"
- color blue "setenv|export"
- color brightwhite "[0-9]"
- color green "#.*$"
- color white "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/config3.nanorc"
- ### even more config files ;-)
- syntax "config3" "iptables" "ntp.*$" "rsyncd" "xfs" "saslauthd" "timidity" "net.*$" "hdparm" "esound" "login.*$"
- color red "/.*$" "http\:\/\/.*$" ""(\\.|[^\"])*"" "\<(server)\>" "\<(logfile)\>""\<(driftfile)\>"
- color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
- color blue "setenv|export"
- color brightwhite "[0-9]"
- color green "#.*$"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/tab.nanorc"
- ### all *tab files ( e.g. fstab, crontab, inittab )
- syntax "fstab" "(\.|/|)tab$"
- color magenta "\<(none)\>.*$" "\<(wait)\>" "\<(respawn)\>"
- color red "/dev/hd.*$" "\<(ctrlaltdel)\>" "\<(initdefault)\>"
- color blue "/dev/sr.*$" "/dev/cd.*$" "\/sbin.*$"
- color cyan "/dev/sd.*$"
- color brightcyan "^.*(nfs|smbfs).*$"
- color yellow "/dev/fd.*$"
- color red "root"
- color brightwhite "[0-9]"
- color green "#.*$"
- #####################################################################################################################
- ## configs
- ##include "/usr/share/nano/passwd.nanorc"
- ### etc/passwd
- syntax "passwd" "(\.|/|)passwd$" "(\.|/|)shadow$"
- color white ".*$"
- color blue "\:.*$"
- color yellow "\:*\:"
- color cyan "/.*$"
- color red "/bin/false"
- color brightred "root"
- color brightgreen "/bin/.*sh"
- color white "[0-9]"
- color magenta "\:\/.*\:"
- #####################################################################################################################
- ##include "/usr/share/nano/desc.nanorc"
- ### all *desc files ( e.g. use.desc, use.local.desc )
- syntax "use" "(\.|/|)desc$"
- color green ".*\-"
- color white "\:.*$"
- color white "\-.*$"
- color magenta "\:(\\.|[^'])*\-"
- color blue "\-(\\.|[^'])*\:"
- color yellow "\/(\\.|[^'])*\:"
- color red "x86" "http\:\/\/.*$"
- color brightred "\!\!(\\.|[^'])*\!\!" "DO NOT SET THIS FLAG YOURSELF!"
- color green "#.*$"
- #####################################################################################################################
- ## Delphi
- ##include "/usr/share/nano/delphi.nanorc"
- syntax "Delphi Source" "\.pas$"
- color brightcyan "\<(boolean|byte|char|double|float|integer|long|new|short|this|transient|void)\>"
- color brightred "\<(break|case|catch|continue|default|do|else|finally|for|if|then|return|switch|throw|try|while|function)\>"
- #color cyan "\<(abstract|unit|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|$color brightyellow "\<(until|repeat|var|uses|type|begin|end|const)\>"
- color magenta "\<(true|false|null|procedure)\>"
- color brightblue "//.*"
- color brightblue start="\{" end="\}"
- #####################################################################################################################
- # ChangeLog - colors everything in blue
- ##include "/usr/share/nano/changelog.nanorc"
- syntax "changelog" "ChangeLog$"
- color brightgreen "^\+.*"
- color green "^\+\+\+.*"
- color brightblue "^ .*"
- color brightred "^-.*"
- color red "^---.*"
- color red "(\d\d\s\w\+\s\d\{4\})"
- color brightyellow "^@@.*"
- color magenta "^diff.*"
- #syn region GentooChangeLogRelease start=/^\*/ end=/$/ contains=GentooChangeLogReleaseDate
- #syn match GentooChangeLogReleaseDate contained /(\d\d\s\w\+\s\d\{4\})/
- #syn region GentooChangeLogEntry start=/^\s\+/ end=/\n\n/
- # \ contains=GentooChangeLogEntryDate,GentooBug
- #syn region GentooChangeLogEntryDate contained start=/\d\?\d\s\w\+\s\d\{4\}/ end=/;/
- # \ nextgroup=GentooChangeLogEntryAuthor,GentooChangeLogEntryEmail skipwhite skipnl
- #syn region GentooChangeLogEntryAuthor contained start=/\S/ end=/\( <\)\@=/
- # \ nextgroup=GentooChangeLogEntryEmail skipwhite skipnl
- #syn match GentooChangeLogEntryEmail contained /<\?[a-zA-Z0-9\.\-\_]\+@[a-zA-Z0-9\.\-\_]\+>\?/
- # \ nextgroup=GentooChangeLogFiles skipwhite skipnl
- #syn region GentooChangeLogFiles contained start=/\(\S\)\@=/ end=/:/
- # \ contains=GentooChangeLogAddFile,GentooChangeLogDelFile,GentooChangeLogModFile
- #" Add / delete / changed files
- #syn region GentooChangeLogAddFile contained start=/+/ end=/\([,:]\)\@=/
- #syn region GentooChangeLogDelFile contained start=/-/ end=/\([,:]\)\@=/
- #syn region GentooChangeLogModFile contained start=/[a-zA-Z0-9]/ end=/\([,:]\)\@=/
- #####################################################################################################################
- ## ChangeLog (C)ryszardzonk
- ##include "/usr/share/nano/changelogs.nanorc"
- ## Changelog file syntax
- ##
- syntax "changelogs" "ChangeLog*$" "HISTORY$" "NEWS$"
- color green "\+"
- color red "\-"
- color brightwhite "[0-9]"
- color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
- color blue "[0-9][0-9][0-9][0-9]\-[0-9][0-9]\-[0-9][0-9]"
- color blue "[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]"
- color blue "\<(CEST|CET|CST||CDT|EDT)\>"
- color yellow "[0-9]\..*$"
- color cyan "\*.*$"
- color brightblue "\<(pre.*$|beta.*$|rc.*$|release.*$)\>"
- color green "#.*$"
- icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
- color magenta "[.0-9A-Za-z_]*[[:space:]]*[.0-9A-Za-z_]*[[:space:]]<"
- color brightyellow "<(\\.|[^\"])*>"
- color brightwhite "commit[[:space:]]*[.0-9A-Z_]*$"
- #####################################################################################################################
- ## video metadata info (C)ryszardzonk
- ##include "/usr/share/nano/info.nanorc"
- ## *.Info file syntax
- ##
- syntax "info" "Info.txt$"
- color green "[0-9]"
- color brightblue "\<(video|codec|bitrate|width|height|General|FileSize|Format|OveralBitRate|PlayTime)\>"
- color brightblue "\<(Video|Codec|Bitrate|BitRate|Width|Height|AspectRatio|FrameRate|Bits|SamplingRate)\>"
- color brightblue "\<(audio|channel|V(i|I)DEO|CODEC|FORMAT|B(I|i)TRATE|METHOD|R(I|i)P|AUD(I|i)O|RESOLUT(I|i)ON|GENRE)\>"
- color brightblue "\<(Audio|Channel|Sound|ASPECT|RAT(i|I)O|MOV(I|i)E|S(i|I)ZE|RUNT(I|i)ME)\>"
- color magenta "Movie.*$"
- color blue "\<(KHz|kHz|Kbps|fps|MB|KB|channels|MiB|min|kbit\/s|Min)\>"
- color brightyellow "\<(DivX|XviD|MPEG\-4|AAC\ LC|H\.264|LAME|NTSC|MPEG1|AVI)\>"
- color brightblack "\="
- icolor brightcyan "[.0-9A-Z_]*:"
- icolor brightyellow "http:.*$"
- #####################################################################################################################
- ## configs in /etc (C)ryszardzonk
- ##include "/usr/share/nano/etc-stuff.nanorc"
- ## /etc/ stuff syntax
- ##
- syntax "group" "group$"
- color green "[0-9]\:.*$"
- color brightwhite "[0-9]"
- icolor brightred "^[[:space:]]*[.0-9A-Z_]*:"
- syntax "modules" "modules.conf$" "modules.d/(\.|/|)"
- color brightwhite "[0-9]"
- color red "alias"
- color brightred "(probeall|options)"
- color green "#.*$"
- syntax "modprobe" "modprobe.conf$"
- color brightwhite "[0-9]"
- color red "alias"
- color brightred "options"
- color magenta "[a-zA-Z0-9\_]+="
- color green "#.*$"
- syntax "hosts" "hosts$"
- color brightwhite "[0-9]"
- color cyan "\:\:"
- color yellow "127.0.0.1"
- color green "#.*$"
- syntax "mplayer" "mplayer.conf$"
- color brightgreen "\=.*$"
- color brightred "no"
- color cyan "\="
- color green "#.*$"
- syntax "mplayerplugin" "mplayerplug\-in.conf$"
- color brightgreen "\=.*$"
- color brightred "0"
- color cyan "\="
- color green "#.*$"
- syntax "sensors" "sensors.conf$"
- color brightyellow "\".*$"
- color yellow "\<(label|compute|set|chip)\>"
- color green "#.*$"
- syntax "sysctl" "sysctl.conf$"
- color brightwhite "[0-9]"
- color cyan "\="
- color green "#.*$"
- syntax "dircolors" "DIR_COLORS$"
- color yellow "\<(TERM|NORMAL|FILE|DIR|LINK|FIFO|SOCK|DOOR|BLK|CHR|ORPHAN|MISSING|SETUID|SETGID)\>"
- color yellow "\<(STICKY|EXEC|STICKY_OTHER_WRITABLE|OTHER_WRITABLE)\>"
- color brightblack "[0-9][0-9]\;.*$"
- color cyan "\.[.0-9A-Z_]*[[:space:]]"
- color green "#.*$"
- syntax "modes" "fb.modes$"
- color yellow "\<(mode|endmode)\>"
- color cyan "\<(geometry|timings|hsync|vsync|double)\>"
- color green "#.*$"
- syntax "serial" "serial.conf$"
- color brightwhite "[0-9]"
- color cyan "\<(uart|port|irq|fourport)\>"
- color green "#.*$"
- syntax "services" "services$"
- color cyan "/tcp"
- color magenta "udp"
- color brightblack "/"
- color brightwhite "[0-9]"
- color green "#.*$"
- syntax "crontab" "crontab$"
- color brightwhite "[0-9]"
- color cyan "\*"
- color yellow "[[:space:]]/.*$"
- color brightblack "(&|>)"
- color green "#.*$"
- syntax "nscd" "nscd.conf$"
- color cyan "(passwd|group|hosts)"
- color yellow "([0-9]|yes)"
- color green "#.*$"
- syntax "rsync" "rsyncd.conf$"
- color cyan "(hosts|(u|g)id|pid\ file|use\ chroot|read\ only|address|max\ connections|motd\ file)"
- color cyan "(log\ format|syslog\ facility|timeout)"
- color yellow "(path|comment|exclude)"
- color brightyellow start="\[" end="\]"
- color green "#.*$"
- syntax "lilo" "lilo.conf$"
- color cyan "(boot|map|install|menu\-scheme|timeout|delay|prompt|vga|default)"
- color brightwhite "[0-9]"
- color magenta "(lba32|linear|compact|image)"
- color brightyellow "(root|label|read\-only)"
- color yellow "\/.*$"
- color green "#.*$"
- syntax "hdparm" "hdparm$"
- color cyan "(pata|sata)_all_args"
- color cyan "[A-Za-z0-9]*_args"
- color magenta "\".*$"
- color green "#.*$"
- syntax "ini" "\.ini$"
- color yellow "\[.*]"
- color green "\;.*$"
- syntax "smbconf" "smb.conf$"
- color brightcyan "\=.*$"
- color cyan "\/.*$"
- color brightred "(no|No)"
- color brightgreen "(yes|Yes)"
- color brightyellow "(workgroup.*$|hosts\ allow.*$|interfaces.*$|netbios\ name.*$)"
- color yellow "\[.*]|\="
- icolor magenta "^[[:space:]]*[.A-Z]*"
- icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
- icolor magenta "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
- color green "\;.*$"
- color green "#.*$"
- syntax "mke2fs" "mke2fs.conf$"
- color cyan "(base_features|blocksize|inode_ratio)"
- color yellow "(small|floppy|news|largefile|largefile4)"
- color brightwhite "[0-9]"
- color brightyellow start="\[" end="\]"
- color blue "\{|\}"
- color brightblack "\="
- color green "#.*$"
- #this on may need fewer colors ;)
- syntax "squidconf" "squid.conf$"
- color brightyellow "(http_port|hierarchy_stoplist|maximum_object_size|cache_dir|dns_testnames)"
- color brightyellow "(coredump_dir|pipeline_prefetch|cache_mgr|visible_hostname|ftp_user|client_netmask)"
- color cyan "(acl|refresh_pattern|quick_abort_(min|max)|(cache|memory)_replacement_policy|(access|cache|cache_store)_log|cache_host)"
- color yellow "((http|icp|snmp)_access|snmp_port|parent|sibling|anonymize_headers|fake_user_agent)"
- color brightgreen "(allow|transparent|[[:space:]]on)"
- color brightred "(deny|reload\-into\-ims|override\-expire|override\-lastmod|[[:space:]]off)"
- color magenta "(src|dst|method)"
- color brightcyan "(seconds|minutes|hours|(G|M|K)B)"
- color brightblack "[0-9]"
- color green "#.*$"
- syntax "distcchosts" "/etc/distcc/hosts$"
- color brightblue "[0-9]"
- color yellow "localhost"
- color magenta "(/|@|:)"
- color green "#.*$"
- syntax "logrotate" "logrotate.conf$"
- color brightwhite "[0-9]"
- color magenta start="/" end="[[:space:]]"
- color cyan "(create|compress|include|notifempty|nomail|noolddir|\{|\})"
- color yellow "(weekly|daily|rotate|postrotate|sharedscripts)"
- color magenta "logrotate"
- color green "#.*$"
- syntax "ppppears" "/etc/ppp/peers/(\.|/|)"
- color brightwhite "user.*$"
- color brightyellow "user"
- color brightyellow start="\"" end="\""
- color yellow "lcp\-(echo\-(interval|failure)|max\-configure|restart)"
- color yellow "(debug|sync|no(ccp|pcomp|accomp)|deflate|bsdcomp|usepeerdns|pty)"
- color cyan "(lock|defaultroute|noipdefault|noauth|holdoff|maxfail|persist|asyncmap|detach|updetach|cdtrcts)"
- color brightwhite "[0-9]"
- color magenta "(\@|\,|\.)"
- color green "#.*$"
- syntax "dhcpconf" "dhcpd.conf$"
- icolor brightgreen "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z]*"
- color cyan "(authoritative|ddns\-update\-style|subnet|host)"
- color brightblue "(netmask|routers|option|domain-nam(e|e-servers)|(default|max)-lease-time)|range|broadcast\-address"
- color brightyellow start="\"" end="\""
- color yellow "(hardware|ethernet|fixed\-address)"
- color brightblack "\:|\;|\{|\})""
- color green "#.*$"
- syntax "hibernateconf" "/etc/hibernate/common.conf$"
- color magenta "^[[:space:]]*[.A-Z]*"
- color brightwhite start="'" end="'"
- color brightgreen "yes"
- color brightred "no"
- color brightcyan "auto"
- color green "#.*$"
- color brightcyan "##.*$"
- color yellow "###.*$"
- color cyan "####.*$"
- syntax "nsswitch" "nsswitch.conf$"
- icolor cyan "^[[:space:]]*[.0-9A-Z_]*:"
- color magenta "\:"
- color green "#.*$"
- syntax "sane" "sane.d/(\.|/|)"
- color brightgreen "(scsi|usb|parport|auto)"
- color brightred "option"
- color yellow "(override|vendor|model)"
- color cyan "/.*$"
- color green "#.*$"
- syntax "syslogconf" "syslog.conf$"
- icolor cyan "(\*|\;|\.|\,|\\)"
- color magenta "/.*$"
- color brightblue "-.*$"
- color brightwhite "\="
- color green "#.*$"
- ## these colors need to change...
- syntax "udevrules" "\.rules$"
- color brightwhite "[0-9]"
- color brightblack "(ACTION|SUBSYSTEM|DEVPATH|OPTIONS|WAIT_FOR_SYSFS|ENV|KERNEL|NAME|MODE|GROUP|SYMLINK|DRIVERS|PROGRAM|RUN)"
- color brightblack "(GOTO|IMPORT|ATTRS|SUBSYSTEMS|DVB|IR|BUS|SYSFS|ATTR|LABEL)"
- color yellow "(add|net|scsi|drivers|module|address|bus|devices|ioerr_cnt|ignore_device|svga|video|tt(y(S|USB)|y|s)|last_rule)"
- color yellow "(pnp|(au|ra)dio|tape|disk|snd|microcode|f(b|d|loppy|irmware)|usb|lp|kbd|parport|block|ide|misc|netlink|input)"
- color yellow "(mouse|event|joystick|psmouse|atkbd|spkr|pcspkr|ir|dvb|persistent|storage|end|scanner|sound|dialout|console)"
- color yellow "(cdrom|cdrw|dvd|dvdrw|isdn|pty|vcs|vcsa|ippp|dcbri|ircomm|capi|card|nvidia|rtc|agpgart|psaux|ptmx|sd|dasd|)"
- color yellow "(ataraid|cciss|ida|rd|3dfx|control|hw|pcm|midi|timer|seq|cpu|msr|dm|i2c|mice|js|ts|loop|md|uinput|inotify|aoe)"
- color brightyellow "(ID_(SERIAL|PATH|CLASS|EDD|CDROM|CDROM_(DVD|DVD_R|CD_RW))|program|parent|removable|GENERATED|COMMENT)"
- color brightyellow "(id(Vendor|Product)|PHYSDEVBUS|(UDEV|UDEVD)_EVENT|INTERFACE_NEW|MODALIAS|modalias|alias|name)"
- color brightred "(\%(k|r|c|n))"
- color blue "(\;|\.|\"|\,)"
- color brightblue "(\=|\*|\?)"
- color green "#.*$"
- syntax "mailalias" "/etc/mail/aliases$"
- icolor brightblue "^[[:space:]]*[.0-9A-Z_]*:"
- icolor brightblue "^[[:space:]]*[.0-9A-Z_]*\-[.0-9A-Z_]*:"
- color yellow "(\/.*$|root)"
- color green "#.*$"
- syntax "wifiradar" "wifi-radar.conf$"
- color brightwhite "[0-9]"
- color yellow "((f|F)alse|eth[.0-9])|yes|no|[[:space:]]auto|ssid"
- color brightgreen start="\[" end="\]"
- color green "#.*$"
- syntax "irssi" "irssi.conf$"
- icolor brightwhite "(^[[:space:]]*[.0-9A-Z_]*[[:space:]]=|address|name|chatnet|port|autojoin)"
- color brightblue ""(\\.|[^\"])*""
- color yellow "(\{|\}|\;)"
- color brightblack "\="
- color brightgreen "(Y|y)es|[0-9]"
- color brightred "No"
- color blue "\""
- color cyan "(servers|chatnets|channels|aliases|statusbar)"
- color green "#.*$"
- syntax "proftpd" "proftpd.conf$"
- icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
- color brightyellow "ServerType|DefaultServer|ServerIdent|Port[[:space:]]|Umask|MaxInstances|User|Group"
- color yellow "(UserAlias|UseFtpUsers)"
- color brightgreen "([[:space:]]on|[0-9]|AllowAll)"
- color brightred "(off|DenyAll)"
- icolor cyan start="<" end=">"
- icolor cyan start=""" end="""
- color cyan "xinetd|inetd|standalone"
- color green "#.*$"
- syntax "xinetd" "xinetd.conf$"
- icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
- color brightgreen "([0-9]|yes)"
- color brightred "(off|no)"
- color magenta "defaults"
- color brightblack "="
- color brightyellow "(\{|\})"
- color cyan "/.*$"
- color green "#.*$"
- syntax "xinetd.d" "xinetd.d/(\.|/|)"
- icolor yellow "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
- color brightgreen "([0-9]|yes)"
- color brightred "(off|[[:space:]]no)"
- color brightblack "="
- color brightyellow "(\{|\})"
- color cyan "/.*$"
- color green "#.*$"
- syntax "localegen" "locale(.gen|s.build)"
- color cyan "ISO.*$"
- color yellow "UTF.*$"
- color green "#.*$"
- syntax "clamd" "clamd.conf$"
- color brightblack "[0-9]M"
- color brightwhite "[0-9]"
- color yellow "^[[:space:]]*[.0-9A-Z_]*"
- color cyan "^[[:space:]]*[.0-9A-Z_]*[[:space:]]"
- color green "#.*$"
- syntax "grcconf" "grc.conf$"
- color cyan "conf\..*$"
- color yellow "\(.*$|\\.*$"
- color green "#.*$"
- syntax "freshclamconf" "freshclam.conf$"
- icolor brightcyan "^[[:space:]]*[.A-Z]*[[:space:]]*[.A-Z_]*"
- color cyan "\/.*$|[0-9]"
- icolor yellow "^[[:space:]]*[.A-Z]*"
- color green "#.*$"
- #####################################################################################################################
- ## logs in /var/log (C)ryszardzonk
- ##include "/usr/share/nano/log-stuff.nanorc"
- ## to have logs interpreted for you in just about 1000 ways use log analyzers
- ## this only helps in viewing them directly
- ## TODO
- # getdelta, others...
- syntax "logs" "midentd.log$" "mldonkey.log$"
- color brightwhite "[0-9]"
- color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
- color blue "[0-9][0-9][0-9][0-9]"
- color cyan "\].*$"
- color brightblack start="\[" end="\]"
- syntax "emergelog" "emerge.log$"
- color brightwhite "[0-9]"
- color yellow ">>>.*$"
- color cyan "\*\*\*.*$"
- color magenta "\:\:\:.*$"
- color green start="\(" end="\)"
- color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
- color blue "[0-9][0-9][0-9][0-9]"
- icolor red "^[[:space:]]*[.0-9A-Z_]*:"
- syntax "ntplog" "ntp.log$"
- icolor red "^[[:space:]]*[.0-9A-Z_]*:"
- color brightwhite "[0-9]"
- color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]"
- color cyan "\].*$"
- color brightblack start="\[" end="\]"
- syntax "cronlog" "cron.log$"
- color cyan "/.*$"
- color brightblue "[0-9][0-9]\-[.A-Z_]*\-[0-9][0-9]"
- color brightwhite "[0-9][0-9]\:[0-9][0-9]"
- color magenta "(FILE|USER)"
- color yellow "(pid|cmd)"
- syntax "miniserv" "miniserv.log$" "miniserv.error$"
- color cyan "Bad\ Request.*$"
- color brightred "Access\ denied.*$"
- color brightwhite "[0-9]"
- color green "(POST|GET|HTTP)"
- color brightred "\""
- color yellow "(\:|\+|/|\.|\-)"
- color green ".*started$"
- #####################################################################################################################
- ## nanorc syntax
- ##include "/usr/share/nano/nanorc.nanorc"
- ## 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:]]*##.*$"
- #####################################################################################################################
- ## *.po files (C)ryszardzonk
- ##include "/usr/share/nano/po.nanorc"
- ## *.po file syntax
- ##
- syntax "po" "\.po$" "\.pot$"
- color brightblue "\<(msgid|msgstr)\>"
- color brightred "\/"
- color green "#.*$"
- color red "\<fuzzy\>"
- color yellow "\<c-format\>"
- color yellow "\""
- color red "\"\""
- color brightyellow "\"\\n\""
- color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language\-Team|charset)\>"
- color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>"
- color yellow "\<(Copyright|(C))\>"
- color yellow "[0-9]"
- color brightyellow "\<(UTF|ISO|Windows|Mac|IBM)\>\-[0-9]"
- color red "#~.*$"
- #####################################################################################################################
- ## Apache 2
- ##include "/usr/share/nano/apache2.nanorc"
- ## Apache httpd.conf highlighting
- ##
- #how to add sites-enabled files? "default" is too generic to keep in here I think
- syntax "Apache2" "httpd.conf$"
- color brightwhite "(ServerRoot|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)"
- color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)"
- color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)"
- color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)"
- color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)"
- color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)"
- color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)"
- color brightwhite "((Force)?LanguagePriority|NameVirtualHost)"
- color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)"
- color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)"
- color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)"
- color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)"
- color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)"
- color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)"
- color yellow "((Min|Max)Spare(Threads|Servers)|Start(Threads|Servers))"
- color yellow "(MaxClients|(Max)?ThreadsPerChild|MaxRequestsPerChild)"
- color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks)"
- color brightred "(On|Off)[[:space:]]*$"
- color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$"
- color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$"
- color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*"
- color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*"
- color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*"
- color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*"
- color brightred "[[:space:]]+type-map[[:space:]]*"
- color magenta "[[:space:]]+[0-9]+[[:space:]]*"
- color magenta "(/)?(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[1-9])(\.(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])){3}([[:space:]]+::(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])/(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9]))?"
- color brightcyan start="<" end=">"
- color white ""(\\.|[^\"])*""
- # Unix-based paths
- # can't use \] in the regex for some reason?!? Maybe a bug?
- # this is preventing a 100% "to the end of the line" match for a few
- # lines (the trailing characters from ] to the EOL are not highlighted.
- # if anyone knows how to make it work, let me know.. ;)
- color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+"
- color green "^[[:space:]]*#.*"
- color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>"
- #####################################################################################################################
- ## Apache 2 Virtual Host
- ##include "/usr/share/nano/vhost.nanorc"
- ## Apache httpd.conf highlighting
- ##
- #how to add sites-enabled files? "default" is too generic to keep in here I think
- syntax "vhost" "(\.|/|)vhost\.conf"
- color brightwhite "(ServerRoot|(Lock|Pid)File|Timeout|(Max)?KeepAlive(Requests|Timeout)?)"
- color brightwhite "(User|Group|LogFormat|ErrorLog|Include|(Script)?Alias)"
- color brightwhite "(ErrorDocument|AccessFileName|UseCanonicalName|TypesConfig|DefaultType)"
- color brightwhite "(HostnameLookups|IndexOptions|(Readme|Header)Name|LanguagePriority)"
- color brightwhite "(AddIcon(ByEncoding|ByType)?|DefaultIcon|IndexIgnore|BrowserMatch)"
- color brightwhite "(Add(Encoding|Language|(Default)?Charset|Type|Handler)|DirectoryIndex)"
- color brightwhite "(DocumentRoot|Server(Admin|Signature)|LogLevel|CustomLog)"
- color brightwhite "((Force)?LanguagePriority|NameVirtualHost)"
- color brightyellow "(SetHandler|Order|Deny|Allow|SetOutputFilter)"
- color yellow "(AllowOverride|FileInfo|AuthConfig|Limit)"
- color yellow "([^A-Z0-9a-z]Options|Indexes|(\+|\-)?SymLinksIfOwnerMatch)"
- color yellow "(Includes(NoExec)?|(\+|\-)?MultiViews)"
- color yellow "(None|allow,deny|deny,allow|(allow)? from (all)?|Prefer|Fallback)"
- color yellow "(Add(Handler|OutputFilter)|NumServers|AcceptMutex)"
- color yellow "((Min|Max)Spare(Threads|Servers)|Start(Threads|Servers))"
- color yellow "(MaxClients|(Max)?ThreadsPerChild|MaxRequestsPerChild)"
- color yellow "(FancyIndexing|VersionSort|ExecCGI|FollowSymLinks)"
- color brightred "(On|Off)[[:space:]]*$"
- color brightred "[[:space:]]+(debug|info|notice|warn|error|crit|alert|emerg)[[:space:]]*$"
- color brightred "[[:space:]]+(combined|common|referer|agent)[[:space:]]*$"
- color brightred "[[:space:]]+(redirect\-carefully|nokeepalive)[[:space:]]*"
- color brightred "[[:space:]]+(force\-response\-1\.0)[[:space:]]*"
- color brightred "[[:space:]]+(downgrade\-1\.0)[[:space:]]*"
- color brightred "[[:space:]]+application/[a-zA-Z\-]+[[:space:]]*"
- color brightred "[[:space:]]+type-map[[:space:]]*"
- color magenta "[[:space:]]+[0-9]+[[:space:]]*"
- color magenta "(/)?(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[1-9])(\.(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])){3}([[:space:]]+::(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9])/(2[0-5]{2}|1[0-9]{2}|[1-9][0-9]|[0-9]))?"
- color brightcyan start="<" end=">"
- color white ""(\\.|[^\"])*""
- # Unix-based paths
- # can't use \] in the regex for some reason?!? Maybe a bug?
- # this is preventing a 100% "to the end of the line" match for a few
- # lines (the trailing characters from ] to the EOL are not highlighted.
- # if anyone knows how to make it work, let me know.. ;)
- color white "[[:space:]]+(/[/\[\^#A-Za-z0-9\.\*\_\-]+)+"
- color green "^[[:space:]]*#.*"
- color cyan "\<(ServerName|Serveralias|DocumentRoot|DirectoryIndex|ErrorLog|CustomLog)\>"
- #####################################################################################################################
- ## /etc/init.d/* custom gentoo.nanorc
- ##include "/usr/share/nano/initscript.nanorc"
- ## initscripts syntax (stolen from gentoo.nanorc) ;)
- ##
- syntax "initscript" "/etc/init.d/(\.|/|)"
- ## 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)\>"
- color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
- color green "-(e|d|f|r|g|u|w|x|L)\>"
- color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
- ## Highlight variables ... official portage ones in red, all others in bright red
- color brightred "\$\{?[a-zA-Z_0-9]+\}?"
- color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
- color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
- ## Highlight portage commands
- color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
- color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>"
- color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
- color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
- color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
- color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
- color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
- ## Highlight common commands used in ebuilds
- color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
- ## Highlight comments (doesnt work that well)
- color yellow "#.*$"
- ## Highlight strings (doesnt work that well)
- color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
- #####################################################################################################################
- ## Named (C)ryszardzonk
- ##include "/usr/share/nano/named.nanorc"
- ## named.conf syntax
- ##
- syntax "named" "named.conf"
- color brightcyan "(\{|\}|\;)"
- color brightwhite "[0-9]"
- color magenta "(options|zone|IN)"
- color yellow "(type|file|allow\-update|notify)"
- color cyan "(directory|statistics\-file|forward\ first|forwarders|listen\-on\-v6|listen\-on|allow\-query)"
- color cyan "(query\-source\ address|pid\-file)"
- color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
- ## comments
- color green "#.*$"
- color green "//.*$"
- #####################################################################################################################
- ## File Types (C)ryszardzonk
- ##include "/usr/share/nano/mimetype.nanorc"
- syntax "mimetype" "mime.types"
- icolor cyan "[.A-Z_]*/"
- color brightwhite "/"
- color green "[[:space:]].*$"
- ## comments
- color green "#.*$"
- #####################################################################################################################
- ## /etc/initng/ custom sh.nanorc
- ##include "/usr/share/nano/initng.nanorc"
- ## InitNG syntax
- ##
- syntax "initngscripts" "\.i$"
- icolor brightgreen "^[0-9A-Z_]+\(\)"
- color magenta "(daemon|virtual)"
- color brightwhite "virtual/.*$"
- color brightblack "daemon/.*$"
- color yellow "(need|use|respawn|exec\ daemon|also_stop)"
- 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 ""(\\.|[^"])*"" "'(\\.|[^'])*'"
- syntax "initng-settings" "system.virtual$" "\.runlevel$"
- color magenta "daemon"
- color cyan "system"
- color blue "net"
- color red "debug"
- #####################################################################################################################
- ## /etc/xml custom xml.nanorc
- ##include "/usr/share/nano/etcxml.nanorc"
- ##****************************************************************************
- #
- # Syntax highlighting for XML files (/etc/fonts/*)
- #
- # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org
- # License: GPL 2 or later
- #
- # Version: 2004-02-25
- #
- ##****************************************************************************
- syntax "etcxml" "/etc/fonts/(\.|/|)" "/etc/xdg/(\.|/|)"
- color white "^.+$"
- color green start="<" end=">"
- color cyan "<[^> ]+"
- color cyan ">"
- color yellow start="<!DOCTYPE" end="[/]?>"
- color yellow start="<!--" end="-->"
- color red "&[^;]*;"
- syntax "etcxml2" "gentoorc$"
- color white "^.+$"
- color green start="<" end=">"
- color cyan "<[^> ]+"
- color cyan ">"
- color yellow start="<!DOCTYPE" end="[/]?>"
- color yellow start="<!--" end="-->"
- color red "&[^;]*;"
- #####################################################################################################################
- ## sh.nanorc syntax for custom files
- ##include "/usr/share/nano/shlike.nanorc"
- ## Here is an example for Bourne shell scripts.
- ##
- syntax "shlike" "\.(m4|sub|guess)$" "missing$" "configure\.ac$" "config\.(charset|rpath|status)$" "configure$"
- 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 ""(\\.|[^"])*"" "'(\\.|[^'])*'"
- #####################################################################################################################
- ## c.nanorc syntax for custom files
- ##include "/usr/share/nano/clike.nanorc"
- ## Here is an example for C/C++.
- ##
- syntax "clike" "\.(m|pch)$"
- 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 brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
- color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
- color magenta "\<(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 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="^(\\.|[^"])*""
- ## Comment highlighting
- color brightblue "//.*"
- color brightblue start="/\*" end="\*/"
- #####################################################################################################################
- ## EKG History view (C)ryszardzonk
- ##include "/usr/share/nano/ekghistory.nanorc"
- syntax "ekghistory" "(\.|/|)/.gg/history"
- icolor cyan start="<" end=">"
- icolor green ",(\\.|[^\"])*,"
- color yellow "chatrecv"
- color cyan "chatsend"
- color brightwhite "[0-9]"
- #####################################################################################################################
- ## others (C)ryszardzonk
- ##include "/usr/share/nano/others.nanorc"
- syntax "makefile" "(m|M)akefile$" "\.mak$"
- icolor yellow start="^[[:space:]]*[.0-9A-Z_]" end="\=[[:space:]]|\:|\:\:|\/"
- color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include"
- icolor cyan start="\{" end="\}"
- icolor cyan start="\(" end="\)"
- color brightyellow "\$"
- color green "#.*$"
- syntax "infile" ".in$" ".am$"
- icolor brightgreen start="\{" end="\}"
- color magenta "(if[[:space:]]|endif|else)"
- color yellow "^[[:space:]]*[.0-9A-Z_](\\.|[^\"])*(\=|\:)"
- color cyan "\((\\.|[^\"])*\)"
- color cyan "@(\\.|[^\"])*@"
- color brightblack "(\-[.a-z]*|\HAVE[.a-zA-Z_]*)"
- color yellow "\/"
- color brightblue ""(\\.|[^\"])*""
- color brightyellow "(\$|dnl.*$)"
- color green "#.*$"
- syntax "spec" ".spec$"
- color brightwhite "[0-9]"
- color cyan "stub"
- color yellow "pascal|stdcall|varargs|cdecl"
- color brightyellow "\((\\.|[^\"])*\)"
- color brightgreen "\@"
- color green "#.*$"
- syntax "configurelog" "config.log$"
- color cyan "(\:.*$|\=.*$)"
- color yellow ""(\\.|[^\"])*""
- color magenta "[.0-9A-Z_a-z]*:"
- color yellow "[.A-Z_a-z]*:[0-9]*:"
- color cyan start="\/\*" end="\*\/"
- color brightgreen "[[:space:]]yes"
- color brightred "[[:space:]]no"
- color green "#.*$"
- color brightgreen "\|.*$"
- syntax "texi" ".texi$"
- color brightcyan "\((\\.|[^\"])*\)"
- color yellow "(\{|\})"
- color brightblue "\$"
- color brightblack "\[(\\.|[^\"])*\]"
- color brightyellow "@[.a-zA-Z_]*"
- color cyan "^[[:space:]]*[.a-zA-Z_]*\:"
- color brightred "@c[.a-zA-Z_]*"
- color green "#.*$"
- syntax "desktop" "\.desktop$"
- color brightblue "\[(\\.|[^\"])*\]"
- color yellow "=.*$"
- color brightgreen "\="
- syntax "lua" "\.lua$"
- color brightwhite "[0-9]"
- color cyan "local.*$"
- color brightblack "\{|\}"
- color brightgreen "\="
- color red "\[|\]"
- color yellow "\"(\\.|[^\"])*\""
- color green "\-\-.*$"
- syntax "m3u" "\.m3u$"
- color green "#.*$"
- color brightgreen "http.*$"
- color yellow "\/"
- color cyan "[.0-9a-zA-Z_-]*\.mp3"
- syntax "bat" "\.bat$"
- color yellow "%(\\.|[^\"])*%"
- color brightyellow "set[[:space:]]"
- color brightgreen "\="
- color green "REM.*$"
- syntax "authors" "AUTHORS$"
- color brightgreen "((T|t)ranslators|(D|d)ocumenters|(A|a)uthors|(C|c)ontributors)"
- color brightyellow "<(\\.|[^\"])*>"
- color yellow "\@"
- color cyan "\*.*$"
- color brightcyan "\:"
- color brightblue "\((\\.|[^\"])*\)"
- color green "#.*$"
- syntax "kconfig" "Kconfig$" "Kconfig.(cpu|debug)$"
- color brightyellow "(<(\\.|[^\"])*>|\!)"
- color brightyellow "\((\\.|[^\"])*\)"
- color blue "source.*$"
- color brightgreen "(ult[[:space:]]y|\"(\\.|[^\"])*\")"
- color brightblue "ult[[:space:]]m"
- color brightred "ult[[:space:]]n"
- color magenta "default"
- color cyan "config.*$"
- color yellow "config|menu|(main|end)menu|choice|endchoice"
- color brightcyan "(^[[:space:]](bool|def_bool|tristate|depends[[:space:]]on|select|prompt|range|help|string|int|hex))"
- color brightmagenta "(\||\&)"
- color brightred "\"off\""
- color green "#.*$"
- syntax "la_file" "\.la$"
- icolor yellow "^[[:space:]]*[.0-9A-Z_]*="
- color white "\="
- color brightgreen "yes"
- color brightred "no"
- color brightwhite "[0-9]"
- color brightyellow "'(\\.|[^\"])*'"
- color green "#.*$"
- #####################################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement