]> git.wh0rd.org Git - nano.git/commitdiff
Add regexes for comments and trailing whitespace for man pages, and
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 12 May 2014 18:10:08 +0000 (18:10 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Mon, 12 May 2014 18:10:08 +0000 (18:10 +0000)
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

ChangeLog
doc/syntax/fortran.nanorc
doc/syntax/man.nanorc
doc/syntax/python.nanorc

index b25f967475e0fae2d113fee99afbee719e54f39d..20b450e744ec893fd696e64453291cc9f2524ff1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 575dd31a437c5e882af08a30f3e10f126eb2bf20..45873ac753438b3d5c9e30dc20b12304d1a491d7 100644 (file)
@@ -1,9 +1,8 @@
 ## Here is an example for Fortran 90/95.
 
-syntax "fortran" "\.(f|f90|f95)$" 
+syntax "fortran" "\.(f|f90|f95)$"
 
-#color red "\<[A-Z_]a[0-9A-Z_]+\>" 
-color red "\<[0-9]+\>" 
+color red "\<[0-9]+\>"
 
 icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
 icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
@@ -15,16 +14,16 @@ icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
 icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
 icolor green "\<(selected_real_kind|subroutine|status)\>"
 
-icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>" 
-icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>" 
-icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>" 
-icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>" 
-icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>" 
-icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>" 
-icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>" 
-icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>" 
-icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>" 
-icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>" 
+icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
+icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
+icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
+icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
+icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
+icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
+icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
+icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
+icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
+icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
 icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
 
 icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
@@ -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 "!.*"
-
index e96bb6729d0eeb47115bca31f690fdbae6bb6185..cdee7a2de1c5038ca65460ed305c3e08316ebc3f 100644 (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:]]+$"
index de9a5ac5b1dab0689758388f34484f42ceddba6b..423ce245447d014b79ba6ea25d1d653230766b7f 100644 (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:]]+$"