Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version 12

* changed conc -> cole for vim 7.3's built-in conceal mode
* included some additional escape sequences
  • Loading branch information...
commit d2bb7878622e4c16203acf1c92a0f4bc7ac58003 1 parent f1317cb
cecamp authored vim-scripts committed
378  autoload/AnsiEsc.vim
... ...
@@ -1,8 +1,8 @@
1 1
 " AnsiEsc.vim: Uses syntax highlighting.  A vim 7.0 plugin!
2 2
 " Language:		Text with ansi escape sequences
3  
-" Maintainer:	Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
4  
-" Version:		11
5  
-" Date:		Jun 22, 2010
  3
+" Maintainer:	Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
  4
+" Version:		12
  5
+" Date:		Dec 13, 2010
6 6
 "
7 7
 " Usage: :AnsiEsc
8 8
 "
@@ -12,11 +12,12 @@
12 12
 " GetLatestVimScripts: 302 1 :AutoInstall: AnsiEsc.vim
13 13
 "redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
14 14
 " ---------------------------------------------------------------------
  15
+"DechoTabOn
15 16
 "  Load Once: {{{1
16 17
 if exists("g:loaded_AnsiEsc")
17 18
  finish
18 19
 endif
19  
-let g:loaded_AnsiEsc = "v11"
  20
+let g:loaded_AnsiEsc = "v12"
20 21
 if v:version < 700
21 22
  echohl WarningMsg
22 23
  echo "***warning*** this version of AnsiEsc needs vim 7.0"
@@ -28,8 +29,15 @@ set cpo&vim
28 29
 
29 30
 " ---------------------------------------------------------------------
30 31
 " AnsiEsc#AnsiEsc: toggles ansi-escape code visualization {{{2
31  
-fun! AnsiEsc#AnsiEsc()
32  
-"  call Dfunc("AnsiEsc#AnsiEsc()")
  32
+fun! AnsiEsc#AnsiEsc(rebuild)
  33
+"  call Dfunc("AnsiEsc#AnsiEsc(rebuild=".a:rebuild.")")
  34
+  if a:rebuild
  35
+"   call Decho("rebuilding AnsiEsc tables")
  36
+   call AnsiEsc#AnsiEsc(0)
  37
+   call AnsiEsc#AnsiEsc(0)
  38
+"   call Dret("AnsiEsc#AnsiEsc")
  39
+   return
  40
+  endif
33 41
   let bn= bufnr("%")
34 42
   if !exists("s:AnsiEsc_enabled_{bn}")
35 43
    let s:AnsiEsc_enabled_{bn}= 0
@@ -38,6 +46,9 @@ fun! AnsiEsc#AnsiEsc()
38 46
    " disable AnsiEsc highlighting
39 47
 "   call Decho("disable AnsiEsc highlighting: s:AnsiEsc_ft_".bn."<".s:AnsiEsc_ft_{bn}."> bn#".bn)
40 48
    if exists("g:colors_name")|let colorname= g:colors_name|endif
  49
+   if exists("s:conckeep_{bufnr('%')}")|let &l:conc= s:conckeep_{bufnr('%')}|unlet s:conckeep_{bufnr('%')}|endif
  50
+   if exists("s:colekeep_{bufnr('%')}")|let &l:cole= s:colekeep_{bufnr('%')}|unlet s:colekeep_{bufnr('%')}|endif
  51
+   if exists("s:cocukeep_{bufnr('%')}")|let &l:cocu= s:cocukeep_{bufnr('%')}|unlet s:cocukeep_{bufnr('%')}|endif
41 52
    hi! link ansiStop NONE
42 53
    syn clear
43 54
    hi  clear
@@ -50,6 +61,7 @@ fun! AnsiEsc#AnsiEsc()
50 61
     exe 'silent! unmenu '.g:DrChipTopLvlMenu.'AnsiEsc'
51 62
     exe 'menu '.g:DrChipTopLvlMenu.'AnsiEsc.Start<tab>:AnsiEsc		:AnsiEsc<cr>'
52 63
    endif
  64
+   let &l:hl= s:hlkeep_{bufnr("%")}
53 65
 "   call Dret("AnsiEsc#AnsiEsc")
54 66
    return
55 67
   else
@@ -66,108 +78,130 @@ fun! AnsiEsc#AnsiEsc()
66 78
    "  Conceal Support: {{{2
67 79
    " -----------------
68 80
    if has("conceal")
69  
-    if &conc == 0
70  
-     let &conc= 3
  81
+    if v:version < 703
  82
+     if &l:conc != 3
  83
+      let s:conckeep_{bufnr('%')}= &cole
  84
+      setlocal conc=3
  85
+"      call Decho("l:conc=".&l:conc)
  86
+     endif
  87
+    else
  88
+     if &l:cole != 3 || &l:cocu != "nv"
  89
+      let s:colekeep_{bufnr('%')}= &l:cole
  90
+      let s:cocukeep_{bufnr('%')}= &l:cocu
  91
+      setlocal cole=3 cocu=nv
  92
+"      call Decho("l:cole=".&l:cole." l:cocu=".&l:cocu)
  93
+     endif
71 94
     endif
72 95
    endif
73 96
   endif
74 97
 
75 98
   syn clear
76 99
 
  100
+  " suppress escaped sequences that don't involve colors (which may or may not be ansi-compliant)
  101
+  if has("conceal")
  102
+   syn match ansiSuppress	conceal	'\e\[[0-9;]*[^m]'
  103
+   syn match ansiSuppress	conceal	'\e\[?\d*[^m]'
  104
+   syn match ansiSuppress	conceal	'\b'
  105
+  else
  106
+   syn match ansiSuppress		'\e\[[0-9;]*[^m]'
  107
+   syn match ansiSuppress	conceal	'\e\[?\d*[^m]'
  108
+   syn match ansiSuppress		'\b'
  109
+  endif
  110
+
77 111
   " ------------------------------
78 112
   " Ansi Escape Sequence Handling: {{{2
79 113
   " ------------------------------
80 114
   syn region ansiNone		start="\e\[[01;]m"  end="\e\["me=e-2 contains=ansiConceal
81 115
   syn region ansiNone		start="\e\[m"       end="\e\["me=e-2 contains=ansiConceal
82 116
 
83  
-  syn region ansiBlack		start="\e\[0\=;\=30m" end="\e\["me=e-2 contains=ansiConceal
84  
-  syn region ansiRed		start="\e\[0\=;\=31m" end="\e\["me=e-2 contains=ansiConceal
85  
-  syn region ansiGreen		start="\e\[0\=;\=32m" end="\e\["me=e-2 contains=ansiConceal
86  
-  syn region ansiYellow		start="\e\[0\=;\=33m" end="\e\["me=e-2 contains=ansiConceal
87  
-  syn region ansiBlue		start="\e\[0\=;\=34m" end="\e\["me=e-2 contains=ansiConceal
88  
-  syn region ansiMagenta	start="\e\[0\=;\=35m" end="\e\["me=e-2 contains=ansiConceal
89  
-  syn region ansiCyan		start="\e\[0\=;\=36m" end="\e\["me=e-2 contains=ansiConceal
90  
-  syn region ansiWhite		start="\e\[0\=;\=37m" end="\e\["me=e-2 contains=ansiConceal
91  
-
92  
-  syn region ansiBlackBg	start="\e\[0\=;\=\%(1;\)\=40\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
93  
-  syn region ansiRedBg		start="\e\[0\=;\=\%(1;\)\=41\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
94  
-  syn region ansiGreenBg	start="\e\[0\=;\=\%(1;\)\=42\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
95  
-  syn region ansiYellowBg	start="\e\[0\=;\=\%(1;\)\=43\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
96  
-  syn region ansiBlueBg		start="\e\[0\=;\=\%(1;\)\=44\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
97  
-  syn region ansiMagentaBg	start="\e\[0\=;\=\%(1;\)\=45\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
98  
-  syn region ansiCyanBg		start="\e\[0\=;\=\%(1;\)\=46\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
99  
-  syn region ansiWhiteBg	start="\e\[0\=;\=\%(1;\)\=47\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
100  
-
101  
-  syn region ansiBoldBlack	 start="\e\[0\=;\=\%(1;30\|30;1\)m" end="\e\["me=e-2 contains=ansiConceal
102  
-  syn region ansiBoldRed	 start="\e\[0\=;\=\%(1;31\|31;1\)m" end="\e\["me=e-2 contains=ansiConceal
103  
-  syn region ansiBoldGreen	 start="\e\[0\=;\=\%(1;32\|32;1\)m" end="\e\["me=e-2 contains=ansiConceal
104  
-  syn region ansiBoldYellow	 start="\e\[0\=;\=\%(1;33\|33;1\)m" end="\e\["me=e-2 contains=ansiConceal
105  
-  syn region ansiBoldBlue	 start="\e\[0\=;\=\%(1;34\|34;1\)m" end="\e\["me=e-2 contains=ansiConceal
106  
-  syn region ansiBoldMagenta	 start="\e\[0\=;\=\%(1;35\|35;1\)m" end="\e\["me=e-2 contains=ansiConceal
107  
-  syn region ansiBoldCyan	 start="\e\[0\=;\=\%(1;36\|36;1\)m" end="\e\["me=e-2 contains=ansiConceal
108  
-  syn region ansiBoldWhite	 start="\e\[0\=;\=\%(1;37\|37;1\)m" end="\e\["me=e-2 contains=ansiConceal
109  
-
110  
-  syn region ansiStandoutBlack	 start="\e\[0\=;\=\%(1;\)\=\%(3;30\|30;3\)m" end="\e\["me=e-2 contains=ansiConceal
111  
-  syn region ansiStandoutRed	 start="\e\[0\=;\=\%(1;\)\=\%(3;31\|31;3\)m" end="\e\["me=e-2 contains=ansiConceal
112  
-  syn region ansiStandoutGreen	 start="\e\[0\=;\=\%(1;\)\=\%(3;32\|32;3\)m" end="\e\["me=e-2 contains=ansiConceal
113  
-  syn region ansiStandoutYellow	 start="\e\[0\=;\=\%(1;\)\=\%(3;33\|33;3\)m" end="\e\["me=e-2 contains=ansiConceal
114  
-  syn region ansiStandoutBlue	 start="\e\[0\=;\=\%(1;\)\=\%(3;34\|34;3\)m" end="\e\["me=e-2 contains=ansiConceal
115  
-  syn region ansiStandoutMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(3;35\|35;3\)m" end="\e\["me=e-2 contains=ansiConceal
116  
-  syn region ansiStandoutCyan	 start="\e\[0\=;\=\%(1;\)\=\%(3;36\|36;3\)m" end="\e\["me=e-2 contains=ansiConceal
117  
-  syn region ansiStandoutWhite	 start="\e\[0\=;\=\%(1;\)\=\%(3;37\|37;3\)m" end="\e\["me=e-2 contains=ansiConceal
118  
-
119  
-  syn region ansiItalicBlack	 start="\e\[0\=;\=\%(1;\)\=\%(2;30\|30;2\)m" end="\e\["me=e-2 contains=ansiConceal
120  
-  syn region ansiItalicRed	 start="\e\[0\=;\=\%(1;\)\=\%(2;31\|31;2\)m" end="\e\["me=e-2 contains=ansiConceal
121  
-  syn region ansiItalicGreen	 start="\e\[0\=;\=\%(1;\)\=\%(2;32\|32;2\)m" end="\e\["me=e-2 contains=ansiConceal
122  
-  syn region ansiItalicYellow	 start="\e\[0\=;\=\%(1;\)\=\%(2;33\|33;2\)m" end="\e\["me=e-2 contains=ansiConceal
123  
-  syn region ansiItalicBlue	 start="\e\[0\=;\=\%(1;\)\=\%(2;34\|34;2\)m" end="\e\["me=e-2 contains=ansiConceal
124  
-  syn region ansiItalicMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(2;35\|35;2\)m" end="\e\["me=e-2 contains=ansiConceal
125  
-  syn region ansiItalicCyan	 start="\e\[0\=;\=\%(1;\)\=\%(2;36\|36;2\)m" end="\e\["me=e-2 contains=ansiConceal
126  
-  syn region ansiItalicWhite	 start="\e\[0\=;\=\%(1;\)\=\%(2;37\|37;2\)m" end="\e\["me=e-2 contains=ansiConceal
127  
-
128  
-  syn region ansiUnderlineBlack	 start="\e\[0\=;\=\%(1;\)\=\%(4;30\|30;4\)m" end="\e\["me=e-2 contains=ansiConceal
129  
-  syn region ansiUnderlineRed	 start="\e\[0\=;\=\%(1;\)\=\%(4;31\|31;4\)m" end="\e\["me=e-2 contains=ansiConceal
130  
-  syn region ansiUnderlineGreen	 start="\e\[0\=;\=\%(1;\)\=\%(4;32\|32;4\)m" end="\e\["me=e-2 contains=ansiConceal
131  
-  syn region ansiUnderlineYellow	 start="\e\[0\=;\=\%(1;\)\=\%(4;33\|33;4\)m" end="\e\["me=e-2 contains=ansiConceal
132  
-  syn region ansiUnderlineBlue	 start="\e\[0\=;\=\%(1;\)\=\%(4;34\|34;4\)m" end="\e\["me=e-2 contains=ansiConceal
133  
-  syn region ansiUnderlineMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(4;35\|35;4\)m" end="\e\["me=e-2 contains=ansiConceal
134  
-  syn region ansiUnderlineCyan	 start="\e\[0\=;\=\%(1;\)\=\%(4;36\|36;4\)m" end="\e\["me=e-2 contains=ansiConceal
135  
-  syn region ansiUnderlineWhite	 start="\e\[0\=;\=\%(1;\)\=\%(4;37\|37;4\)m" end="\e\["me=e-2 contains=ansiConceal
136  
-
137  
-  syn region ansiBlinkBlack	 start="\e\[0\=;\=\%(1;\)\=\%(5;30\|30;5\)m" end="\e\["me=e-2 contains=ansiConceal
138  
-  syn region ansiBlinkRed	 start="\e\[0\=;\=\%(1;\)\=\%(5;31\|31;5\)m" end="\e\["me=e-2 contains=ansiConceal
139  
-  syn region ansiBlinkGreen	 start="\e\[0\=;\=\%(1;\)\=\%(5;32\|32;5\)m" end="\e\["me=e-2 contains=ansiConceal
140  
-  syn region ansiBlinkYellow	 start="\e\[0\=;\=\%(1;\)\=\%(5;33\|33;5\)m" end="\e\["me=e-2 contains=ansiConceal
141  
-  syn region ansiBlinkBlue	 start="\e\[0\=;\=\%(1;\)\=\%(5;34\|34;5\)m" end="\e\["me=e-2 contains=ansiConceal
142  
-  syn region ansiBlinkMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(5;35\|35;5\)m" end="\e\["me=e-2 contains=ansiConceal
143  
-  syn region ansiBlinkCyan	 start="\e\[0\=;\=\%(1;\)\=\%(5;36\|36;5\)m" end="\e\["me=e-2 contains=ansiConceal
144  
-  syn region ansiBlinkWhite	 start="\e\[0\=;\=\%(1;\)\=\%(5;37\|37;5\)m" end="\e\["me=e-2 contains=ansiConceal
145  
-
146  
-  syn region ansiRapidBlinkBlack	 start="\e\[0\=;\=\%(1;\)\=\%(6;30\|30;6\)m" end="\e\["me=e-2 contains=ansiConceal
147  
-  syn region ansiRapidBlinkRed	 start="\e\[0\=;\=\%(1;\)\=\%(6;31\|31;6\)m" end="\e\["me=e-2 contains=ansiConceal
148  
-  syn region ansiRapidBlinkGreen	 start="\e\[0\=;\=\%(1;\)\=\%(6;32\|32;6\)m" end="\e\["me=e-2 contains=ansiConceal
149  
-  syn region ansiRapidBlinkYellow	 start="\e\[0\=;\=\%(1;\)\=\%(6;33\|33;6\)m" end="\e\["me=e-2 contains=ansiConceal
150  
-  syn region ansiRapidBlinkBlue	 start="\e\[0\=;\=\%(1;\)\=\%(6;34\|34;6\)m" end="\e\["me=e-2 contains=ansiConceal
151  
-  syn region ansiRapidBlinkMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(6;35\|35;6\)m" end="\e\["me=e-2 contains=ansiConceal
152  
-  syn region ansiRapidBlinkCyan	 start="\e\[0\=;\=\%(1;\)\=\%(6;36\|36;6\)m" end="\e\["me=e-2 contains=ansiConceal
153  
-  syn region ansiRapidBlinkWhite	 start="\e\[0\=;\=\%(1;\)\=\%(6;37\|37;6\)m" end="\e\["me=e-2 contains=ansiConceal
154  
-
155  
-  syn region ansiRVBlack	 start="\e\[0\=;\=\%(1;\)\=\%(7;30\|30;7\)m" end="\e\["me=e-2 contains=ansiConceal
156  
-  syn region ansiRVRed		 start="\e\[0\=;\=\%(1;\)\=\%(7;31\|31;7\)m" end="\e\["me=e-2 contains=ansiConceal
157  
-  syn region ansiRVGreen	 start="\e\[0\=;\=\%(1;\)\=\%(7;32\|32;7\)m" end="\e\["me=e-2 contains=ansiConceal
158  
-  syn region ansiRVYellow	 start="\e\[0\=;\=\%(1;\)\=\%(7;33\|33;7\)m" end="\e\["me=e-2 contains=ansiConceal
159  
-  syn region ansiRVBlue		 start="\e\[0\=;\=\%(1;\)\=\%(7;34\|34;7\)m" end="\e\["me=e-2 contains=ansiConceal
160  
-  syn region ansiRVMagenta	 start="\e\[0\=;\=\%(1;\)\=\%(7;35\|35;7\)m" end="\e\["me=e-2 contains=ansiConceal
161  
-  syn region ansiRVCyan		 start="\e\[0\=;\=\%(1;\)\=\%(7;36\|36;7\)m" end="\e\["me=e-2 contains=ansiConceal
162  
-  syn region ansiRVWhite	 start="\e\[0\=;\=\%(1;\)\=\%(7;37\|37;7\)m" end="\e\["me=e-2 contains=ansiConceal
  117
+  syn region ansiBlack		start="\e\[;\=0\{0,2};\=30m" end="\e\["me=e-2 contains=ansiConceal
  118
+  syn region ansiRed		start="\e\[;\=0\{0,2};\=31m" end="\e\["me=e-2 contains=ansiConceal
  119
+  syn region ansiGreen		start="\e\[;\=0\{0,2};\=32m" end="\e\["me=e-2 contains=ansiConceal
  120
+  syn region ansiYellow		start="\e\[;\=0\{0,2};\=33m" end="\e\["me=e-2 contains=ansiConceal
  121
+  syn region ansiBlue		start="\e\[;\=0\{0,2};\=34m" end="\e\["me=e-2 contains=ansiConceal
  122
+  syn region ansiMagenta	start="\e\[;\=0\{0,2};\=35m" end="\e\["me=e-2 contains=ansiConceal
  123
+  syn region ansiCyan		start="\e\[;\=0\{0,2};\=36m" end="\e\["me=e-2 contains=ansiConceal
  124
+  syn region ansiWhite		start="\e\[;\=0\{0,2};\=37m" end="\e\["me=e-2 contains=ansiConceal
  125
+
  126
+  syn region ansiBlackBg	start="\e\[;\=0\{0,2};\=\%(1;\)\=40\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  127
+  syn region ansiRedBg		start="\e\[;\=0\{0,2};\=\%(1;\)\=41\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  128
+  syn region ansiGreenBg	start="\e\[;\=0\{0,2};\=\%(1;\)\=42\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  129
+  syn region ansiYellowBg	start="\e\[;\=0\{0,2};\=\%(1;\)\=43\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  130
+  syn region ansiBlueBg		start="\e\[;\=0\{0,2};\=\%(1;\)\=44\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  131
+  syn region ansiMagentaBg	start="\e\[;\=0\{0,2};\=\%(1;\)\=45\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  132
+  syn region ansiCyanBg		start="\e\[;\=0\{0,2};\=\%(1;\)\=46\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  133
+  syn region ansiWhiteBg	start="\e\[;\=0\{0,2};\=\%(1;\)\=47\%(1;\)\=m" end="\e\["me=e-2 contains=ansiConceal
  134
+
  135
+  syn region ansiBoldBlack	 start="\e\[;\=0\{0,2};\=\%(1;30\|30;1\)m" end="\e\["me=e-2 contains=ansiConceal
  136
+  syn region ansiBoldRed	 start="\e\[;\=0\{0,2};\=\%(1;31\|31;1\)m" end="\e\["me=e-2 contains=ansiConceal
  137
+  syn region ansiBoldGreen	 start="\e\[;\=0\{0,2};\=\%(1;32\|32;1\)m" end="\e\["me=e-2 contains=ansiConceal
  138
+  syn region ansiBoldYellow	 start="\e\[;\=0\{0,2};\=\%(1;33\|33;1\)m" end="\e\["me=e-2 contains=ansiConceal
  139
+  syn region ansiBoldBlue	 start="\e\[;\=0\{0,2};\=\%(1;34\|34;1\)m" end="\e\["me=e-2 contains=ansiConceal
  140
+  syn region ansiBoldMagenta	 start="\e\[;\=0\{0,2};\=\%(1;35\|35;1\)m" end="\e\["me=e-2 contains=ansiConceal
  141
+  syn region ansiBoldCyan	 start="\e\[;\=0\{0,2};\=\%(1;36\|36;1\)m" end="\e\["me=e-2 contains=ansiConceal
  142
+  syn region ansiBoldWhite	 start="\e\[;\=0\{0,2};\=\%(1;37\|37;1\)m" end="\e\["me=e-2 contains=ansiConceal
  143
+
  144
+  syn region ansiStandoutBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;30\|30;3\)m" end="\e\["me=e-2 contains=ansiConceal
  145
+  syn region ansiStandoutRed	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;31\|31;3\)m" end="\e\["me=e-2 contains=ansiConceal
  146
+  syn region ansiStandoutGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;32\|32;3\)m" end="\e\["me=e-2 contains=ansiConceal
  147
+  syn region ansiStandoutYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;33\|33;3\)m" end="\e\["me=e-2 contains=ansiConceal
  148
+  syn region ansiStandoutBlue	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;34\|34;3\)m" end="\e\["me=e-2 contains=ansiConceal
  149
+  syn region ansiStandoutMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;35\|35;3\)m" end="\e\["me=e-2 contains=ansiConceal
  150
+  syn region ansiStandoutCyan	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;36\|36;3\)m" end="\e\["me=e-2 contains=ansiConceal
  151
+  syn region ansiStandoutWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;37\|37;3\)m" end="\e\["me=e-2 contains=ansiConceal
  152
+
  153
+  syn region ansiItalicBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;30\|30;2\)m" end="\e\["me=e-2 contains=ansiConceal
  154
+  syn region ansiItalicRed	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;31\|31;2\)m" end="\e\["me=e-2 contains=ansiConceal
  155
+  syn region ansiItalicGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;32\|32;2\)m" end="\e\["me=e-2 contains=ansiConceal
  156
+  syn region ansiItalicYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;33\|33;2\)m" end="\e\["me=e-2 contains=ansiConceal
  157
+  syn region ansiItalicBlue	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;34\|34;2\)m" end="\e\["me=e-2 contains=ansiConceal
  158
+  syn region ansiItalicMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;35\|35;2\)m" end="\e\["me=e-2 contains=ansiConceal
  159
+  syn region ansiItalicCyan	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;36\|36;2\)m" end="\e\["me=e-2 contains=ansiConceal
  160
+  syn region ansiItalicWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;37\|37;2\)m" end="\e\["me=e-2 contains=ansiConceal
  161
+
  162
+  syn region ansiUnderlineBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;30\|30;4\)m" end="\e\["me=e-2 contains=ansiConceal
  163
+  syn region ansiUnderlineRed	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;31\|31;4\)m" end="\e\["me=e-2 contains=ansiConceal
  164
+  syn region ansiUnderlineGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;32\|32;4\)m" end="\e\["me=e-2 contains=ansiConceal
  165
+  syn region ansiUnderlineYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;33\|33;4\)m" end="\e\["me=e-2 contains=ansiConceal
  166
+  syn region ansiUnderlineBlue	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;34\|34;4\)m" end="\e\["me=e-2 contains=ansiConceal
  167
+  syn region ansiUnderlineMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;35\|35;4\)m" end="\e\["me=e-2 contains=ansiConceal
  168
+  syn region ansiUnderlineCyan	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;36\|36;4\)m" end="\e\["me=e-2 contains=ansiConceal
  169
+  syn region ansiUnderlineWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;37\|37;4\)m" end="\e\["me=e-2 contains=ansiConceal
  170
+
  171
+  syn region ansiBlinkBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;30\|30;5\)m" end="\e\["me=e-2 contains=ansiConceal
  172
+  syn region ansiBlinkRed	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;31\|31;5\)m" end="\e\["me=e-2 contains=ansiConceal
  173
+  syn region ansiBlinkGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;32\|32;5\)m" end="\e\["me=e-2 contains=ansiConceal
  174
+  syn region ansiBlinkYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;33\|33;5\)m" end="\e\["me=e-2 contains=ansiConceal
  175
+  syn region ansiBlinkBlue	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;34\|34;5\)m" end="\e\["me=e-2 contains=ansiConceal
  176
+  syn region ansiBlinkMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;35\|35;5\)m" end="\e\["me=e-2 contains=ansiConceal
  177
+  syn region ansiBlinkCyan	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;36\|36;5\)m" end="\e\["me=e-2 contains=ansiConceal
  178
+  syn region ansiBlinkWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;37\|37;5\)m" end="\e\["me=e-2 contains=ansiConceal
  179
+
  180
+  syn region ansiRapidBlinkBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;30\|30;6\)m" end="\e\["me=e-2 contains=ansiConceal
  181
+  syn region ansiRapidBlinkRed	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;31\|31;6\)m" end="\e\["me=e-2 contains=ansiConceal
  182
+  syn region ansiRapidBlinkGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;32\|32;6\)m" end="\e\["me=e-2 contains=ansiConceal
  183
+  syn region ansiRapidBlinkYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;33\|33;6\)m" end="\e\["me=e-2 contains=ansiConceal
  184
+  syn region ansiRapidBlinkBlue	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;34\|34;6\)m" end="\e\["me=e-2 contains=ansiConceal
  185
+  syn region ansiRapidBlinkMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;35\|35;6\)m" end="\e\["me=e-2 contains=ansiConceal
  186
+  syn region ansiRapidBlinkCyan	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;36\|36;6\)m" end="\e\["me=e-2 contains=ansiConceal
  187
+  syn region ansiRapidBlinkWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;37\|37;6\)m" end="\e\["me=e-2 contains=ansiConceal
  188
+
  189
+  syn region ansiRVBlack	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;30\|30;7\)m" end="\e\["me=e-2 contains=ansiConceal
  190
+  syn region ansiRVRed		 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;31\|31;7\)m" end="\e\["me=e-2 contains=ansiConceal
  191
+  syn region ansiRVGreen	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;32\|32;7\)m" end="\e\["me=e-2 contains=ansiConceal
  192
+  syn region ansiRVYellow	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;33\|33;7\)m" end="\e\["me=e-2 contains=ansiConceal
  193
+  syn region ansiRVBlue		 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;34\|34;7\)m" end="\e\["me=e-2 contains=ansiConceal
  194
+  syn region ansiRVMagenta	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;35\|35;7\)m" end="\e\["me=e-2 contains=ansiConceal
  195
+  syn region ansiRVCyan		 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;36\|36;7\)m" end="\e\["me=e-2 contains=ansiConceal
  196
+  syn region ansiRVWhite	 start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;37\|37;7\)m" end="\e\["me=e-2 contains=ansiConceal
163 197
 
164 198
   if has("conceal")
165  
-   syn match ansiStop		conceal "\e\[0\{1,2}m"
  199
+   syn match ansiStop		conceal "\e\[;\=0\{1,2}m"
166 200
    syn match ansiStop		conceal "\e\[K"
167 201
    syn match ansiStop		conceal "\e\[H"
168 202
    syn match ansiStop		conceal "\e\[2J"
169 203
   else
170  
-   syn match ansiStop		"\e\[0\{1,2}\=m"
  204
+   syn match ansiStop		"\e\[;\=0\{0,2}m"
171 205
    syn match ansiStop		"\e\[K"
172 206
    syn match ansiStop		"\e\[H"
173 207
    syn match ansiStop		"\e\[2J"
@@ -179,84 +213,84 @@ fun! AnsiEsc#AnsiEsc()
179 213
   " ---------------------------------------------------------------------
180 214
   " Some Color Combinations: - can't do 'em all, the qty of highlighting groups is limited! {{{2
181 215
   " ---------------------------------------------------------------------
182  
-  syn region ansiBlackBlack	 start="\e\[0\=;\=\(30;40\|40;30\)m" end="\e\["me=e-2 contains=ansiConceal
183  
-  syn region ansiRedBlack	 start="\e\[0\=;\=\(31;40\|40;31\)m" end="\e\["me=e-2 contains=ansiConceal
184  
-  syn region ansiGreenBlack	 start="\e\[0\=;\=\(32;40\|40;32\)m" end="\e\["me=e-2 contains=ansiConceal
185  
-  syn region ansiYellowBlack	 start="\e\[0\=;\=\(33;40\|40;33\)m" end="\e\["me=e-2 contains=ansiConceal
186  
-  syn region ansiBlueBlack	 start="\e\[0\=;\=\(34;40\|40;34\)m" end="\e\["me=e-2 contains=ansiConceal
187  
-  syn region ansiMagentaBlack	 start="\e\[0\=;\=\(35;40\|40;35\)m" end="\e\["me=e-2 contains=ansiConceal
188  
-  syn region ansiCyanBlack	 start="\e\[0\=;\=\(36;40\|40;36\)m" end="\e\["me=e-2 contains=ansiConceal
189  
-  syn region ansiWhiteBlack	 start="\e\[0\=;\=\(37;40\|40;37\)m" end="\e\["me=e-2 contains=ansiConceal
190  
-
191  
-  syn region ansiBlackRed	 start="\e\[0\=;\=\(30;41\|41;30\)m" end="\e\["me=e-2 contains=ansiConceal
192  
-  syn region ansiRedRed		 start="\e\[0\=;\=\(31;41\|41;31\)m" end="\e\["me=e-2 contains=ansiConceal
193  
-  syn region ansiGreenRed	 start="\e\[0\=;\=\(32;41\|41;32\)m" end="\e\["me=e-2 contains=ansiConceal
194  
-  syn region ansiYellowRed	 start="\e\[0\=;\=\(33;41\|41;33\)m" end="\e\["me=e-2 contains=ansiConceal
195  
-  syn region ansiBlueRed	 start="\e\[0\=;\=\(34;41\|41;34\)m" end="\e\["me=e-2 contains=ansiConceal
196  
-  syn region ansiMagentaRed	 start="\e\[0\=;\=\(35;41\|41;35\)m" end="\e\["me=e-2 contains=ansiConceal
197  
-  syn region ansiCyanRed	 start="\e\[0\=;\=\(36;41\|41;36\)m" end="\e\["me=e-2 contains=ansiConceal
198  
-  syn region ansiWhiteRed	 start="\e\[0\=;\=\(37;41\|41;37\)m" end="\e\["me=e-2 contains=ansiConceal
199  
-
200  
-  syn region ansiBlackGreen	 start="\e\[0\=;\=\(30;42\|42;30\)m" end="\e\["me=e-2 contains=ansiConceal
201  
-  syn region ansiRedGreen	 start="\e\[0\=;\=\(31;42\|42;31\)m" end="\e\["me=e-2 contains=ansiConceal
202  
-  syn region ansiGreenGreen	 start="\e\[0\=;\=\(32;42\|42;32\)m" end="\e\["me=e-2 contains=ansiConceal
203  
-  syn region ansiYellowGreen	 start="\e\[0\=;\=\(33;42\|42;33\)m" end="\e\["me=e-2 contains=ansiConceal
204  
-  syn region ansiBlueGreen	 start="\e\[0\=;\=\(34;42\|42;34\)m" end="\e\["me=e-2 contains=ansiConceal
205  
-  syn region ansiMagentaGreen	 start="\e\[0\=;\=\(35;42\|42;35\)m" end="\e\["me=e-2 contains=ansiConceal
206  
-  syn region ansiCyanGreen	 start="\e\[0\=;\=\(36;42\|42;36\)m" end="\e\["me=e-2 contains=ansiConceal
207  
-  syn region ansiWhiteGreen	 start="\e\[0\=;\=\(37;42\|42;37\)m" end="\e\["me=e-2 contains=ansiConceal
208  
-
209  
-  syn region ansiBlackYellow	 start="\e\[0\=;\=\(30;43\|43;30\)m" end="\e\["me=e-2 contains=ansiConceal
210  
-  syn region ansiRedYellow	 start="\e\[0\=;\=\(31;43\|43;31\)m" end="\e\["me=e-2 contains=ansiConceal
211  
-  syn region ansiGreenYellow	 start="\e\[0\=;\=\(32;43\|43;32\)m" end="\e\["me=e-2 contains=ansiConceal
212  
-  syn region ansiYellowYellow	 start="\e\[0\=;\=\(33;43\|43;33\)m" end="\e\["me=e-2 contains=ansiConceal
213  
-  syn region ansiBlueYellow	 start="\e\[0\=;\=\(34;43\|43;34\)m" end="\e\["me=e-2 contains=ansiConceal
214  
-  syn region ansiMagentaYellow	 start="\e\[0\=;\=\(35;43\|43;35\)m" end="\e\["me=e-2 contains=ansiConceal
215  
-  syn region ansiCyanYellow	 start="\e\[0\=;\=\(36;43\|43;36\)m" end="\e\["me=e-2 contains=ansiConceal
216  
-  syn region ansiWhiteYellow	 start="\e\[0\=;\=\(37;43\|43;37\)m" end="\e\["me=e-2 contains=ansiConceal
217  
-
218  
-  syn region ansiBlackBlue	 start="\e\[0\=;\=\(30;44\|44;30\)m" end="\e\["me=e-2 contains=ansiConceal
219  
-  syn region ansiRedBlue	 start="\e\[0\=;\=\(31;44\|44;31\)m" end="\e\["me=e-2 contains=ansiConceal
220  
-  syn region ansiGreenBlue	 start="\e\[0\=;\=\(32;44\|44;32\)m" end="\e\["me=e-2 contains=ansiConceal
221  
-  syn region ansiYellowBlue	 start="\e\[0\=;\=\(33;44\|44;33\)m" end="\e\["me=e-2 contains=ansiConceal
222  
-  syn region ansiBlueBlue	 start="\e\[0\=;\=\(34;44\|44;34\)m" end="\e\["me=e-2 contains=ansiConceal
223  
-  syn region ansiMagentaBlue	 start="\e\[0\=;\=\(35;44\|44;35\)m" end="\e\["me=e-2 contains=ansiConceal
224  
-  syn region ansiCyanBlue	 start="\e\[0\=;\=\(36;44\|44;36\)m" end="\e\["me=e-2 contains=ansiConceal
225  
-  syn region ansiWhiteBlue	 start="\e\[0\=;\=\(37;44\|44;37\)m" end="\e\["me=e-2 contains=ansiConceal
226  
-
227  
-  syn region ansiBlackMagenta	 start="\e\[0\=;\=\(30;45\|45;30\)m" end="\e\["me=e-2 contains=ansiConceal
228  
-  syn region ansiRedMagenta	 start="\e\[0\=;\=\(31;45\|45;31\)m" end="\e\["me=e-2 contains=ansiConceal
229  
-  syn region ansiGreenMagenta	 start="\e\[0\=;\=\(32;45\|45;32\)m" end="\e\["me=e-2 contains=ansiConceal
230  
-  syn region ansiYellowMagenta	 start="\e\[0\=;\=\(33;45\|45;33\)m" end="\e\["me=e-2 contains=ansiConceal
231  
-  syn region ansiBlueMagenta	 start="\e\[0\=;\=\(34;45\|45;34\)m" end="\e\["me=e-2 contains=ansiConceal
232  
-  syn region ansiMagentaMagenta	 start="\e\[0\=;\=\(35;45\|45;35\)m" end="\e\["me=e-2 contains=ansiConceal
233  
-  syn region ansiCyanMagenta	 start="\e\[0\=;\=\(36;45\|45;36\)m" end="\e\["me=e-2 contains=ansiConceal
234  
-  syn region ansiWhiteMagenta	 start="\e\[0\=;\=\(37;45\|45;37\)m" end="\e\["me=e-2 contains=ansiConceal
235  
-
236  
-  syn region ansiBlackCyan	 start="\e\[0\=;\=\(30;46\|46;30\)m" end="\e\["me=e-2 contains=ansiConceal
237  
-  syn region ansiRedCyan	 start="\e\[0\=;\=\(31;46\|46;31\)m" end="\e\["me=e-2 contains=ansiConceal
238  
-  syn region ansiGreenCyan	 start="\e\[0\=;\=\(32;46\|46;32\)m" end="\e\["me=e-2 contains=ansiConceal
239  
-  syn region ansiYellowCyan	 start="\e\[0\=;\=\(33;46\|46;33\)m" end="\e\["me=e-2 contains=ansiConceal
240  
-  syn region ansiBlueCyan	 start="\e\[0\=;\=\(34;46\|46;34\)m" end="\e\["me=e-2 contains=ansiConceal
241  
-  syn region ansiMagentaCyan	 start="\e\[0\=;\=\(35;46\|46;35\)m" end="\e\["me=e-2 contains=ansiConceal
242  
-  syn region ansiCyanCyan	 start="\e\[0\=;\=\(36;46\|46;36\)m" end="\e\["me=e-2 contains=ansiConceal
243  
-  syn region ansiWhiteCyan	 start="\e\[0\=;\=\(37;46\|46;37\)m" end="\e\["me=e-2 contains=ansiConceal
244  
-
245  
-  syn region ansiBlackWhite	 start="\e\[0\=;\=\(30;47\|47;30\)m" end="\e\["me=e-2 contains=ansiConceal
246  
-  syn region ansiRedWhite	 start="\e\[0\=;\=\(31;47\|47;31\)m" end="\e\["me=e-2 contains=ansiConceal
247  
-  syn region ansiGreenWhite	 start="\e\[0\=;\=\(32;47\|47;32\)m" end="\e\["me=e-2 contains=ansiConceal
248  
-  syn region ansiYellowWhite	 start="\e\[0\=;\=\(33;47\|47;33\)m" end="\e\["me=e-2 contains=ansiConceal
249  
-  syn region ansiBlueWhite	 start="\e\[0\=;\=\(34;47\|47;34\)m" end="\e\["me=e-2 contains=ansiConceal
250  
-  syn region ansiMagentaWhite	 start="\e\[0\=;\=\(35;47\|47;35\)m" end="\e\["me=e-2 contains=ansiConceal
251  
-  syn region ansiCyanWhite	 start="\e\[0\=;\=\(36;47\|47;36\)m" end="\e\["me=e-2 contains=ansiConceal
252  
-  syn region ansiWhiteWhite	 start="\e\[0\=;\=\(37;47\|47;37\)m" end="\e\["me=e-2 contains=ansiConceal
  216
+  syn region ansiBlackBlack	 start="\e\[0\{0,2};\=\(30;40\|40;30\)m" end="\e\["me=e-2 contains=ansiConceal
  217
+  syn region ansiRedBlack	 start="\e\[0\{0,2};\=\(31;40\|40;31\)m" end="\e\["me=e-2 contains=ansiConceal
  218
+  syn region ansiGreenBlack	 start="\e\[0\{0,2};\=\(32;40\|40;32\)m" end="\e\["me=e-2 contains=ansiConceal
  219
+  syn region ansiYellowBlack	 start="\e\[0\{0,2};\=\(33;40\|40;33\)m" end="\e\["me=e-2 contains=ansiConceal
  220
+  syn region ansiBlueBlack	 start="\e\[0\{0,2};\=\(34;40\|40;34\)m" end="\e\["me=e-2 contains=ansiConceal
  221
+  syn region ansiMagentaBlack	 start="\e\[0\{0,2};\=\(35;40\|40;35\)m" end="\e\["me=e-2 contains=ansiConceal
  222
+  syn region ansiCyanBlack	 start="\e\[0\{0,2};\=\(36;40\|40;36\)m" end="\e\["me=e-2 contains=ansiConceal
  223
+  syn region ansiWhiteBlack	 start="\e\[0\{0,2};\=\(37;40\|40;37\)m" end="\e\["me=e-2 contains=ansiConceal
  224
+
  225
+  syn region ansiBlackRed	 start="\e\[0\{0,2};\=\(30;41\|41;30\)m" end="\e\["me=e-2 contains=ansiConceal
  226
+  syn region ansiRedRed		 start="\e\[0\{0,2};\=\(31;41\|41;31\)m" end="\e\["me=e-2 contains=ansiConceal
  227
+  syn region ansiGreenRed	 start="\e\[0\{0,2};\=\(32;41\|41;32\)m" end="\e\["me=e-2 contains=ansiConceal
  228
+  syn region ansiYellowRed	 start="\e\[0\{0,2};\=\(33;41\|41;33\)m" end="\e\["me=e-2 contains=ansiConceal
  229
+  syn region ansiBlueRed	 start="\e\[0\{0,2};\=\(34;41\|41;34\)m" end="\e\["me=e-2 contains=ansiConceal
  230
+  syn region ansiMagentaRed	 start="\e\[0\{0,2};\=\(35;41\|41;35\)m" end="\e\["me=e-2 contains=ansiConceal
  231
+  syn region ansiCyanRed	 start="\e\[0\{0,2};\=\(36;41\|41;36\)m" end="\e\["me=e-2 contains=ansiConceal
  232
+  syn region ansiWhiteRed	 start="\e\[0\{0,2};\=\(37;41\|41;37\)m" end="\e\["me=e-2 contains=ansiConceal
  233
+
  234
+  syn region ansiBlackGreen	 start="\e\[0\{0,2};\=\(30;42\|42;30\)m" end="\e\["me=e-2 contains=ansiConceal
  235
+  syn region ansiRedGreen	 start="\e\[0\{0,2};\=\(31;42\|42;31\)m" end="\e\["me=e-2 contains=ansiConceal
  236
+  syn region ansiGreenGreen	 start="\e\[0\{0,2};\=\(32;42\|42;32\)m" end="\e\["me=e-2 contains=ansiConceal
  237
+  syn region ansiYellowGreen	 start="\e\[0\{0,2};\=\(33;42\|42;33\)m" end="\e\["me=e-2 contains=ansiConceal
  238
+  syn region ansiBlueGreen	 start="\e\[0\{0,2};\=\(34;42\|42;34\)m" end="\e\["me=e-2 contains=ansiConceal
  239
+  syn region ansiMagentaGreen	 start="\e\[0\{0,2};\=\(35;42\|42;35\)m" end="\e\["me=e-2 contains=ansiConceal
  240
+  syn region ansiCyanGreen	 start="\e\[0\{0,2};\=\(36;42\|42;36\)m" end="\e\["me=e-2 contains=ansiConceal
  241
+  syn region ansiWhiteGreen	 start="\e\[0\{0,2};\=\(37;42\|42;37\)m" end="\e\["me=e-2 contains=ansiConceal
  242
+
  243
+  syn region ansiBlackYellow	 start="\e\[0\{0,2};\=\(30;43\|43;30\)m" end="\e\["me=e-2 contains=ansiConceal
  244
+  syn region ansiRedYellow	 start="\e\[0\{0,2};\=\(31;43\|43;31\)m" end="\e\["me=e-2 contains=ansiConceal
  245
+  syn region ansiGreenYellow	 start="\e\[0\{0,2};\=\(32;43\|43;32\)m" end="\e\["me=e-2 contains=ansiConceal
  246
+  syn region ansiYellowYellow	 start="\e\[0\{0,2};\=\(33;43\|43;33\)m" end="\e\["me=e-2 contains=ansiConceal
  247
+  syn region ansiBlueYellow	 start="\e\[0\{0,2};\=\(34;43\|43;34\)m" end="\e\["me=e-2 contains=ansiConceal
  248
+  syn region ansiMagentaYellow	 start="\e\[0\{0,2};\=\(35;43\|43;35\)m" end="\e\["me=e-2 contains=ansiConceal
  249
+  syn region ansiCyanYellow	 start="\e\[0\{0,2};\=\(36;43\|43;36\)m" end="\e\["me=e-2 contains=ansiConceal
  250
+  syn region ansiWhiteYellow	 start="\e\[0\{0,2};\=\(37;43\|43;37\)m" end="\e\["me=e-2 contains=ansiConceal
  251
+
  252
+  syn region ansiBlackBlue	 start="\e\[0\{0,2};\=\(30;44\|44;30\)m" end="\e\["me=e-2 contains=ansiConceal
  253
+  syn region ansiRedBlue	 start="\e\[0\{0,2};\=\(31;44\|44;31\)m" end="\e\["me=e-2 contains=ansiConceal
  254
+  syn region ansiGreenBlue	 start="\e\[0\{0,2};\=\(32;44\|44;32\)m" end="\e\["me=e-2 contains=ansiConceal
  255
+  syn region ansiYellowBlue	 start="\e\[0\{0,2};\=\(33;44\|44;33\)m" end="\e\["me=e-2 contains=ansiConceal
  256
+  syn region ansiBlueBlue	 start="\e\[0\{0,2};\=\(34;44\|44;34\)m" end="\e\["me=e-2 contains=ansiConceal
  257
+  syn region ansiMagentaBlue	 start="\e\[0\{0,2};\=\(35;44\|44;35\)m" end="\e\["me=e-2 contains=ansiConceal
  258
+  syn region ansiCyanBlue	 start="\e\[0\{0,2};\=\(36;44\|44;36\)m" end="\e\["me=e-2 contains=ansiConceal
  259
+  syn region ansiWhiteBlue	 start="\e\[0\{0,2};\=\(37;44\|44;37\)m" end="\e\["me=e-2 contains=ansiConceal
  260
+
  261
+  syn region ansiBlackMagenta	 start="\e\[0\{0,2};\=\(30;45\|45;30\)m" end="\e\["me=e-2 contains=ansiConceal
  262
+  syn region ansiRedMagenta	 start="\e\[0\{0,2};\=\(31;45\|45;31\)m" end="\e\["me=e-2 contains=ansiConceal
  263
+  syn region ansiGreenMagenta	 start="\e\[0\{0,2};\=\(32;45\|45;32\)m" end="\e\["me=e-2 contains=ansiConceal
  264
+  syn region ansiYellowMagenta	 start="\e\[0\{0,2};\=\(33;45\|45;33\)m" end="\e\["me=e-2 contains=ansiConceal
  265
+  syn region ansiBlueMagenta	 start="\e\[0\{0,2};\=\(34;45\|45;34\)m" end="\e\["me=e-2 contains=ansiConceal
  266
+  syn region ansiMagentaMagenta	 start="\e\[0\{0,2};\=\(35;45\|45;35\)m" end="\e\["me=e-2 contains=ansiConceal
  267
+  syn region ansiCyanMagenta	 start="\e\[0\{0,2};\=\(36;45\|45;36\)m" end="\e\["me=e-2 contains=ansiConceal
  268
+  syn region ansiWhiteMagenta	 start="\e\[0\{0,2};\=\(37;45\|45;37\)m" end="\e\["me=e-2 contains=ansiConceal
  269
+
  270
+  syn region ansiBlackCyan	 start="\e\[0\{0,2};\=\(30;46\|46;30\)m" end="\e\["me=e-2 contains=ansiConceal
  271
+  syn region ansiRedCyan	 start="\e\[0\{0,2};\=\(31;46\|46;31\)m" end="\e\["me=e-2 contains=ansiConceal
  272
+  syn region ansiGreenCyan	 start="\e\[0\{0,2};\=\(32;46\|46;32\)m" end="\e\["me=e-2 contains=ansiConceal
  273
+  syn region ansiYellowCyan	 start="\e\[0\{0,2};\=\(33;46\|46;33\)m" end="\e\["me=e-2 contains=ansiConceal
  274
+  syn region ansiBlueCyan	 start="\e\[0\{0,2};\=\(34;46\|46;34\)m" end="\e\["me=e-2 contains=ansiConceal
  275
+  syn region ansiMagentaCyan	 start="\e\[0\{0,2};\=\(35;46\|46;35\)m" end="\e\["me=e-2 contains=ansiConceal
  276
+  syn region ansiCyanCyan	 start="\e\[0\{0,2};\=\(36;46\|46;36\)m" end="\e\["me=e-2 contains=ansiConceal
  277
+  syn region ansiWhiteCyan	 start="\e\[0\{0,2};\=\(37;46\|46;37\)m" end="\e\["me=e-2 contains=ansiConceal
  278
+
  279
+  syn region ansiBlackWhite	 start="\e\[0\{0,2};\=\(30;47\|47;30\)m" end="\e\["me=e-2 contains=ansiConceal
  280
+  syn region ansiRedWhite	 start="\e\[0\{0,2};\=\(31;47\|47;31\)m" end="\e\["me=e-2 contains=ansiConceal
  281
+  syn region ansiGreenWhite	 start="\e\[0\{0,2};\=\(32;47\|47;32\)m" end="\e\["me=e-2 contains=ansiConceal
  282
+  syn region ansiYellowWhite	 start="\e\[0\{0,2};\=\(33;47\|47;33\)m" end="\e\["me=e-2 contains=ansiConceal
  283
+  syn region ansiBlueWhite	 start="\e\[0\{0,2};\=\(34;47\|47;34\)m" end="\e\["me=e-2 contains=ansiConceal
  284
+  syn region ansiMagentaWhite	 start="\e\[0\{0,2};\=\(35;47\|47;35\)m" end="\e\["me=e-2 contains=ansiConceal
  285
+  syn region ansiCyanWhite	 start="\e\[0\{0,2};\=\(36;47\|47;36\)m" end="\e\["me=e-2 contains=ansiConceal
  286
+  syn region ansiWhiteWhite	 start="\e\[0\{0,2};\=\(37;47\|47;37\)m" end="\e\["me=e-2 contains=ansiConceal
253 287
 
254 288
   syn match ansiExtended	 "\e\[;\=\(0;\)\=[34]8;\(\d*;\)*\d*m"   contains=ansiConceal
255 289
 
256 290
   if has("conceal")
257  
-   syn match ansiConceal		contained conceal "\e\[\(\d*;\)*\d*m"
  291
+   syn match ansiConceal		contained conceal	"\e\[\(\d*;\)*\d*m"
258 292
   else
259  
-   syn match ansiConceal		contained "\e\[\(\d*;\)*\d*m"
  293
+   syn match ansiConceal		contained		"\e\[\(\d*;\)*\d*m"
260 294
   endif
261 295
 
262 296
   " -------------
@@ -267,10 +301,12 @@ fun! AnsiEsc#AnsiEsc()
267 301
    " ansiesc_ignore: {{{3
268 302
    " --------------
269 303
    hi def link ansiConceal	Ignore
  304
+   hi def link ansiSuppress	Ignore
270 305
    hi def link ansiIgnore	ansiStop
271 306
    hi def link ansiStop		Ignore
272 307
    hi def link ansiExtended	Ignore
273 308
   endif
  309
+  let s:hlkeep_{bufnr("%")}= &l:hl
274 310
   exe "setlocal hl=".substitute(&hl,'8:[^,]\{-},','8:Ignore,',"")
275 311
 
276 312
   " handle 3 or more element ansi escape sequences by building syntax and highlighting rules
@@ -628,7 +664,7 @@ fun! s:MultiElementHandler()
628 664
   keepj norm! 0
629 665
   let mehcnt = 0
630 666
   let mehrules     = []
631  
-  while search('\e\[\d\+;\d\+;\d\+\(;\d\+\)*m','cW')
  667
+  while search('\e\[;\=\d\+;\d\+;\d\+\(;\d\+\)*m','cW')
632 668
    let curcol  = col(".")+1
633 669
    call search('m','cW')
634 670
    let mcol    = col(".")
@@ -650,7 +686,7 @@ fun! s:MultiElementHandler()
650 686
      if skip == 38 && code == 5
651 687
       " handling <esc>[38;5
652 688
       let skip= 385
653  
-"      call Decho(" building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
  689
+"      call Decho(" 1: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
654 690
       continue
655 691
      elseif skip == 385
656 692
       " handling <esc>[38;5;...
@@ -660,13 +696,13 @@ fun! s:MultiElementHandler()
660 696
        let fg= code
661 697
       endif
662 698
       let skip= 0
663  
-"      call Decho(" building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
  699
+"      call Decho(" 2: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
664 700
       continue
665 701
 
666 702
      elseif skip == 48 && code == 5
667 703
       " handling <esc>[48;5
668 704
       let skip= 485
669  
-"      call Decho(" building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
  705
+"      call Decho(" 3: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
670 706
       continue
671 707
      elseif skip == 485
672 708
       " handling <esc>[48;5;...
@@ -676,7 +712,7 @@ fun! s:MultiElementHandler()
676 712
        let bg= code
677 713
       endif
678 714
       let skip= 0
679  
-"      call Decho(" building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
  715
+"      call Decho(" 4: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
680 716
       continue
681 717
 
682 718
      else
@@ -712,7 +748,7 @@ fun! s:MultiElementHandler()
712 748
      elseif code == 36
713 749
       let fg= "cyan"
714 750
      elseif code == 37
715  
-      let fg= "black"
  751
+      let fg= "white"
716 752
 
717 753
      elseif code == 40
718 754
       let bg= "black"
@@ -729,7 +765,7 @@ fun! s:MultiElementHandler()
729 765
      elseif code == 46
730 766
       let bg= "cyan"
731 767
      elseif code == 47
732  
-      let bg= "black"
  768
+      let bg= "white"
733 769
 
734 770
      elseif code == 38
735 771
       let skip= 38
@@ -738,7 +774,7 @@ fun! s:MultiElementHandler()
738 774
       let skip= 48
739 775
      endif
740 776
 
741  
-"     call Decho(" building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
  777
+"     call Decho(" 5: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">")
742 778
     endfor
743 779
 
744 780
     " fixups
36  doc/AnsiEsc.txt
... ...
@@ -1,4 +1,4 @@
1  
-*AnsiEsc.txt*	Ansi Escape Sequence Visualization		May 12, 2010
  1
+*AnsiEsc.txt*	Ansi Escape Sequence Visualization		Dec 13, 2010
2 2
 
3 3
 Author:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamily.AbizM>
4 4
 	  (remove NOSPAM from Campbell's email first)
@@ -38,7 +38,9 @@ Copyright: (c) 2004-2010 by Charles E. Campbell, Jr.	*AnsiEsc-copyright*
38 38
 		improve your colorscheme!
39 39
 
40 40
 	USAGE~
41  
-		:AnsiEsc
  41
+		:AnsiEsc   -- toggles Ansi escape sequence highlighting
  42
+		:AnsiEsc!  -- rebuilds highlighting for new/removed three
  43
+		              or more element Ansi escape sequences.
42 44
 	
43 45
 	RESULT~
44 46
 		Ansi escape sequences become concealed or ignored (depending
@@ -55,7 +57,8 @@ Copyright: (c) 2004-2010 by Charles E. Campbell, Jr.	*AnsiEsc-copyright*
55 57
 
56 58
 	EXAMPLE~
57 59
 
58  
-		You'll want to   :AnsiEsc   to see the following properly!
  60
+		You'll want to use   :AnsiEsc   to see the following properly!
  61
+		(using Vince Negri's conceal option or vim 7.3)
59 62
 
60 63
             Color Escape Sequences
61 64
   -       1       2       3       4       5       7  
@@ -77,8 +80,35 @@ Magenta M  M  M  M  M   
77 80
 Cyan    C  C  C  C  C   C   C   C
78 81
 White   W  W  W  W  W   W   W   W
79 82
 
  83
+	Here's the vim logo:
  84
+
  85
+        /  \
  86
+       /    \
  87
+      /      \
  88
+     /        \
  89
+ +----+ +----+ \
  90
+ ++  ++ +-   |  \
  91
+ /|  |   /  /    \
  92
+X |  |  /  /O     \
  93
+ \|  | /  /+-+ +-\//-+
  94
+  |  |/  / | | |  v  |
  95
+  |  /  /  | | | +  +|
  96
+  |    /   | |/| |\/||
  97
+  +----\   +-+ +-+  ++
  98
+        \   /
  99
+         \ /
  100
+
  101
+
80 102
 ==============================================================================
81 103
 3. AnsiEsc History					*AnsiEsc-history* {{{1
  104
+  v12	Jul 23, 2010	* changed conc to |'cole'| to correspond to vim 7.3's
  105
+			  change
  106
+	Aug 10, 2010	* (Rainer M Schmid) changed conceallevel setting to
  107
+			  depend on whether the version is before vim 7.3;
  108
+			  for 7.3, also sets concealcursor
  109
+			* Restores conc/cole/cocu settings when AnsiEsc is
  110
+			  toggled off.
  111
+	Dec 13, 2010	* Included some additional sequences involving 0
82 112
   v11	Apr 20, 2010	* AnsiEsc now supports enabling/disabling via a menu
83 113
 			* <esc>[K and <esc>[00m now supported (as
84 114
 			  grep --color=always   issues them)
6  plugin/AnsiEscPlugin.vim
... ...
@@ -1,19 +1,19 @@
1 1
 " AnsiEscPlugin.vim
2 2
 "   Author: Charles E. Campbell, Jr.
3 3
 "   Date:   Apr 07, 2010
4  
-"   Version: 11
  4
+"   Version: 12
5 5
 " ---------------------------------------------------------------------
6 6
 "  Load Once: {{{1
7 7
 if &cp || exists("g:loaded_AnsiEscPlugin")
8 8
  finish
9 9
 endif
10  
-let g:loaded_AnsiEscPlugin = "v11"
  10
+let g:loaded_AnsiEscPlugin = "v12"
11 11
 let s:keepcpo              = &cpo
12 12
 set cpo&vim
13 13
 
14 14
 " ---------------------------------------------------------------------
15 15
 "  Public Interface: {{{1
16  
-com! -nargs=0 AnsiEsc	:call AnsiEsc#AnsiEsc()
  16
+com! -bang -nargs=0 AnsiEsc	:call AnsiEsc#AnsiEsc(<bang>0)
17 17
 
18 18
 " DrChip Menu Support: {{{2
19 19
 if has("gui_running") && has("menu") && &go =~ 'm'

0 notes on commit d2bb787

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