mirror of
https://github.com/scopatz/nanorc
synced 2024-12-23 22:14:52 +01:00
Rename syntax definitions
Duplicate syntax definition names may cause problems. Since nano comes with predefined all-lowercase syntax definitions, we use uppercase letters everywhere to reduce the risk of future conflicts
This commit is contained in:
parent
09236699e7
commit
bba53c3940
|
@ -1,5 +1,5 @@
|
|||
# Apache files
|
||||
syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*|\.htaccess"
|
||||
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)"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
## /usr/share/nano/arduino.nanorc
|
||||
## ...
|
||||
|
||||
syntax "ino" "\.?ino$"
|
||||
syntax "INO" "\.?ino$"
|
||||
|
||||
##
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "asciidoc" "\.(asc|asciidoc|adoc)$"
|
||||
syntax "AsciiDoc" "\.(asc|asciidoc|adoc)$"
|
||||
|
||||
# main header
|
||||
color red "^====+$"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for assembler.
|
||||
##
|
||||
syntax "asm" "\.(S|s|asm)$"
|
||||
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)"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "awk" "\.awk$"
|
||||
syntax "AWK" "\.awk$"
|
||||
header "^#!.*bin/(env +)?awk( |$)"
|
||||
|
||||
color brightyellow "\$[A-Za-z0-9_!@#$*?-]+"
|
||||
|
|
2
c.nanorc
2
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?$" "\.(def)$"
|
||||
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\>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## CMake syntax highlighter for GNU Nano
|
||||
##
|
||||
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"
|
||||
syntax "CMake" "(CMakeLists\.txt|\.cmake)$"
|
||||
|
||||
icolor green "^[[:space:]]*[A-Z0-9_]+"
|
||||
icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "coffeescript" "\.coffee$"
|
||||
syntax "CoffeeScript" "\.coffee$"
|
||||
header "^#!.*/(env +)?coffee"
|
||||
|
||||
color red "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "colortest" "ColorTest$"
|
||||
syntax "colorTest" "ColorTest$"
|
||||
|
||||
color black "\<PLAIN\>"
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
## Here is an example for nanorc files.
|
||||
##
|
||||
syntax "conf" "\.c[o]?nf$"
|
||||
syntax "Conf" "\.c[o]?nf$"
|
||||
## Possible errors and parameters
|
||||
## Strings
|
||||
icolor white ""(\\.|[^"])*""
|
||||
## Comments
|
||||
icolor brightblue "^[[:space:]]*#.*$"
|
||||
icolor cyan "^[[:space:]]*##.*$"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## Syntax highlighting for conkyrc files.
|
||||
##
|
||||
##
|
||||
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
||||
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)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "c#" "\.cs$"
|
||||
syntax "C#" "\.cs$"
|
||||
|
||||
# Class
|
||||
color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Here is an example for css files.
|
||||
##
|
||||
|
||||
syntax "css" "\.(css|scss)$"
|
||||
syntax "CSS" "\.(css|scss)$"
|
||||
color brightred "."
|
||||
color brightyellow start="\{" end="\}"
|
||||
color brightwhite start=":" end="[;^\{]"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Cython nanorc, based off of Python nanorc.
|
||||
##
|
||||
syntax "cython" "\.pyx$" "\.pxd$" "\.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_]+\(.*\):"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "dot" "\.(dot|gv)$"
|
||||
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)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "email"
|
||||
syntax "Email"
|
||||
|
||||
color magenta "^>([^>].*|$)"
|
||||
color blue "^>>([^>].*|$)"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
##
|
||||
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
|
||||
|
||||
syntax "erb" "\.erb$" "\.rhtml$"
|
||||
syntax "ERB" "\.erb$" "\.rhtml$"
|
||||
color blue start="<" end=">"
|
||||
color white start="<%" end="%>"
|
||||
color red "&[^;[[:space:]]]*;"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Fish shell scripts.
|
||||
##
|
||||
syntax "fish" "\.fish$"
|
||||
syntax "Fish" "\.fish$"
|
||||
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 "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Fortran 90/95
|
||||
|
||||
syntax "fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
|
||||
syntax "Fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
|
||||
|
||||
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
|
||||
color red "\<[0-9]+\>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for ebuilds/eclasses
|
||||
##
|
||||
syntax "ebuild" "\.e(build|class)$"
|
||||
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
|
||||
|
@ -31,7 +31,7 @@ color ,green "[[:space:]]+$"
|
|||
|
||||
## Here is an example for Portage control files
|
||||
##
|
||||
syntax "/etc/portage" "\.(keywords|mask|unmask|use)$"
|
||||
syntax "etc-portage" "\.(keywords|mask|unmask|use)$"
|
||||
## Base text:
|
||||
color green "^.+$"
|
||||
## Use flags:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "gitconfig" "git(config|modules)$|\.git/config$"
|
||||
syntax "git-config" "git(config|modules)$|\.git/config$"
|
||||
|
||||
color brightcyan "\<(true|false)\>"
|
||||
color cyan "^[[:space:]]*[^=]*="
|
||||
|
@ -16,7 +16,7 @@ color ,red " +"
|
|||
# A nano configuration file to enable syntax highlighting of some Git specific
|
||||
# files with the GNU nano text editor (http://www.nano-editor.org)
|
||||
#
|
||||
syntax "git commit/tag messages" "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||
syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||
|
||||
# Commit message
|
||||
color yellow ".*"
|
||||
|
@ -50,7 +50,7 @@ color ,red "[[:space:]]+$"
|
|||
|
||||
|
||||
# This syntax format is used for interactive rebasing
|
||||
syntax "git rebase todo" "git-rebase-todo"
|
||||
syntax "git-rebase-todo" "git-rebase-todo"
|
||||
|
||||
# Default
|
||||
color yellow ".*"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"
|
||||
syntax "GLSL" "\.(frag|vert|fp|vp|glsl)$"
|
||||
|
||||
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)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "go" "\.go$"
|
||||
syntax "GO" "\.go$"
|
||||
|
||||
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||
color brightblue "\<(append|cap|close|complex|copy|delete|imag|len)\>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for groff.
|
||||
##
|
||||
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
|
||||
syntax "Groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
|
||||
## The argument of .ds or .nr
|
||||
color cyan "^\.(ds|nr) [^[[:space:]]]*"
|
||||
## Single character escapes
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "haml" "\.haml$"
|
||||
syntax "Haml" "\.haml$"
|
||||
|
||||
color cyan "-|="
|
||||
color white "->|=>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "haskell" "\.hs$"
|
||||
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)[ ]"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is a short improved example for HTML.
|
||||
##
|
||||
syntax "html" "\.htm[l]?$"
|
||||
syntax "HTML" "\.htm[l]?$"
|
||||
color brightblue start="<" end=">"
|
||||
color red "&[^;[[:space:]]]*;"
|
||||
color yellow ""[^"]*"|qq\|.*\|"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "ini" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
|
||||
syntax "INI" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
|
||||
header "^\[[A-Za-z]+\]$"
|
||||
|
||||
color brightcyan "\<(true|false)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "inputrc" "inputrc$"
|
||||
syntax "Inputrc" "inputrc$"
|
||||
|
||||
color red "\<(off|none)\>"
|
||||
color green "\<on\>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Java.
|
||||
##
|
||||
syntax "java" "\.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)\>"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Old version
|
||||
|
||||
#syntax "jsfiles" "(\.|/|)js$"
|
||||
#syntax "JavaScript" "(\.|/|)js$"
|
||||
#color green "//.*$" start="\/\*" end="\*\/"
|
||||
#color blue "'(\\.|[^'])*'"
|
||||
#color red ""(\\.|[^\"])*""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "json" "\.json$"
|
||||
syntax "JSON" "\.json$"
|
||||
header "^\{$"
|
||||
|
||||
color blue "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "keymap" "\.(k|key)?map$|Xmodmap$"
|
||||
syntax "Keymap" "\.(k|key)?map$|Xmodmap$"
|
||||
|
||||
color cyan "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>"
|
||||
color cyan "\<(control|alt|shift)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "ledger" "(^|\.|/)ledger|ldgr|beancount|bnct$"
|
||||
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}"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"
|
||||
syntax "Lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"
|
||||
|
||||
color brightblue "\([a-z-]+"
|
||||
color red "\(([-+*/<>]|<=|>=)|'"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
# Automatically use for '.lua' files
|
||||
syntax "lua" ".*\.lua$"
|
||||
syntax "Lua" ".*\.lua$"
|
||||
|
||||
# General
|
||||
color brightwhite ".+"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "makefile" "([Mm]akefile|\.ma?k)$"
|
||||
syntax "Makefile" "([Mm]akefile|\.ma?k)$"
|
||||
header "^#!.*/(env +)?[bg]?make( |$)"
|
||||
|
||||
color cyan "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for manpages.
|
||||
##
|
||||
syntax "man" "\.[1-9]x?$"
|
||||
syntax "Man" "\.[1-9]x?$"
|
||||
color green "\.(S|T)H.*$"
|
||||
color brightgreen "\.(S|T)H" "\.TP"
|
||||
color brightred "\.(BR?|I[PR]?).*$"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "markdown" "\.(md|mkd|mkdn|markdown)$"
|
||||
syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
|
||||
|
||||
# Tables (Github extension)
|
||||
color cyan ".*[ :]\|[ :].*"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "mpdconf" "mpd\.conf$"
|
||||
syntax "MPD" "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)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## Here is an example for quoted emails (under e.g. mutt).
|
||||
##
|
||||
syntax "mutt"
|
||||
syntax "Mutt"
|
||||
color green "^>.*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for nanorc files.
|
||||
##
|
||||
syntax "nanorc" "\.?nanorc$"
|
||||
syntax "Nanorc" "\.?nanorc$"
|
||||
## Possible errors and parameters
|
||||
icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
|
||||
## Keywords
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "nginx" "nginx.*\.conf$" "\.nginx$"
|
||||
syntax "Nginx" "nginx.*\.conf$" "\.nginx$"
|
||||
header "^(server|upstream)[a-z ]*\{$"
|
||||
|
||||
color brightmagenta "\<(events|server|http|location|upstream)[[:space:]]*\{"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "ocaml" "\.mli?$"
|
||||
syntax "OCaml" "\.mli?$"
|
||||
#uid
|
||||
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
||||
#declarations
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for patch files.
|
||||
##
|
||||
syntax "patch" "\.(patch|diff)$"
|
||||
syntax "Patch" "\.(patch|diff)$"
|
||||
color brightgreen "^\+.*"
|
||||
color green "^\+\+\+.*"
|
||||
color brightblue "^ .*"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "peg" "\.l?peg$"
|
||||
syntax "PEG" "\.l?peg$"
|
||||
|
||||
color cyan "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-"
|
||||
color blue "\^[+-]?[0-9]+"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Perl.
|
||||
##
|
||||
syntax "perl" "\.p[lm]$"
|
||||
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)\>"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## Hybrid perl5 / perl6 syntax highlighting
|
||||
### Found in CPAN - http://cpansearch.perl.org/src/NIGE/Goo-0.09/lib/.gooskel/nanorc
|
||||
|
||||
syntax "perl" "\.p6$"
|
||||
syntax "Perl6" "\.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)\>"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## PHP Syntax Highlighting
|
||||
syntax "php" "\.php[2345s~]?$"
|
||||
syntax "PHP" "\.php[2345s~]?$"
|
||||
color white start="<\?(php|=)?" end="\?>"
|
||||
# Functions
|
||||
color brightblue "([a-zA-Z0-9_-]*)\("
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "pkg-config" "\.pc$"
|
||||
syntax "PC" "\.pc$"
|
||||
|
||||
color cyan "^(Name|Description|URL|Version|Conflicts|Cflags):"
|
||||
color cyan "^(Requires|Libs)(\.private)?:"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Arch PKGBUILD files
|
||||
##
|
||||
syntax "pkgbuild" "^.*PKGBUILD$"
|
||||
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)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "po" "\.pot?$"
|
||||
syntax "PO" "\.pot?$"
|
||||
|
||||
color cyan "\<(msgid|msgstr)\>"
|
||||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for POV-Ray.
|
||||
##
|
||||
syntax "pov" "\.(pov|POV|povray|POVRAY)$"
|
||||
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)\>"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
syntax "privoxy-config" "privoxy/config$"
|
||||
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$"
|
||||
syntax "Privoxy-action" "\.action$"
|
||||
|
||||
color brightred "[{[:space:]]\-block([[:space:]{}]|$)"
|
||||
color brightgreen "[{[:space:]]\+block([[:space:]{}]|$)"
|
||||
|
@ -17,7 +17,7 @@ color brightblack "(^|[[:space:]])#([^{].*)?$"
|
|||
color ,green "[[:space:]]+$"
|
||||
color ,red " + +| + +"
|
||||
|
||||
syntax "privoxy-filter" "\.filter$"
|
||||
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):"
|
||||
|
@ -25,4 +25,3 @@ color magenta "\\.?"
|
|||
color brightblack "(^|[[:space:]])#([^{].*)?$"
|
||||
color ,green "[[:space:]]+$"
|
||||
color ,red " + +| + +"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Nano syntax highlighting for Puppet.
|
||||
##
|
||||
syntax "puppet" "\.pp$"
|
||||
syntax "Puppet" "\.pp$"
|
||||
|
||||
#This goes first, so the normal builtins will override in some classes
|
||||
## Paramerers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Python.
|
||||
##
|
||||
syntax "python" "\.py$"
|
||||
syntax "Python" "\.py$"
|
||||
header "^#!.*/(env +)?python( |$)"
|
||||
|
||||
## built-in objects
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## For reST
|
||||
syntax "rest" "\.rest$" "\.rst$"
|
||||
syntax "RST" "\.rest$" "\.rst$"
|
||||
# italics
|
||||
#color magenta "\*[^*]\*"
|
||||
# bold
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "rpmspec" "\.spec$" "\.rpmspec$"
|
||||
syntax "Rpmspec" "\.spec$" "\.rpmspec$"
|
||||
|
||||
color cyan "\<(Icon|ExclusiveOs|ExcludeOs):"
|
||||
color cyan "\<(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Ruby.
|
||||
##
|
||||
syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
|
||||
syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
|
||||
header "^#!.*/(env +)?ruby( |$)"
|
||||
|
||||
## Asciibetical list of reserved words
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright 2015 The Rust Project Developers.
|
||||
#
|
||||
# NOTE: Rules are applied in order: later rules re-colorize matching text.
|
||||
syntax "rust" "\.rs"
|
||||
syntax "Rust" "\.rs"
|
||||
|
||||
# function definition
|
||||
color magenta "fn [a-z0-9_]+"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is an example for Scala.
|
||||
##
|
||||
syntax "scala" "\.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|sealed)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "sed" "\.sed$"
|
||||
syntax "SED" "\.sed$"
|
||||
header "^#!.*bin/(env +)?sed( |$)"
|
||||
|
||||
color red "[|^$.*+]"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 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"
|
||||
syntax "SH" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_profile" "bash_profile"
|
||||
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)\>"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## SaltStack files (*.sls)
|
||||
##
|
||||
|
||||
syntax "salt" "\.sls$"
|
||||
syntax "Salt" "\.sls$"
|
||||
|
||||
# Anything ending in a colon (:), including things that start with a dash (-)
|
||||
color blue "^[^ -].*:$"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "sql" "\.sql$" "sqliterc$"
|
||||
syntax "SQL" "\.sql$" "sqliterc$"
|
||||
|
||||
icolor cyan "\<(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\>"
|
||||
icolor cyan "\<(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\>"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "systemd" "\.(service|socket)$"
|
||||
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)="
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "tcl" "\.tcl$"
|
||||
syntax "TCL" "\.tcl$"
|
||||
header "^#!.*/(env +)?tclsh( |$)"
|
||||
|
||||
## Standard Tcl [info commands]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Here is a short example for TeX files.
|
||||
##
|
||||
syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$"
|
||||
syntax "TeX" "\.tex$" "bib" "\.bib$" "cls" "\.cls$"
|
||||
color yellow "\$[^$]*\$"
|
||||
icolor green "\\.|\\[A-Z]*"
|
||||
color magenta "[{}]"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "vala" "\.vala$"
|
||||
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:]]*[()]"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "vi" "(^|/|\.)(ex|vim)rc$|\.vim"
|
||||
syntax "VI" "(^|/|\.)(ex|vim)rc$|\.vim"
|
||||
|
||||
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
||||
color cyan "\<([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\>"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Here is an example for xml files.
|
||||
##
|
||||
|
||||
syntax "ml" ".*\.([jrs]?html?|xml|sgml?|rng)$"
|
||||
syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng)$"
|
||||
color white "^.+$"
|
||||
color green start="<" end=">"
|
||||
color cyan "<[^> ]+"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "xresources" "X(defaults|resources)$"
|
||||
syntax "Xresources" "X(defaults|resources)$"
|
||||
|
||||
color green "^[[:alnum:]]+\*"
|
||||
color brightyellow "\*[[:alnum:]]+\:"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "yaml" "\.ya?ml$"
|
||||
syntax "YAML" "\.ya?ml$"
|
||||
header "^---" "%YAML"
|
||||
|
||||
color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
syntax "yum" "\.repo$|yum.*\.conf$"
|
||||
syntax "YUM" "\.repo$|yum.*\.conf$"
|
||||
|
||||
color cyan "^[[:space:]]*[^=]*="
|
||||
color brightmagenta "^[[:space:]]*\[.*\]$"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc)
|
||||
syntax "zsh" "\.zsh$" "\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$"
|
||||
syntax "ZSH" "\.zsh$" "\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$"
|
||||
header "^#!.*/(env +)?zsh( |$)"
|
||||
|
||||
## Numbers
|
||||
|
|
Loading…
Reference in New Issue
Block a user