[svn] r6265 - trunk/tools/asciidoc-vim
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Apr 14 19:05:14 CEST 2008
Author: dag
Date: 2008-04-14 18:05:14 +0100 (Mon, 14 Apr 2008)
New Revision: 6265
Modified:
trunk/tools/asciidoc-vim/asciidoc.vim
Log:
Improvement to numbering, quoting and dashes. (Christian Siefkes)
Modified: trunk/tools/asciidoc-vim/asciidoc.vim
===================================================================
--- trunk/tools/asciidoc-vim/asciidoc.vim 2008-04-14 16:57:15 UTC (rev 6264)
+++ trunk/tools/asciidoc-vim/asciidoc.vim 2008-04-14 17:05:14 UTC (rev 6265)
@@ -23,22 +23,22 @@
" As a damage control measure quoted patterns always terminate at a blank
" line (see 'Limitations' above).
-syn region asciidocMonospace start="\(^\|[ \t(\[.,]\)\@<=+\([)]\)\@!" end="\(+\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
-syn region asciidocMonospace start="\(^\|[ \t(\[.,]\)\@<=`\([)]\)\@!" end="\(`\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
+syn region asciidocMonospace start="\(^\|[ \t(\[.,\-]\)\@<=+\([)]\)\@!" end="\(+\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
+syn region asciidocMonospace start="\(^\|[ \t(\[.,\-]\)\@<=`\([)]\)\@!" end="\(`\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
syn region asciidocMonospace start="++\S" end="\(++\|^$\)"
"syn match asciidocMonospace "+[^+]\++"
"syn match asciidocMonospace "`[^`]\+`"
-syn region asciidocEmphasize start="\(^\|[ \t(\[.,]\)\@<=_\([)]\)\@!" end="\(_\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
-syn region asciidocEmphasize start="\(^\|[ \t(\[.,]\)\@<='\([)]\)\@!" end="\('\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
+syn region asciidocEmphasize start="\(^\|[ \t(\[.,\-]\)\@<=_\([)]\)\@!" end="\(_\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
+syn region asciidocEmphasize start="\(^\|[ \t(\[.,\-]\)\@<='\([)]\)\@!" end="\('\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
syn region asciidocEmphasize start="__\S" end="\(__\|^$\)"
"syn match asciidocEmphasize "_[^_]\+_"
"FIXME: Emphasizing using single quotes is prone to failure, so we disable it.
"syn region asciidocEmphasize start="\'[^\']" end="\'\([^\']\|$\)"
"syn match asciidocEmphasize "'[^']\+'"
-syn region asciidocBold start="\(^\|[ \t(\[.,]\)\@<=\*\([ )]\)\@!" end="\(\*\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
+syn region asciidocBold start="\(^\|[ \t(\[.,\-]\)\@<=\*\([ )]\)\@!" end="\(\*\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
syn region asciidocBold start="\*\*\S" end="\(\*\*\|^$\)"
"syn match asciidocBold "\*[^*]\+\*"
-syn region asciidocQuoted start="\(^\|[ \t(\[.,]\)\@<=``\([ )]\)\@!" end="\(''\([ \t)\],.?!;:]\|$\)\@=\|^$\)"
+syn region asciidocQuoted start="\(^\|[ \t(\[.,\-]\)\@<=``\([ )]\)\@!" end="\(''\([ \t)\],.?!;:\-]\|$\)\@=\|^$\)"
syn region asciidocSubscript start="\~\S" end="\(\~\|^$\)"
syn region asciidocSuperscript start="\^\S" end="\(\^\|^$\)"
"syn match asciidocPassthrough "\$\$.\+\$\$"
@@ -245,8 +245,15 @@
"
"set textwidth=78 formatoptions=tcqn autoindent
set formatoptions=tcqn autoindent
+"Prevent simple numbers at the start of lines to be confused with list items:
+set formatlistpat=^\\s*\\d\\+\\.\\s\\+
set comments=s1:/*,ex:*/,://,b:#,:%,fb:-,fb:*,fb:.,fb:+,fb:>
+"Typing "" inserts a pair of quotes (``'') and places the cursor between
+"them. Works in both insert and command mode (switching to insert mode):
+imap "" ``''<ESC>hi
+map "" i""
+
nnoremap Q gq}
"eof
More information about the svn-commits
mailing list