Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Documentation improvements.

  • Loading branch information...
commit 8789e687c71cef6a5c14603d5aeb398b11e7dd51 1 parent dae941b
Dag Wieers authored
21  README.txt
@@ -2,7 +2,7 @@
2 2
 Dag Wieers <dag@wieers.com>
3 3
 
4 4
 
5  
-== Difference with 'official' syntax file
  5
+== Difference with upstream syntax file
6 6
 While this syntax file was independently developed, it was later merged
7 7
 with improved regular expressions taken from the upstream syntax file.
8 8
 
@@ -13,6 +13,10 @@ with improved regular expressions taken from the upstream syntax file.
13 13
  - Links and email addresses are underlined
14 14
  - Admonitions look nicer
15 15
 
  16
+The reason why this syntax file looks better is because it does not stick
  17
+to the provided styles (that mostly maps to programming languages and
  18
+therefor is pretty limited).
  19
+
16 20
 
17 21
 == Installing the asciidoc.vim file
18 22
 Put the _asciidoc.vim_ syntax file in your home directory at
@@ -33,6 +37,9 @@ the end of your AsciiDoc files:
33 37
 // vim: set syntax=asciidoc:
34 38
 ----
35 39
 
  40
+Or install the +asciidoc_filetype.vim+ filetype detection script in
  41
+_~/.vim/ftdetect/asciidoc_filetype.vim_.
  42
+
36 43
 
37 44
 == Testing VIM syntax files
38 45
 The syntax file considers 3 different environments.
@@ -54,11 +61,15 @@ There are a few quirks in the syntax files. Here is an overview:
54 61
 
55 62
 Underlining titles does not work consistently??
56 63
 
57  
-    There is no way that we can match the length of a title with the length of
58  
-    the line under it. Because of that every line preceded by text could
59  
-    ambigously be interpreted as either a title or the start of a block. Use
60  
-    the wiki-style syntax for titles. (used by this document)
  64
+There is no way that we can match the length of a title with the length of
  65
+the line under it. Because of that every line preceded by text could
  66
+ambigously be interpreted as either a title or the start of a block. Use
  67
+the wiki-style syntax for titles. (used by this document)
  68
+
  69
+Some asciidoc syntax is not implemented??
61 70
 
  71
+Yes, certain newer syntax rules have not been implemented yet, as is the case
  72
+with the upstream version.
62 73
 
63 74
 == Feedback
64 75
 If you have fixes or improvements to the syntax file, please send them to:
12  asciidoc-testcases.txt
@@ -6,6 +6,7 @@ correctly:
6 6
 
7 7
 - *bold*, --*bold*, *bold*--bla*nonbold*.
8 8
 - _emph_, --_emph_, _emph_--bla_nonemph_.
  9
+- 'emph', --'emph', 'emph'--bla_nonemph_.
9 10
 - +mono+, --+mono+, +mono+--bla+nonmono+.
10 11
 - `mono`, --`mono`, `mono`--bla`nonmono`.
11 12
 - ``quot'', --``quot'', ``quot''--bla``nonquot''.
@@ -24,6 +25,11 @@ list item should be indented:
24 25
    sit amet, consectetuer adipiscing elit.
25 26
 12. Integer numbered list item with optional numbering. Lorem ipsum dolor
26 27
     sit amet, consectetuer adipiscing elit.
  28
+xi) lower roman numbering
  29
+VI) upperroman numbering
  30
+c. loweralpha numbering
  31
+F. upperalpha numbering
  32
+
27 33
 
28 34
 But these are just numbers that happen to occur at the start of a line and
29 35
 should not trigger indentation:
@@ -34,6 +40,12 @@ primis. Sit munere ponderum dignissim et. Minim luptatum et vel. Vivamus
34 40
 12.5. mi eu lacus. Donec eget arcu bibendum nunc consequat lobortis. Lorem
35 41
 ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod commodo
36 42
 
  43
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod od
  44
+c. commodo velit. Qui in magna commodo, est labitur dolorum an. Est ne magna
  45
+primis. Sit munere ponderum dignissim et. Minim luptatum et vel. (Vivamus
  46
+xi) mi eu lacus. Donec eget arcu bibendum nunc consequat lobortis. Lorem
  47
+ipsum dolor sit amet, consectetuer adipiscing elit. Fusce euismod commodo
  48
+
37 49
 // Comments are taken care off as well //
38 50
 == Blocks
39 51
 Many ways to make $$blocks$$
25  asciidoc.vim
@@ -37,6 +37,7 @@ syn match asciidocURL /\\\@<!\<\(http\|https\|ftp\|file\|irc\):\/\/[^| \t]*\(\w\
37 37
 syn match asciidocEmail /[\\.:]\@<!\(\<\|<\)\w\(\w\|[.-]\)*@\(\w\|[.-]\)*\w>\?[0-9A-Za-z_]\@!/
38 38
 syn match asciidocAttributeRef /\\\@<!{\w\(\w\|-\)*\([=!@#$%?:].*\)\?}/
39 39
 
  40
+
40 41
 " As a damage control measure quoted patterns always terminate at a blank
41 42
 " line (see 'Limitations' above).
42 43
 syn match asciidocQuotedSubscript /\\\@<!\~\S\_.\{-}\(\~\|\n\s*\n\)/
@@ -114,23 +115,22 @@ syn region asciidocHLabel start=/^\s*/ end=/\(::\|;;\)\(\s\+\|\\$\)/ oneline con
114 115
 " Starts with any of the above.
115 116
 syn region asciidocList start=/^\s*\(-\|\*\{1,5}\)\s/ start=/^\s*\(\(\d\+\.\)\|\.\{1,5}\|\(\a\.\)\|\([ivxIVX]\+)\)\)\s\+/ start=/.\+\(:\{2,4}\|;;\)$/ end=/\(^[=*]\{4,}$\)\@=/ end=/\(^+\?\s*$\)\@=/ contains=asciidocList.\+,asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocCommentLine,asciidocAttributeList
116 117
 
117  
-
118 118
 "====================== OLD STUFF ============================
119 119
 
120 120
 "Sections
121  
-syn region asciidocSect0 start="^=\s\+\S" end="$" oneline
122  
-syn region asciidocSect1 start="^==\s\+\S" end="$" oneline
123  
-syn region asciidocSect2 start="^===\s\+\S" end="$" oneline
124  
-syn region asciidocSect3 start="^====\s\+\S" end="$" oneline
125  
-syn region asciidocSect4 start="^=====\s\+\S" end="$" oneline
  121
+syn region asciidocSect0 start=/^=\s\+\S/ end=/$/ oneline contains=asciidocQuoted.*,asciidocAttributeRef
  122
+syn region asciidocSect1 start=/^==\s\+\S/ end=/$/ oneline contains=asciidocQuoted.*,asciidocAttributeRef
  123
+syn region asciidocSect2 start=/^===\s\+\S/ end=/$/ oneline contains=asciidocQuoted.*,asciidocAttributeRef
  124
+syn region asciidocSect3 start=/^====\s\+\S/ end=/$/ oneline contains=asciidocQuoted.*,asciidocAttributeRef
  125
+syn region asciidocSect4 start=/^=====\s\+\S/ end=/$/ oneline contains=asciidocQuoted.*,asciidocAttributeRef
126 126
 
127 127
 "FIXME: It is impossible to distinguish underlined titles from block delimiters
128 128
 "       because we cannot calculate length in VIM syntax
129  
-syn match asciidocSect0Old "^[^. +/[].*[^.:]\n==\+$"
130  
-syn match asciidocSect1Old "^[^. +/[].*[^.:]\n--\+$"
131  
-syn match asciidocSect2Old "^[^. +/[].*[^.:]\n\~\~\+$"
132  
-syn match asciidocSect3Old "^[^. +/[].*[^.:]\n^^\+$"
133  
-syn match asciidocSect4Old "^[^. +/[].*[^.:]\n++\+$"
  129
+syn match asciidocSect0Old /^[^. +/[].*[^.:]\n==\+$/ contains=asciidocQuoted.*,asciidocAttributeRef
  130
+syn match asciidocSect1Old /^[^. +/[].*[^.:]\n--\+$/ contains=asciidocQuoted.*,asciidocAttributeRef
  131
+syn match asciidocSect2Old /^[^. +/[].*[^.:]\n\~\~\+$/ contains=asciidocQuoted.*,asciidocAttributeRef
  132
+syn match asciidocSect3Old /^[^. +/[].*[^.:]\n^^\+$/ contains=asciidocQuoted.*,asciidocAttributeRef
  133
+syn match asciidocSect4Old /^[^. +/[].*[^.:]\n++\+$/ contains=asciidocQuoted.*,asciidocAttributeRef
134 134
 
135 135
 "Others
136 136
 syn match asciidocReplacements "[\s^]\(\(C\)\|\(TM\)\|\(R\)\|--\|\.\.\.\)[\s$]"
@@ -189,7 +189,8 @@ highlight asciidocTripplePlusPassthrough term=underline ctermfg=darkmagenta guif
189 189
 highlight asciidocAttributeEntry term=standout ctermfg=darkgreen guifg=darkgreen
190 190
 highlight asciidocAttributeList term=standout ctermfg=darkgreen guifg=darkgreen
191 191
 highlight link asciidocAttributeMacro Macro
192  
-highlight asciidocAttributeRef term=standout ctermfg=darkgreen guifg=darkgreen
  192
+"highlight asciidocAttributeRef term=standout ctermfg=darkgreen cterm=bold guifg=darkgreen gui=bold
  193
+highlight asciidocAttributeRef term=standout,underline ctermfg=darkgreen cterm=bold,underline guifg=darkgreen gui=bold,underline
193 194
 
194 195
 "Lists
195 196
 highlight asciidocListBlockDelimiter term=bold ctermfg=darkcyan cterm=bold guifg=darkcyan gui=bold

0 notes on commit 8789e68

Please sign in to comment.
Something went wrong with that request. Please try again.