Comment and punctuation tweaks in the sample nanorc files.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4598 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg 2014-02-23 16:07:44 +00:00
parent 183fa5ab20
commit c4b344f733
17 changed files with 33 additions and 40 deletions

View File

@ -1,3 +1,6 @@
2014-02-23 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/*.nanorc - Comment and punctuation tweaks.
2014-02-23 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_undo, do_redo, add_undo) - Make warning
sentences in the status bar consistently end in a period.

View File

@ -26,7 +26,6 @@ color magenta "\<(mktime|strftime|systime)\>"
color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
##
## 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.

View File

@ -11,15 +11,15 @@ color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
color magenta "\<(goto|continue|break|return)\>"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""

View File

@ -1,4 +1,4 @@
## CMake syntax highlighter for GNU Nano
## Syntax highlighting for CMake files.
##
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"

View File

@ -1,4 +1,4 @@
## Here is an example for css files.
## Here is an example for CSS files.
##
syntax "css" "\.css$"
color brightred "."

View File

@ -1,6 +1,5 @@
## Here is an exmaple for apt's sources.list
## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano
## (mail@milianw.de).
## Here is an exmaple for apt's sources.list.
## (adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano)
##
syntax "apt/sources.list" "sources\.list(\.old|~)?$"
# component

View File

@ -1,4 +1,4 @@
## Here is an example for Fortran 90/95
## Here is an example for Fortran 90/95.
syntax "fortran" "\.(f|f90|f95)$"

View File

@ -1,4 +1,4 @@
## Here is an example for Gentoo ebuilds/eclasses
## Here is an example for Gentoo ebuilds/eclasses.
##
syntax "ebuild" "\.e(build|class)$"
## All the standard portage functions
@ -33,7 +33,7 @@ color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
## Trailing space is bad!
color ,green "[[:space:]]+$"
## Here is an example for Portage control files
## Here is an example for Portage control files.
##
syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$"
## Base text:

View File

@ -51,7 +51,6 @@ color red "\<([0-9]+)\>"
# Symbols
color brightmagenta "(\(|\)|\[|\]|\{|\})"
# Shebang
color brightcyan "^#!.*"
@ -61,16 +60,9 @@ color green "\-\-.*$"
# Multiline comments
color green start="\-\-\[\[" end="\]\]"
# Strings
#color green "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
# Strings
color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
# color red start="\[\[" end="\]\]"
##color red start="\[\[" end="\]\]"
# Hex literals
color red "0x[0-9a-fA-F]*"

View File

@ -1,4 +1,5 @@
# unattributed syntax highlighting example from wiki.linuxhelp.net/
## Syntax highlighting for Makefiles.
## (unattributed example from http://wiki.linuxhelp.net/)
syntax "makefile" "Makefile[^/]*$"
color red "[:=]"

View File

@ -1,4 +1,4 @@
## Here is an example for Magicpoint presentations
## Here is an example for Magicpoint presentations.
##
syntax "mgp" "\.mgp$"
header "^%include.*"

View File

@ -2,7 +2,6 @@
##
syntax "m" "\.m$"
## Stuffs
color brightwhite "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
@ -12,7 +11,7 @@ color brightgreen "\<(for|if|while|do|else|case|default|switch)\>"
color brightgreen "\<(try|throw|catch|operator|new|delete)\>"
color brightgreen "\<(goto|continue|break|return)\>"
color brightgreen "@\<(en(code|d)|i(mplementation|nterface)|selector)\>"
##
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
@ -22,14 +21,12 @@ color white ":[[:alnum:]]*"
color magenta "[[:alnum:]]*:"
color white "\[[^][:space:]]*\]"
##
## 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 brightblack "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
color brightblack "<[^= ]*>" ""(\\.|[^"])*""
color brightblue "@"(\\.|[^"])*""
##
## This string is VERY resource intensive!
## color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""

View File

@ -1,5 +1,5 @@
# OCaml sample nanorc
#
## Syntax highlighting for OCaml.
syntax "ocaml" "\.mli?$"
#uid
color red "\<[A-Z][0-9a-z_]{2,}\>"

View File

@ -1,4 +1,4 @@
## Here is an example for PHP
## Here is an example for PHP.
##
syntax "php" "\.php[2345s~]?$"
magic "PHP script text"
@ -27,5 +27,5 @@ color brightblue start="/\*" end="\*/"
#color blue start="<" end=">"
#color red "&[^;[[:space:]]]*;"
## Trailing whitespace
## trailing whitespace
color ,green "[[:space:]]+$"

View File

@ -1,6 +1,6 @@
# RPM spec files syntax highlighting
# Parts taken from kate (KDE) syntax highlighting
# Asterios Dramis
## Syntax highlighting for RPM spec files.
## Parts were taken from Kate's (KDE) syntax highlighting.
## Asterios Dramis
syntax "spec" "\.(spec$|spec\.*)"
# Main tags
color brightblue "((Icon|ExclusiveOs|ExcludeOs)[[:space:]]*:)"
@ -13,7 +13,7 @@ color brightblue "((Name|Version|Release|Url|URL)[[:space:]]*:)"
color brightblue start="^Source" end=":" start="^Patch" end=":"
# Architectures
color brightred "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
# Architectures conditionals
# Architecture conditionals
color brightred "(ifarch|ifnarch)"
# OS conditionals
color brightred "(ifos|ifnos)"

View File

@ -1,13 +1,15 @@
## Syntax highlighting for Tcl files.
syntax "tcl" "\.tcl$"
## Standard Tcl [info commands]
# Standard Tcl [info commands]:
color green "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>"
## Basic Tcl sub commands.
# Basic Tcl subcommands:
color green "\<(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\>"
color green "\<(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\>"
## Extended TclX [info commands]
# Extended TclX [info commands]:
color green "\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>"
## Syntax.
# Syntax:
color brightblue "proc[[:space:]]" "(\{|\})"
color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"

View File

@ -1,4 +1,4 @@
## Here is an example for xml files.
## Here is an example for XML files.
##
syntax "xml" "\.([jrs]html?|sgml?|xml|xslt?)$"
magic "XML.*document text"