r483 - trunk/vim/patches
Pierre Habouzit
madcoder at costa.debian.org
Thu Jan 26 11:26:51 UTC 2006
Author: madcoder
Date: 2006-01-26 11:26:48 +0000 (Thu, 26 Jan 2006)
New Revision: 483
Modified:
trunk/vim/patches/155_rst.vim.diff
Log:
use [[:alnum:] ... instead of \w\|[... which is easier to read
Modified: trunk/vim/patches/155_rst.vim.diff
===================================================================
--- trunk/vim/patches/155_rst.vim.diff 2006-01-26 10:25:20 UTC (rev 482)
+++ trunk/vim/patches/155_rst.vim.diff 2006-01-26 11:26:48 UTC (rev 483)
@@ -7,7 +7,7 @@
" comments
-syn region rstComment matchgroup=rstComment start="^\.\.\%( \%([a-z0-9_.-]\+::\)\@!\|$\)" end="^\s\@!" contains=rstTodo
-+syn region rstComment matchgroup=rstComment start="^\.\.\%( \%(\(\w\|[\'.-]\)\+::\)\@!\|$\)" end="^\s\@!" contains=rstTodo
++syn region rstComment matchgroup=rstComment start="^\.\.\%( \%([[:alnum:]\'.-]\+::\)\@!\|$\)" end="^\s\@!" contains=rstTodo
syn cluster rstCruft contains=rstFootnoteLabel,rstCitationLabel,rstSubstitutionLabel,rstInline,rstHyperlinks,rstInternalTarget
@@ -17,24 +17,24 @@
" footnotes
-syn region rstFootnote matchgroup=rstDirective start="^\.\. \[\%([#*]\|[0-9]\+\|#[a-z0-9_.-]\+\)\]\s" end="^\s\@!" contains=@rstCruft
-syn match rstFootnoteLabel "\[\%([#*]\|[0-9]\+\|#[a-z0-9_.-]\+\)\]_"
-+syn region rstFootnote matchgroup=rstDirective start="^\.\. \[\%([#*]\|[0-9]\+\|#\(\w\|[\'.-]\)\+\)\]\s" end="^\s\@!" contains=@rstCruft
-+syn match rstFootnoteLabel "\[\%([#*]\|[0-9]\+\|#\(\w\|[\'.-]\)\+\)\]_"
++syn region rstFootnote matchgroup=rstDirective start="^\.\. \[\%([#*]\|[0-9]\+\|#[[:alnum:]\'.-]\+\)\]\s" end="^\s\@!" contains=@rstCruft
++syn match rstFootnoteLabel "\[\%([#*]\|[0-9]\+\|#[[:alnum:]\'.-]\+\)\]_"
" citations
-syn region rstCitation matchgroup=rstDirective start="^\.\. \[[a-z0-9_.-]\+\]\s" end="^\s\@!" contains=@rstCruft
-syn match rstCitationLabel "\[[a-z0-9_.-]\+\]_"
-+syn region rstCitation matchgroup=rstDirective start="^\.\. \[\(\w\|[\'.-]\)\+\]\s" end="^\s\@!" contains=@rstCruft
-+syn match rstCitationLabel "\[\(\w\|[\'.-]\)\+\]_"
++syn region rstCitation matchgroup=rstDirective start="^\.\. \[[[:alnum:]\'.-]\+\]\s" end="^\s\@!" contains=@rstCruft
++syn match rstCitationLabel "\[[[:alnum:]\'.-]\+\]_"
" directives
-syn region rstDirectiveBody matchgroup=rstDirective start="^\.\. [a-z0-9_.-]\+::" end="^\s\@!"
-+syn region rstDirectiveBody matchgroup=rstDirective start="^\.\. \(\w\|[\'.-]\)\+::" end="^\s\@!"
++syn region rstDirectiveBody matchgroup=rstDirective start="^\.\. [[:alnum:]\'.-]\+::" end="^\s\@!"
" substitutions
-syn region rstSubstitution matchgroup=rstDirective start="^\.\. |[a-z0-9_.-]|\s[a-z0-9_.-]\+::\s" end="^\s\@!" contains=@rstCruft
-syn match rstSubstitutionLabel "|[a-z0-9_.-]|"
-+syn region rstSubstitution matchgroup=rstDirective start="^\.\. |\(\w\|[\'.-]\)|\s\(\w\|[\'.-]\)\+::\s" end="^\s\@!" contains=@rstCruft
-+syn match rstSubstitutionLabel "|\(\w\|[\'.-]\)|"
++syn region rstSubstitution matchgroup=rstDirective start="^\.\. |[[:alnum:]\'.-]|\s[[:alnum:]\'.-]\+::\s" end="^\s\@!" contains=@rstCruft
++syn match rstSubstitutionLabel "|[[:alnum:]\'.-]|"
" inline markup
syn match rstInline "\*\{1,2}\S\%([^*]*\S\)\=\*\{1,2}"
@@ -42,7 +42,7 @@
" hyperlinks
-syn region rstHyperlinks matchgroup=RstDirective start="^\.\. _[a-z0-9_. -]\+:\s" end="^\s\@!" contains=@rstCruft
-+syn region rstHyperlinks matchgroup=RstDirective start="^\.\. _\(\w\|[\'. -]\)\+:\s" end="^\s\@!" contains=@rstCruft
++syn region rstHyperlinks matchgroup=RstDirective start="^\.\. _[[:alnum:]\'. -]\+:\s" end="^\s\@!" contains=@rstCruft
-syn match rstHyperlinksLabel "`\S\%([^`]*\S\)\=`__\=\>"
+syn match rstHyperlinksLabel "`\S\%(\([^`]\|\n\)*\S\)\=`__\=\>"
More information about the pkg-vim-maintainers
mailing list