Hi,

Please find attached a patch that improves Clean syntax highlighting. The 
updated clean.vim is also included.


- Jurriƫn

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: clean.vim
Description: Binary data

diff -r 92c9748e0ccb runtime/syntax/clean.vim
--- a/runtime/syntax/clean.vim	Sun Oct 06 17:46:56 2013 +0200
+++ b/runtime/syntax/clean.vim	Tue Oct 15 13:34:21 2013 +0200
@@ -2,7 +2,7 @@
 " Language:		Clean
 " Author:		Pieter van Engelen <[email protected]>
 " Co-Author:	Arthur van Leeuwen <[email protected]>
-" Last Change:	2013 Jun 19 by Jurri?n Stutterheim
+" Last Change:	2013 Oct 15 by Jurri?n Stutterheim
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -31,11 +31,10 @@
 
 " To do some Denotation Highlighting
 syn keyword cleanBoolDenot True False
-syn region  cleanStringDenot start=+"+ end=+"+
-syn match cleanCharDenot "'.'"
-syn match cleanCharsDenot "'[^'\\]*\(\\.[^'\\]\)*'" contained
-syn match cleanIntegerDenot "[+-~]\=\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>"
-syn match cleanRealDenot "[+-~]\=\<\d\+\.\d+\(E[+-~]\=\d+\)\="
+syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display
+syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display
+syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display
+syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display
 
 " To highlight the use of lists, tuples and arrays
 syn region cleanList start="\[" end="\]" contains=ALL
@@ -44,11 +43,13 @@
 syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
 
 " To do some Comment Highlighting
-syn region cleanComment start="/\*"  end="\*/" contains=cleanComment
-syn match cleanComment "//.*"
+syn region cleanComment start="/\*"  end="\*/" contains=cleanComment,cleanTodo fold
+syn region cleanComment start="//.*" end="$" display contains=cleanComment,cleanTodo
+syn keyword cleanTodo TODO FIXME XXX contained
 
-" Now for some useful typedefinitionrecognition
-syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)[ \t]*\(infix[lr]\=\)\=[ \t]*\d\=[ \t]*::.*->.*" contains=cleanSpecial
+" Now for some useful type definition recognition
+syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword
+
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
@@ -64,7 +65,6 @@
    " Comments
    HiLink cleanComment      Comment
    " Constants and denotations
-   HiLink cleanCharsDenot   String
    HiLink cleanStringDenot  String
    HiLink cleanCharDenot    Character
    HiLink cleanIntegerDenot Number
@@ -91,6 +91,7 @@
    HiLink cleanTuple		Special
    " Error
    " Todo
+   HiLink cleanTodo         Todo
 
   delcommand HiLink
 endif
@@ -100,3 +101,4 @@
 let &cpo = s:cpo_save
 unlet s:cpo_save
 " vim: ts=4
+

Raspunde prin e-mail lui