Add regexes for comments and trailing whitespace for man pages, and

reminders for Python, and trim some trailing spaces from Fortran.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg 2014-05-12 18:10:08 +00:00
parent d17b4804ec
commit 4e62842f82
4 changed files with 24 additions and 16 deletions

View File

@ -15,6 +15,8 @@
upon exit also free the regexes for libmagic results and headerlines.
* doc/syntax/python.nanorc: Improve the multiline regexes, make the
one with single quotes work again, and add some comments.
* doc/syntax/{man,python,fortran}.nanorc: Add regexes for comments,
trailing whitespace and reminders, and trim some trailing spaces.
2014-05-10 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_color_names): Redefine false and true to

View File

@ -2,7 +2,6 @@
syntax "fortran" "\.(f|f90|f95)$"
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
color red "\<[0-9]+\>"
icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
@ -33,9 +32,8 @@ icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
## String highlighting.
# Strings.
icolor yellow "<[^= ]*>" ""(\\.|[^"])*""
## Comment highlighting
# Comments.
icolor blue "!.*"

View File

@ -8,3 +8,7 @@ color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*$"
color brightblue "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "\.([LP]?P)$"
color magenta "\\f[BIPR]"
color yellow "\.(br|DT|RS|RE|PD)"
# Comments.
color cyan "\.?\\\".*$"
# Trailing whitespace.
color ,green "[[:space:]]+$"

View File

@ -7,14 +7,18 @@ header "^#!.*/python[-0-9._]*"
icolor brightblue "def [0-9A-Z_]+"
# Keywords.
color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
# Strings.
color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
# Multiline strings.
color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(])\"\"\""
color brightgreen start="'''([^'),]|$)" end="(^|[^(])'''"
# Comments.
color brightred "(^|[[:blank:]])#.*$"
# Reminders.
color ,yellow "(FIXME|TODO|XXX)"
# Trailing whitespace.
color ,green "[[:space:]]+$"