" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. UseVimball finish autoload/AnsiEsc.vim [[[1 2257 " AnsiEsc.vim: Uses vim 7.0 syntax highlighting " Language: Text with ansi escape sequences " Maintainer: Charles E. Campbell " Version: 13i ASTRO-ONLY " Date: Apr 02, 2015 " " Usage: :AnsiEsc (toggles) " Note: This plugin requires +conceal " " GetLatestVimScripts: 302 1 :AutoInstall: AnsiEsc.vim "redraw!|call DechoSep()|call inputsave()|call input("Press to continue")|call inputrestore() " --------------------------------------------------------------------- "DechoRemOn " Load Once: {{{1 if exists("g:loaded_AnsiEsc") finish endif let g:loaded_AnsiEsc = "v13i" if v:version < 700 echohl WarningMsg echo "***warning*** this version of AnsiEsc needs vim 7.0" echohl Normal finish endif let s:keepcpo= &cpo set cpo&vim " --------------------------------------------------------------------- " AnsiEsc#AnsiEsc: toggles ansi-escape code visualization {{{2 fun! AnsiEsc#AnsiEsc(rebuild) " call Dfunc("AnsiEsc#AnsiEsc(rebuild=".a:rebuild.")") if a:rebuild " call Decho("rebuilding AnsiEsc tables") call AnsiEsc#AnsiEsc(0) call AnsiEsc#AnsiEsc(0) " call Dret("AnsiEsc#AnsiEsc") return endif let bn= bufnr("%") if !exists("s:AnsiEsc_enabled_{bn}") let s:AnsiEsc_enabled_{bn}= 0 endif if s:AnsiEsc_enabled_{bn} " disable AnsiEsc highlighting " call Decho("disable AnsiEsc highlighting: s:AnsiEsc_ft_".bn."<".s:AnsiEsc_ft_{bn}."> bn#".bn) if exists("g:colors_name")|let colorname= g:colors_name|endif if exists("s:conckeep_{bufnr('%')}")|let &l:conc= s:conckeep_{bufnr('%')}|unlet s:conckeep_{bufnr('%')}|endif if exists("s:colekeep_{bufnr('%')}")|let &l:cole= s:colekeep_{bufnr('%')}|unlet s:colekeep_{bufnr('%')}|endif if exists("s:cocukeep_{bufnr('%')}")|let &l:cocu= s:cocukeep_{bufnr('%')}|unlet s:cocukeep_{bufnr('%')}|endif hi! link ansiStop NONE syn clear hi clear syn reset exe "set ft=".s:AnsiEsc_ft_{bn} if exists("colorname")|exe "colors ".colorname|endif let s:AnsiEsc_enabled_{bn}= 0 if !exists('g:no_drchip_menu') && !exists('g:no_ansiesc_menu') if has("gui_running") && has("menu") && &go =~# 'm' " menu support exe 'silent! unmenu '.g:DrChipTopLvlMenu.'AnsiEsc' exe 'menu '.g:DrChipTopLvlMenu.'AnsiEsc.Start:AnsiEsc :AnsiEsc' endif endif let &l:hl= s:hlkeep_{bufnr("%")} " call Dret("AnsiEsc#AnsiEsc") return else let s:AnsiEsc_ft_{bn} = &ft let s:AnsiEsc_enabled_{bn} = 1 " call Decho("enable AnsiEsc highlighting: s:AnsiEsc_ft_".bn."<".s:AnsiEsc_ft_{bn}."> bn#".bn) if !exists('g:no_drchip_menu') && !exists('g:no_ansiesc_menu') if has("gui_running") && has("menu") && &go =~# 'm' " menu support exe 'sil! unmenu '.g:DrChipTopLvlMenu.'AnsiEsc' exe 'menu '.g:DrChipTopLvlMenu.'AnsiEsc.Stop:AnsiEsc :AnsiEsc' endif endif " ----------------- " Conceal Support: {{{2 " ----------------- if has("conceal") if v:version < 703 if &l:conc != 3 let s:conckeep_{bufnr('%')}= &cole setlocal conc=3 " call Decho("l:conc=".&l:conc) endif else if &l:cole != 3 || &l:cocu != "nv" let s:colekeep_{bufnr('%')}= &l:cole let s:cocukeep_{bufnr('%')}= &l:cocu setlocal cole=3 cocu=nv " call Decho("l:cole=".&l:cole." l:cocu=".&l:cocu) endif endif endif endif syn clear if has("conceal") syn match ansiConceal contained conceal "\e\[\(\d*;\)*\d*[A-Za-z]" else syn match ansiConceal contained "\e\[\(\d*;\)*\d*[A-Za-z]" endif " suppress escaped sequences that we don't handle (which may or may not be ansi-compliant) if has("conceal") syn match ansiSuppress conceal '\e\[[0-9;]*[A-Za-z]' syn match ansiSuppress conceal '\e\[?\d*[A-Za-z]' syn match ansiSuppress conceal '\b' else syn match ansiSuppress '\e\[[0-9;]*[A-Za-z]' syn match ansiSuppress '\e\[?\d*[A-Za-z]' syn match ansiSuppress '\b' endif " ------------------------------ " Ansi Escape Sequence Handling: {{{2 " ------------------------------ syn region ansiNone start="\e\[[01;]m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=39;49m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=49;39m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=39m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=49m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=22m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal " disable bold/italic/etc. - no way to disable one attribute, so disable them all syn region ansiNone start="\e\[\%(0;\)\=23m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=24m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=27m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiNone start="\e\[\%(0;\)\=29m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlack start="\e\[;\=0\{0,2};\=30m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRed start="\e\[;\=0\{0,2};\=31m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiGreen start="\e\[;\=0\{0,2};\=32m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiYellow start="\e\[;\=0\{0,2};\=33m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlue start="\e\[;\=0\{0,2};\=34m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiMagenta start="\e\[;\=0\{0,2};\=35m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiCyan start="\e\[;\=0\{0,2};\=36m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiWhite start="\e\[;\=0\{0,2};\=37m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiGray start="\e\[;\=0\{0,2};\=90m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal " set default ansi to white syn region ansiWhite start="\e\[;\=0\{0,2};\=39m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBold start="\e\[;\=0\{0,2};\=1m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldBlack start="\e\[;\=0\{0,2};\=\%(1;30\|30;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal " this is supposed to be bold-black, ie, dark grey, but it doesn't work well " on a lot of displays. We'll settle for non-bold white syn region ansiWhite start="\e\[;\=0\{0,2};\=90m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldRed start="\e\[;\=0\{0,2};\=\%(1;31\|31;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldRed start="\e\[;\=0\{0,2};\=91m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldGreen start="\e\[;\=0\{0,2};\=\%(1;32\|32;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldGreen start="\e\[;\=0\{0,2};\=92m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldYellow start="\e\[;\=0\{0,2};\=\%(1;33\|33;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldYellow start="\e\[;\=0\{0,2};\=93m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldBlue start="\e\[;\=0\{0,2};\=\%(1;34\|34;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldBlue start="\e\[;\=0\{0,2};\=94m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldMagenta start="\e\[;\=0\{0,2};\=\%(1;35\|35;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldMagenta start="\e\[;\=0\{0,2};\=95m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldCyan start="\e\[;\=0\{0,2};\=\%(1;36\|36;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldCyan start="\e\[;\=0\{0,2};\=96m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldWhite start="\e\[;\=0\{0,2};\=\%(1;37\|37;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldWhite start="\e\[;\=0\{0,2};\=\%(1;39\|39;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldWhite start="\e\[;\=0\{0,2};\=97m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBoldGray start="\e\[;\=0\{0,2};\=\%(1;90\|90;0\{0,2}1\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandout start="\e\[;\=0\{0,2};\=\%(1;\)\=3m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;30\|30;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;31\|31;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;32\|32;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;33\|33;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;34\|34;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;35\|35;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;36\|36;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;37\|37;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiStandoutGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(3;90\|90;0\{0,2}3\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalic start="\e\[;\=0\{0,2};\=\%(1;\)\=2m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;30\|30;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;31\|31;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;32\|32;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;33\|33;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;34\|34;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;35\|35;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;36\|36;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;37\|37;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiItalicGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(2;90\|90;0\{0,2}2\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderline start="\e\[;\=0\{0,2};\=\%(1;\)\=4m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;30\|30;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;31\|31;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;32\|32;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;33\|33;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;34\|34;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;35\|35;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;36\|36;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;37\|37;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiUnderlineGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(4;90\|90;0\{0,2}4\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlink start="\e\[;\=0\{0,2};\=\%(1;\)\=5m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;30\|30;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;31\|31;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;32\|32;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;33\|33;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;34\|34;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;35\|35;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;36\|36;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;37\|37;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiBlinkGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(5;90\|90;0\{0,2}5\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlink start="\e\[;\=0\{0,2};\=\%(1;\)\=6m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;30\|30;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;31\|31;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;32\|32;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;33\|33;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;34\|34;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;35\|35;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;36\|36;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;37\|37;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRapidBlinkGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(6;90\|90;0\{0,2}6\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRV start="\e\[;\=0\{0,2};\=\%(1;\)\=7m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVBlack start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;30\|30;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVRed start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;31\|31;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVGreen start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;32\|32;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVYellow start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;33\|33;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVBlue start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;34\|34;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVMagenta start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;35\|35;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVCyan start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;36\|36;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVWhite start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;37\|37;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal syn region ansiRVGray start="\e\[;\=0\{0,2};\=\%(1;\)\=\%(7;90\|90;0\{0,2}7\)m" skip='\e\[K' end="\e\["me=e-2 contains=ansiConceal if v:version >= 703 " "----------------------------------------- " " handles implicit background highlighting " "----------------------------------------- " call Decho("installing implicit background highlighting") syn cluster AnsiDefaultBgGroup contains=ansiBgBoldDefault,ansiBgUnderlineDefault,ansiBgDefaultDefault,ansiBgBlackDefault,ansiBgRedDefault,ansiBgGreenDefault,ansiBgYellowDefault,ansiBgBlueDefault,ansiBgMagentaDefault,ansiBgCyanDefault,ansiBgWhiteDefault,ansiBgGrayDefault syn region ansiDefaultBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(0\{0,2};\)\=49\%(0\{0,2};\)\=m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=@AnsiDefaultBgGroup,ansiConceal syn region ansiBgBoldDefault contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineDefault contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultDefault contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackDefault contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedDefault contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenDefault contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowDefault contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueDefault contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaDefault contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanDefault contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteDefault contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayDefault contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldDefault ansiBold hi link ansiBgUnderlineDefault ansiUnderline hi link ansiBgDefaultDefault ansiDefaultDefault hi link ansiBgBlackDefault ansiBlackDefault hi link ansiBgRedDefault ansiRedDefault hi link ansiBgGreenDefault ansiGreenDefault hi link ansiBgYellowDefault ansiYellowDefault hi link ansiBgBlueDefault ansiBlueDefault hi link ansiBgMagentaDefault ansiMagentaDefault hi link ansiBgCyanDefault ansiCyanDefault hi link ansiBgWhiteDefault ansiWhiteDefault hi link ansiBgGrayDefault ansiGrayDefault syn cluster AnsiBlackBgGroup contains=ansiBgBoldBlack,ansiBgUnderlineBlack,ansiBgDefaultBlack,ansiBgBlackBlack,ansiBgRedBlack,ansiBgGreenBlack,ansiBgYellowBlack,ansiBgBlueBlack,ansiBgMagentaBlack,ansiBgCyanBlack,ansiBgWhiteBlack,ansiBgGrayBlack syn region ansiBlackBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=40\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiBlackBgGroup,ansiConceal syn region ansiBgBoldBlack contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineBlack contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultBlack contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackBlack contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedBlack contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenBlack contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowBlack contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueBlack contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaBlack contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanBlack contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteBlack contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayBlack contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldBlack ansiBoldBlack hi link ansiBgUnderlineBlack ansiUnderlineBlack hi link ansiBgDefaultBlack ansiDefaultBlack hi link ansiBgBlackBlack ansiBlackBlack hi link ansiBgRedBlack ansiRedBlack hi link ansiBgGreenBlack ansiGreenBlack hi link ansiBgYellowBlack ansiYellowBlack hi link ansiBgBlueBlack ansiBlueBlack hi link ansiBgMagentaBlack ansiMagentaBlack hi link ansiBgCyanBlack ansiCyanBlack hi link ansiBgWhiteBlack ansiWhiteBlack hi link ansiBgGrayBlack ansiGrayBlack syn cluster AnsiRedBgGroup contains=ansiBgBoldRed,ansiBgUnderlineRed,ansiBgDefaultRed,ansiBgBlackRed,ansiBgRedRed,ansiBgGreenRed,ansiBgYellowRed,ansiBgBlueRed,ansiBgMagentaRed,ansiBgCyanRed,ansiBgWhiteRed,ansiBgGrayRed syn region ansiRedBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=41\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiRedBgGroup,ansiConceal syn region ansiBgBoldRed contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineRed contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultRed contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackRed contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedRed contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenRed contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowRed contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueRed contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaRed contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanRed contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteRed contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayRed contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldRed ansiBoldRed hi link ansiBgUnderlineRed ansiUnderlineRed hi link ansiBgDefaultRed ansiDefaultRed hi link ansiBgBlackRed ansiBlackRed hi link ansiBgRedRed ansiRedRed hi link ansiBgGreenRed ansiGreenRed hi link ansiBgYellowRed ansiYellowRed hi link ansiBgBlueRed ansiBlueRed hi link ansiBgMagentaRed ansiMagentaRed hi link ansiBgCyanRed ansiCyanRed hi link ansiBgWhiteRed ansiWhiteRed hi link ansiBgGrayRed ansiGrayRed syn cluster AnsiGreenBgGroup contains=ansiBgBoldGreen,ansiBgUnderlineGreen,ansiBgDefaultGreen,ansiBgBlackGreen,ansiBgRedGreen,ansiBgGreenGreen,ansiBgYellowGreen,ansiBgBlueGreen,ansiBgMagentaGreen,ansiBgCyanGreen,ansiBgWhiteGreen,ansiBgGrayGreen syn region ansiGreenBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=42\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiGreenBgGroup,ansiConceal syn region ansiBgBoldGreen contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineGreen contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultGreen contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackGreen contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedGreen contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenGreen contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowGreen contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueGreen contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaGreen contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanGreen contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteGreen contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayGreen contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldGreen ansiBoldGreen hi link ansiBgUnderlineGreen ansiUnderlineGreen hi link ansiBgDefaultGreen ansiDefaultGreen hi link ansiBgBlackGreen ansiBlackGreen hi link ansiBgGreenGreen ansiGreenGreen hi link ansiBgRedGreen ansiRedGreen hi link ansiBgYellowGreen ansiYellowGreen hi link ansiBgBlueGreen ansiBlueGreen hi link ansiBgMagentaGreen ansiMagentaGreen hi link ansiBgCyanGreen ansiCyanGreen hi link ansiBgWhiteGreen ansiWhiteGreen hi link ansiBgGrayGreen ansiGrayGreen syn cluster AnsiYellowBgGroup contains=ansiBgBoldYellow,ansiBgUnderlineYellow,ansiBgDefaultYellow,ansiBgBlackYellow,ansiBgRedYellow,ansiBgGreenYellow,ansiBgYellowYellow,ansiBgBlueYellow,ansiBgMagentaYellow,ansiBgCyanYellow,ansiBgWhiteYellow,ansiBgGrayYellow syn region ansiYellowBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=43\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiYellowBgGroup,ansiConceal syn region ansiBgBoldYellow contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineYellow contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultYellow contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackYellow contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedYellow contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenYellow contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowYellow contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueYellow contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaYellow contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanYellow contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteYellow contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayYellow contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldYellow ansiBoldYellow hi link ansiBgUnderlineYellow ansiUnderlineYellow hi link ansiBgDefaultYellow ansiDefaultYellow hi link ansiBgBlackYellow ansiBlackYellow hi link ansiBgRedYellow ansiRedYellow hi link ansiBgGreenYellow ansiGreenYellow hi link ansiBgYellowYellow ansiYellowYellow hi link ansiBgBlueYellow ansiBlueYellow hi link ansiBgMagentaYellow ansiMagentaYellow hi link ansiBgCyanYellow ansiCyanYellow hi link ansiBgWhiteYellow ansiWhiteYellow hi link ansiBgGrayYellow ansiGrayYellow syn cluster AnsiBlueBgGroup contains=ansiBgBoldBlue,ansiBgUnderlineBlue,ansiBgDefaultBlue,ansiBgBlackBlue,ansiBgRedBlue,ansiBgGreenBlue,ansiBgYellowBlue,ansiBgBlueBlue,ansiBgMagentaBlue,ansiBgCyanBlue,ansiBgWhiteBlue,ansiBgGrayBlue syn region ansiBlueBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=44\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiBlueBgGroup,ansiConceal syn region ansiBgBoldBlue contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineBlue contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultBlue contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackBlue contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedBlue contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenBlue contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowBlue contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueBlue contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaBlue contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanBlue contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteBlue contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayBlue contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldBlue ansiBoldBlue hi link ansiBgUnderlineBlue ansiUnderlineBlue hi link ansiBgDefaultBlue ansiDefaultBlue hi link ansiBgBlackBlue ansiBlackBlue hi link ansiBgRedBlue ansiRedBlue hi link ansiBgGreenBlue ansiGreenBlue hi link ansiBgYellowBlue ansiYellowBlue hi link ansiBgBlueBlue ansiBlueBlue hi link ansiBgMagentaBlue ansiMagentaBlue hi link ansiBgCyanBlue ansiCyanBlue hi link ansiBgWhiteBlue ansiWhiteBlue hi link ansiBgGrayBlue ansiGrayBlue syn cluster AnsiMagentaBgGroup contains=ansiBgBoldMagenta,ansiBgUnderlineMagenta,ansiBgDefaultMagenta,ansiBgBlackMagenta,ansiBgRedMagenta,ansiBgGreenMagenta,ansiBgYellowMagenta,ansiBgBlueMagenta,ansiBgMagentaMagenta,ansiBgCyanMagenta,ansiBgWhiteMagenta,ansiBgGrayMagenta syn region ansiMagentaBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=45\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiMagentaBgGroup,ansiConceal syn region ansiBgBoldMagenta contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineMagenta contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultMagenta contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackMagenta contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedMagenta contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenMagenta contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowMagenta contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueMagenta contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaMagenta contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanMagenta contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteMagenta contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayMagenta contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldMagenta ansiBoldMagenta hi link ansiBgUnderlineMagenta ansiUnderlineMagenta hi link ansiBgDefaultMagenta ansiDefaultMagenta hi link ansiBgBlackMagenta ansiBlackMagenta hi link ansiBgRedMagenta ansiRedMagenta hi link ansiBgGreenMagenta ansiGreenMagenta hi link ansiBgYellowMagenta ansiYellowMagenta hi link ansiBgBlueMagenta ansiBlueMagenta hi link ansiBgMagentaMagenta ansiMagentaMagenta hi link ansiBgCyanMagenta ansiCyanMagenta hi link ansiBgWhiteMagenta ansiWhiteMagenta hi link ansiBgGrayMagenta ansiGrayMagenta syn cluster AnsiCyanBgGroup contains=ansiBgBoldCyan,ansiBgUnderlineCyan,ansiBgDefaultCyan,ansiBgBlackCyan,ansiBgRedCyan,ansiBgGreenCyan,ansiBgYellowCyan,ansiBgBlueCyan,ansiBgMagentaCyan,ansiBgCyanCyan,ansiBgWhiteCyan,ansiBgGrayCyan syn region ansiCyanBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=46\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiCyanBgGroup,ansiConceal syn region ansiBgBoldCyan contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineCyan contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultCyan contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackCyan contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedCyan contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenCyan contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowCyan contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueCyan contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaCyan contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanCyan contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteCyan contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayCyan contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldCyan ansiBoldCyan hi link ansiBgUnderlineCyan ansiUnderlineCyan hi link ansiBgDefaultCyan ansiDefaultCyan hi link ansiBgBlackCyan ansiBlackCyan hi link ansiBgRedCyan ansiRedCyan hi link ansiBgGreenCyan ansiGreenCyan hi link ansiBgYellowCyan ansiYellowCyan hi link ansiBgBlueCyan ansiBlueCyan hi link ansiBgMagentaCyan ansiMagentaCyan hi link ansiBgCyanCyan ansiCyanCyan hi link ansiBgWhiteCyan ansiWhiteCyan hi link ansiBgGrayCyan ansiGrayCyan syn cluster AnsiWhiteBgGroup contains=ansiBgBoldWhite,ansiBgUnderlineWhite,ansiBgDefaultWhite,ansiBgBlackWhite,ansiBgRedWhite,ansiBgGreenWhite,ansiBgYellowWhite,ansiBgBlueWhite,ansiBgMagentaWhite,ansiBgCyanWhite,ansiBgWhiteWhite,ansiBgGrayWhite syn region ansiWhiteBg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=47\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiWhiteBgGroup,ansiConceal syn region ansiBgBoldWhite contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiBgUnderlineWhite contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgDefaultWhite contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlackWhite contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgRedWhite contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGreenWhite contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgYellowWhite contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgBlueWhite contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgMagentaWhite contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgCyanWhite contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgWhiteWhite contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBgGrayWhite contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBgBoldWhite ansiBoldWhite hi link ansiBgUnderlineWhite ansiUnderlineWhite hi link ansiBgDefaultWhite ansiDefaultWhite hi link ansiBgBlackWhite ansiBlackWhite hi link ansiBgRedWhite ansiRedWhite hi link ansiBgGreenWhite ansiGreenWhite hi link ansiBgYellowWhite ansiYellowWhite hi link ansiBgBlueWhite ansiBlueWhite hi link ansiBgMagentaWhite ansiMagentaWhite hi link ansiBgCyanWhite ansiCyanWhite hi link ansiBgWhiteWhite ansiWhiteWhite hi link ansiBgGrayWhite ansiGrayWhite "----------------------------------------- " handles implicit foreground highlighting "----------------------------------------- " call Decho("installing implicit foreground highlighting") syn cluster AnsiDefaultFgGroup contains=ansiFgDefaultBold,ansiFgDefaultUnderline,ansiFgDefaultDefault,ansiFgDefaultBlack,ansiFgDefaultRed,ansiFgDefaultGreen,ansiFgDefaultYellow,ansiFgDefaultBlue,ansiFgDefaultMagenta,ansiFgDefaultCyan,ansiFgDefaultWhite syn region ansiDefaultFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(0;\)\=39\%(;0\)\=m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=@AnsiDefaultFgGroup,ansiConceal syn region ansiFgDefaultBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgDefaultUnerline contained start="\e\[4m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgDefaultWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgDefaultBold ansiDefaultBold hi link ansiFgDefaultUnderline ansiDefaultUnderline hi link ansiFgDefaultDefault ansiDefaultDefault hi link ansiFgDefaultBlack ansiDefaultBlack hi link ansiFgDefaultRed ansiDefaultRed hi link ansiFgDefaultGreen ansiDefaultGreen hi link ansiFgDefaultYellow ansiDefaultYellow hi link ansiFgDefaultBlue ansiDefaultBlue hi link ansiFgDefaultMagenta ansiDefaultMagenta hi link ansiFgDefaultCyan ansiDefaultCyan hi link ansiFgDefaultWhite ansiDefaultWhite syn cluster AnsiBlackFgGroup contains=ansiFgBlackBold,ansiFgBlackUnderline,ansiFgBlackDefault,ansiFgBlackBlack,ansiFgBlackRed,ansiFgBlackGreen,ansiFgBlackYellow,ansiFgBlackBlue,ansiFgBlackMagenta,ansiFgBlackCyan,ansiFgBlackWhite syn region ansiBlackFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=30\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiBlackFgGroup,ansiConceal syn region ansiFgBlackBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgBlackUnerline contained start="\e\[4m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlackWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgBlackBold ansiBlackBold hi link ansiFgBlackUnderline ansiBlackUnderline hi link ansiFgBlackDefault ansiBlackDefault hi link ansiFgBlackBlack ansiBlackBlack hi link ansiFgBlackRed ansiBlackRed hi link ansiFgBlackGreen ansiBlackGreen hi link ansiFgBlackYellow ansiBlackYellow hi link ansiFgBlackBlue ansiBlackBlue hi link ansiFgBlackMagenta ansiBlackMagenta hi link ansiFgBlackCyan ansiBlackCyan hi link ansiFgBlackWhite ansiBlackWhite syn cluster AnsiRedFgGroup contains=ansiFgRedBold,ansiFgRedUnderline,ansiFgRedDefault,ansiFgRedBlack,ansiFgRedRed,ansiFgRedGreen,ansiFgRedYellow,ansiFgRedBlue,ansiFgRedMagenta,ansiFgRedCyan,ansiFgRedWhite syn region ansiRedFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=31\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiRedFgGroup,ansiConceal syn region ansiFgRedBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgRedUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgRedDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgRedWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgRedBold ansiRedBold hi link ansiFgRedUnderline ansiRedUnderline hi link ansiFgRedDefault ansiRedDefault hi link ansiFgRedBlack ansiRedBlack hi link ansiFgRedRed ansiRedRed hi link ansiFgRedGreen ansiRedGreen hi link ansiFgRedYellow ansiRedYellow hi link ansiFgRedBlue ansiRedBlue hi link ansiFgRedMagenta ansiRedMagenta hi link ansiFgRedCyan ansiRedCyan hi link ansiFgRedWhite ansiRedWhite syn cluster AnsiGreenFgGroup contains=ansiFgGreenBold,ansiFgGreenUnderline,ansiFgGreenDefault,ansiFgGreenBlack,ansiFgGreenRed,ansiFgGreenGreen,ansiFgGreenYellow,ansiFgGreenBlue,ansiFgGreenMagenta,ansiFgGreenCyan,ansiFgGreenWhite syn region ansiGreenFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=32\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiGreenFgGroup,ansiConceal syn region ansiFgGreenBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgGreenUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgGreenDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGreenWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgGreenBold ansiGreenBold hi link ansiFgGreenUnderline ansiGreenUnderline hi link ansiFgGreenDefault ansiGreenDefault hi link ansiFgGreenBlack ansiGreenBlack hi link ansiFgGreenGreen ansiGreenGreen hi link ansiFgGreenRed ansiGreenRed hi link ansiFgGreenYellow ansiGreenYellow hi link ansiFgGreenBlue ansiGreenBlue hi link ansiFgGreenMagenta ansiGreenMagenta hi link ansiFgGreenCyan ansiGreenCyan hi link ansiFgGreenWhite ansiGreenWhite syn cluster AnsiYellowFgGroup contains=ansiFgYellowBold,ansiFgYellowUnderline,ansiFgYellowDefault,ansiFgYellowBlack,ansiFgYellowRed,ansiFgYellowGreen,ansiFgYellowYellow,ansiFgYellowBlue,ansiFgYellowMagenta,ansiFgYellowCyan,ansiFgYellowWhite syn region ansiYellowFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=33\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiYellowFgGroup,ansiConceal syn region ansiFgYellowBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgYellowUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgYellowDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgYellowWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgYellowBold ansiYellowBold hi link ansiFgYellowUnderline ansiYellowUnderline hi link ansiFgYellowDefault ansiYellowDefault hi link ansiFgYellowBlack ansiYellowBlack hi link ansiFgYellowRed ansiYellowRed hi link ansiFgYellowGreen ansiYellowGreen hi link ansiFgYellowYellow ansiYellowYellow hi link ansiFgYellowBlue ansiYellowBlue hi link ansiFgYellowMagenta ansiYellowMagenta hi link ansiFgYellowCyan ansiYellowCyan hi link ansiFgYellowWhite ansiYellowWhite syn cluster AnsiBlueFgGroup contains=ansiFgBlueBold,ansiFgBlueUnderline,ansiFgBlueDefault,ansiFgBlueBlack,ansiFgBlueRed,ansiFgBlueGreen,ansiFgBlueYellow,ansiFgBlueBlue,ansiFgBlueMagenta,ansiFgBlueCyan,ansiFgBlueWhite syn region ansiBlueFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=34\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiBlueFgGroup,ansiConceal syn region ansiFgBlueBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgBlueUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgBlueDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgBlueWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgBlueBold ansiBlueBold hi link ansiFgBlueUnderline ansiBlueUnderline hi link ansiFgBlueDefault ansiBlueDefault hi link ansiFgBlueBlack ansiBlueBlack hi link ansiFgBlueRed ansiBlueRed hi link ansiFgBlueGreen ansiBlueGreen hi link ansiFgBlueYellow ansiBlueYellow hi link ansiFgBlueBlue ansiBlueBlue hi link ansiFgBlueMagenta ansiBlueMagenta hi link ansiFgBlueCyan ansiBlueCyan hi link ansiFgBlueWhite ansiBlueWhite syn cluster AnsiMagentaFgGroup contains=ansiFgMagentaBold,ansiFgMagentaUnderline,ansiFgMagentaDefault,ansiFgMagentaBlack,ansiFgMagentaRed,ansiFgMagentaGreen,ansiFgMagentaYellow,ansiFgMagentaBlue,ansiFgMagentaMagenta,ansiFgMagentaCyan,ansiFgMagentaWhite syn region ansiMagentaFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=35\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiMagentaFgGroup,ansiConceal syn region ansiFgMagentaBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgMagentaUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgMagentaDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgMagentaWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgMagentaBold ansiMagentaBold hi link ansiFgMagentaUnderline ansiMagentaUnderline hi link ansiFgMagentaDefault ansiMagentaDefault hi link ansiFgMagentaBlack ansiMagentaBlack hi link ansiFgMagentaRed ansiMagentaRed hi link ansiFgMagentaGreen ansiMagentaGreen hi link ansiFgMagentaYellow ansiMagentaYellow hi link ansiFgMagentaBlue ansiMagentaBlue hi link ansiFgMagentaMagenta ansiMagentaMagenta hi link ansiFgMagentaCyan ansiMagentaCyan hi link ansiFgMagentaWhite ansiMagentaWhite syn cluster AnsiCyanFgGroup contains=ansiFgCyanBold,ansiFgCyanUnderline,ansiFgCyanDefault,ansiFgCyanBlack,ansiFgCyanRed,ansiFgCyanGreen,ansiFgCyanYellow,ansiFgCyanBlue,ansiFgCyanMagenta,ansiFgCyanCyan,ansiFgCyanWhite syn region ansiCyanFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=36\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiCyanFgGroup,ansiConceal syn region ansiFgCyanBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgCyanUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgCyanDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgCyanWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgCyanBold ansiCyanBold hi link ansiFgCyanUnderline ansiCyanUnderline hi link ansiFgCyanDefault ansiCyanDefault hi link ansiFgCyanBlack ansiCyanBlack hi link ansiFgCyanRed ansiCyanRed hi link ansiFgCyanGreen ansiCyanGreen hi link ansiFgCyanYellow ansiCyanYellow hi link ansiFgCyanBlue ansiCyanBlue hi link ansiFgCyanMagenta ansiCyanMagenta hi link ansiFgCyanCyan ansiCyanCyan hi link ansiFgCyanWhite ansiCyanWhite syn cluster AnsiWhiteFgGroup contains=ansiFgWhiteBold,ansiFgWhiteUnderline,ansiFgWhiteDefault,ansiFgWhiteBlack,ansiFgWhiteRed,ansiFgWhiteGreen,ansiFgWhiteYellow,ansiFgWhiteBlue,ansiFgWhiteMagenta,ansiFgWhiteCyan,ansiFgWhiteWhite syn region ansiWhiteFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=37\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiWhiteFgGroup,ansiConceal syn region ansiFgWhiteBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgWhiteUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgWhiteDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgWhiteWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgWhiteBold ansiWhiteBold hi link ansiFgWhiteUnderline ansiWhiteUnderline hi link ansiFgWhiteDefault ansiWhiteDefault hi link ansiFgWhiteBlack ansiWhiteBlack hi link ansiFgWhiteRed ansiWhiteRed hi link ansiFgWhiteGreen ansiWhiteGreen hi link ansiFgWhiteYellow ansiWhiteYellow hi link ansiFgWhiteBlue ansiWhiteBlue hi link ansiFgWhiteMagenta ansiWhiteMagenta hi link ansiFgWhiteCyan ansiWhiteCyan hi link ansiFgWhiteWhite ansiWhiteWhite syn cluster AnsiGrayFgGroup contains=ansiFgGrayBold,ansiFgGrayUnderline,ansiFgGrayDefault,ansiFgGrayBlack,ansiFgGrayRed,ansiFgGrayGreen,ansiFgGrayYellow,ansiFgGrayBlue,ansiFgGrayMagenta,ansiFgGrayCyan,ansiFgGrayWhite syn region ansiGrayFg concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=90\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[039m]" contains=@AnsiGrayFgGroup,ansiConceal syn region ansiFgGrayBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiFgGrayUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiFgGrayDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiFgGrayWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiFgGrayBold ansiGrayBold hi link ansiFgGrayUnderline ansiGrayUnderline hi link ansiFgGrayDefault ansiGrayDefault hi link ansiFgGrayBlack ansiGrayBlack hi link ansiFgGrayRed ansiGrayRed hi link ansiFgGrayGreen ansiGrayGreen hi link ansiFgGrayYellow ansiGrayYellow hi link ansiFgGrayBlue ansiGrayBlue hi link ansiFgGrayMagenta ansiGrayMagenta hi link ansiFgGrayCyan ansiGrayCyan hi link ansiFgGrayWhite ansiGrayWhite syn cluster AnsiBoldGroup contains=ansiUnderlineBoldRegion,ansiDefaultBoldRegion,ansiBlackBoldRegion,ansiWhiteBoldRegion,ansiGrayBoldRegion,ansiRedBoldRegion,ansiGreenBoldRegion,ansiYellowBoldRegion,ansiBlueBoldRegion,ansiMagentaBoldRegion,ansiCyanBoldRegion syn region ansiBoldRegion concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=1;\=m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(0*\|22\)\=m" contains=@AnsiBoldGroup,ansiConceal syn region ansiUnderlineBoldRegion contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiDefaultBoldRegion contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlackBoldRegion contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiRedBoldRegion contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGreenBoldRegion contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiYellowBoldRegion contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlueBoldRegion contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiMagentaBoldRegion contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiCyanBoldRegion contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiWhiteBoldRegion contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGrayBoldRegion contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiBoldRegion ansiBold hi link ansiUnderlineBoldRegion ansiBoldUnderline hi link ansiDefaultBoldRegion ansiBoldDefault hi link ansiBlackBoldRegion ansiBoldBlack hi link ansiRedBoldRegion ansiBoldRed hi link ansiGreenBoldRegion ansiBoldGreen hi link ansiYellowBoldRegion ansiBoldYellow hi link ansiBlueBoldRegion ansiBoldBlue hi link ansiMagentaBoldRegion ansiBoldMagenta hi link ansiCyanBoldRegion ansiBoldCyan hi link ansiWhiteBoldRegion ansiBoldWhite hi link ansiGrayBoldRegion ansiBoldGray syn cluster AnsiUnderlineGroup contains=ansiBoldUnderlineRegion,ansiDefaultUnderlineRegion,ansiBlackUnderlineRegion,ansiWhiteUnderlineRegion,ansiGrayUnderlineRegion,ansiRedUnderlineRegion,ansiGreenUnderlineRegion,ansiYellowUnderlineRegion,ansiBlueUnderlineRegion,ansiMagentaUnderlineRegion,ansiCyanUnderlineRegion syn region ansiUnderlineRegion concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=4;\=m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(0*\|24\)\=m" contains=@AnsiUnderlineGroup,ansiConceal syn region ansiBoldUnderlineRegion contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiDefaultUnderlineRegion contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlackUnderlineRegion contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiRedUnderlineRegion contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGreenUnderlineRegion contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiYellowUnderlineRegion contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlueUnderlineRegion contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiMagentaUnderlineRegion contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiCyanUnderlineRegion contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiWhiteUnderlineRegion contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGrayUnderlineRegion contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiUnderlineRegion ansiUnderline hi link ansiBoldUnderlineRegion ansiBoldUnderline hi link ansiDefaultUnderlineRegion ansiUnderlineDefault hi link ansiBlackUnderlineRegion ansiUnderlineBlack hi link ansiRedUnderlineRegion ansiUnderlineRed hi link ansiGreenUnderlineRegion ansiUnderlineGreen hi link ansiYellowUnderlineRegion ansiUnderlineYellow hi link ansiBlueUnderlineRegion ansiUnderlineBlue hi link ansiMagentaUnderlineRegion ansiUnderlineMagenta hi link ansiCyanUnderlineRegion ansiUnderlineCyan hi link ansiWhiteUnderlineRegion ansiUnderlineWhite hi link ansiGrayUnderlineRegion ansiUnderlineGray "----------------------------------------- " handles implicit reverse background highlighting "----------------------------------------- " call Decho("installing implicit reverse background highlighting") syn cluster AnsiReverseGroup contains=ansiUnderlineReverse,ansiBoldReverse,ansiDefaultReverse,ansiBlackReverse,ansiWhiteReverse,ansiGrayReverse,ansiRedReverse,ansiGreenReverse,ansiYellowReverse,ansiBlueReverse,ansiMagentaReverse,ansiCyanReverse,ansiDefaultReverseBg,ansiBlackReverseBg,ansiRedReverseBg,ansiGreenReverseBg,ansiYellowReverseBg,ansiBlueReverseBg,ansiMagentaReverseBg,ansiCyanReverseBg,ansiWhiteReverseBg,ansiDefaultReverseFg,ansiBlackReverseFg,ansiWhiteReverseFg,ansiGrayReverseFg,ansiRedReverseFg,ansiGreenReverseFg,ansiYellowReverseFg,ansiBlueReverseFg,ansiMagentaReverseFg,ansiCyanReverseFg,ansiReverseBoldRegion,ansiReverseUnderlineRegion syn region ansiReverseRegion concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=7;\=m" skip='\e\[K' end="\ze\e\[\%(0\|27\)\=m" contains=@AnsiReverseGroup,ansiConceal syn region ansiUnderlineReverse contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiBgBoldReverse contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiDefaultReverse contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlackReverse contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiRedReverse contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGreenReverse contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiYellowReverse contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlueReverse contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiMagentaReverse contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiCyanReverse contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiWhiteReverse contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGrayReverse contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseRegion ansiReverse hi link ansiUnderlineReverse ansiReverseUnderline hi link ansiBgBoldReverse ansiReverseBold hi link ansiDefaultReverse ansiReverseDefault hi link ansiBlackReverse ansiReverseBlack hi link ansiRedReverse ansiReverseRed hi link ansiGreenReverse ansiReverseGreen hi link ansiYellowReverse ansiReverseYellow hi link ansiBlueReverse ansiReverseBlue hi link ansiMagentaReverse ansiReverseMagenta hi link ansiCyanReverse ansiReverseCyan hi link ansiWhiteReverse ansiReverseWhite hi link ansiGrayReverse ansiReverseGray syn cluster AnsiDefaultReverseBgGroup contains=ansiReverseBgBoldDefault,ansiReverseBgUnderlineDefault,ansiReverseBgDefaultDefault,ansiReverseBgBlackDefault,ansiReverseBgRedDefault,ansiReverseBgGreenDefault,ansiReverseBgYellowDefault,ansiReverseBgBlueDefault,ansiReverseBgMagentaDefault,ansiReverseBgCyanDefault,ansiReverseBgWhiteDefault,ansiReverseBgGrayDefault syn region ansiDefaultReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(0\{0,2};\)\=49\%(0\{0,2};\)\=m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=@AnsiDefaultBgGroup,ansiConceal syn region ansiReverseBgBoldDefault contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineDefault contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultDefault contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackDefault contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedDefault contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenDefault contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowDefault contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueDefault contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaDefault contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanDefault contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteDefault contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayDefault contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldDefault ansiReverseBold hi link ansiReverseBgUnderlineDefault ansiReverseUnderline hi link ansiReverseBgDefaultDefault ansiDefaultDefault hi link ansiReverseBgBlackDefault ansiDefaultBlack hi link ansiReverseBgRedDefault ansiDefaultRed hi link ansiReverseBgGreenDefault ansiDefaultGreen hi link ansiReverseBgYellowDefault ansiDefaultYellow hi link ansiReverseBgBlueDefault ansiDefaultBlue hi link ansiReverseBgMagentaDefault ansiDefaultMagenta hi link ansiReverseBgCyanDefault ansiDefaultCyan hi link ansiReverseBgWhiteDefault ansiDefaultWhite hi link ansiReverseBgGrayDefault ansiDefaultGray syn cluster AnsiBlackReverseBgGroup contains=ansiReverseBgBoldBlack,ansiReverseBgUnderlineBlack,ansiReverseBgDefaultBlack,ansiReverseBgBlackBlack,ansiReverseBgRedBlack,ansiReverseBgGreenBlack,ansiReverseBgYellowBlack,ansiReverseBgBlueBlack,ansiReverseBgMagentaBlack,ansiReverseBgCyanBlack,ansiReverseBgWhiteBlack,ansiReverseBgGrayBlack syn region ansiBlackReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=40\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiBlackReverseBgGroup,ansiConceal syn region ansiReverseBgBoldBlack contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineBlack contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultBlack contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackBlack contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedBlack contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenBlack contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowBlack contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueBlack contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaBlack contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanBlack contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteBlack contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayBlack contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldBlack ansiBlackBold hi link ansiReverseBgUnderlineBlack ansiBlackUnderline hi link ansiReverseBgDefaultBlack ansiDefaultBlack hi link ansiReverseBgBlackBlack ansiBlackBlack hi link ansiReverseBgRedBlack ansiBlackRed hi link ansiReverseBgGreenBlack ansiBlackGreen hi link ansiReverseBgYellowBlack ansiBlackYellow hi link ansiReverseBgBlueBlack ansiBlackBlue hi link ansiReverseBgMagentaBlack ansiBlackMagenta hi link ansiReverseBgCyanBlack ansiBlackCyan hi link ansiReverseBgWhiteBlack ansiBlackWhite hi link ansiReverseBgGrayBlack ansiBlackGray syn cluster AnsiRedReverseBgGroup contains=ansiReverseBgBoldRed,ansiReverseBgUnderlineRed,ansiReverseBgDefaultRed,ansiReverseBgBlackRed,ansiReverseBgRedRed,ansiReverseBgGreenRed,ansiReverseBgYellowRed,ansiReverseBgBlueRed,ansiReverseBgMagentaRed,ansiReverseBgCyanRed,ansiReverseBgWhiteRed,ansiReverseBgGrayRed syn region ansiRedReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=41\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiRedReverseBgGroup,ansiConceal syn region ansiReverseBgBoldRed contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineRed contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultRed contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackRed contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedRed contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenRed contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowRed contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueRed contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaRed contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanRed contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteRed contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayRed contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldRed ansiRedBold hi link ansiReverseBgUnderlineRed ansiRedUnderline hi link ansiReverseBgDefaultRed ansiRedDefault hi link ansiReverseBgBlackRed ansiRedBlack hi link ansiReverseBgRedRed ansiRedRed hi link ansiReverseBgGreenRed ansiRedGreen hi link ansiReverseBgYellowRed ansiRedYellow hi link ansiReverseBgBlueRed ansiRedBlue hi link ansiReverseBgMagentaRed ansiRedMagenta hi link ansiReverseBgCyanRed ansiRedCyan hi link ansiReverseBgWhiteRed ansiRedWhite hi link ansiReverseBgGrayRed ansiRedGray syn cluster AnsiGreenReverseBgGroup contains=ansiReverseBgBoldGreen,ansiReverseBgUnderlineGreen,ansiReverseBgDefaultGreen,ansiReverseBgBlackGreen,ansiReverseBgRedGreen,ansiReverseBgGreenGreen,ansiReverseBgYellowGreen,ansiReverseBgBlueGreen,ansiReverseBgMagentaGreen,ansiReverseBgCyanGreen,ansiReverseBgWhiteGreen,ansiReverseBgGrayGreen syn region ansiGreenReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=42\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiGreenReverseBgGroup,ansiConceal syn region ansiReverseBgBoldGreen contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineGreen contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultGreen contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackGreen contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedGreen contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenGreen contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowGreen contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueGreen contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaGreen contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanGreen contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteGreen contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayGreen contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldGreen ansiGreenBold hi link ansiReverseBgUnderlineGreen ansiGreenUnderline hi link ansiReverseBgDefaultGreen ansiGreenDefault hi link ansiReverseBgBlackGreen ansiGreenBlack hi link ansiReverseBgGreenGreen ansiGreenGreen hi link ansiReverseBgGreenGreen ansiGreenGreen hi link ansiReverseBgYellowGreen ansiGreenYellow hi link ansiReverseBgBlueGreen ansiGreenBlue hi link ansiReverseBgMagentaGreen ansiGreenMagenta hi link ansiReverseBgCyanGreen ansiGreenCyan hi link ansiReverseBgWhiteGreen ansiGreenWhite hi link ansiReverseBgGrayGreen ansiGreenGray syn cluster AnsiYellowReverseBgGroup contains=ansiReverseFgBoldYellow,ansiReverseFgUnderlineYellow,ansiReverseFgDefaultYellow,ansiReverseFgBlackYellow,ansiReverseFgRedYellow,ansiReverseFgGreenYellow,ansiReverseFgYellowYellow,ansiReverseFgBlueYellow,ansiReverseFgMagentaYellow,ansiReverseFgCyanYellow,ansiReverseFgWhiteYellow,ansiReverseFgGrayYellow syn region ansiYellowReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=43\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiYellowReverseBgGroup,ansiConceal syn region ansiReverseFgBoldYellow contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgUnderlineYellow contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgDefaultYellow contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackYellow contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedYellow contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenYellow contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowYellow contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueYellow contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaYellow contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanYellow contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteYellow contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayYellow contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseFgBoldYellow ansiYellowBold hi link ansiReverseFgUnderlineYellow ansiYellowUnderline hi link ansiReverseFgDefaultYellow ansiYellowDefault hi link ansiReverseFgBlackYellow ansiYellowBlack hi link ansiReverseFgYellowYellow ansiYellowYellow hi link ansiReverseFgGreenYellow ansiYellowGreen hi link ansiReverseFgYellowYellow ansiYellowYellow hi link ansiReverseFgBlueYellow ansiYellowBlue hi link ansiReverseFgMagentaYellow ansiYellowMagenta hi link ansiReverseFgCyanYellow ansiYellowCyan hi link ansiReverseFgWhiteYellow ansiYellowWhite hi link ansiReverseFgGrayYellow ansiYellowGray syn cluster AnsiBlueReverseBgGroup contains=ansiReverseBgBoldBlue,ansiReverseBgUnderlineBlue,ansiReverseBgDefaultBlue,ansiReverseBgBlackBlue,ansiReverseBgRedBlue,ansiReverseBgGreenBlue,ansiReverseBgYellowBlue,ansiReverseBgBlueBlue,ansiReverseBgMagentaBlue,ansiReverseBgCyanBlue,ansiReverseBgWhiteBlue,ansiReverseBgGrayBlue syn region ansiBlueReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=44\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiBlueReverseBgGroup,ansiConceal syn region ansiReverseBgBoldBlue contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineBlue contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultBlue contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackBlue contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedBlue contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenBlue contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowBlue contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueBlue contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaBlue contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanBlue contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteBlue contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayBlue contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldBlue ansiBlueBold hi link ansiReverseBgUnderlineBlue ansiBlueUnderline hi link ansiReverseBgDefaultBlue ansiBlueDefault hi link ansiReverseBgBlackBlue ansiBlueBlack hi link ansiReverseBgBlueBlue ansiBlueBlue hi link ansiReverseBgGreenBlue ansiBlueGreen hi link ansiReverseBgYellowBlue ansiBlueYellow hi link ansiReverseBgBlueBlue ansiBlueBlue hi link ansiReverseBgMagentaBlue ansiBlueMagenta hi link ansiReverseBgCyanBlue ansiBlueCyan hi link ansiReverseBgWhiteBlue ansiBlueWhite hi link ansiReverseBgGrayBlue ansiBlueGray syn cluster AnsiMagentaReverseBgGroup contains=ansiReverseBgBoldMagenta,ansiReverseBgUnderlineMagenta,ansiReverseBgDefaultMagenta,ansiReverseBgBlackMagenta,ansiReverseBgRedMagenta,ansiReverseBgGreenMagenta,ansiReverseBgYellowMagenta,ansiReverseBgBlueMagenta,ansiReverseBgMagentaMagenta,ansiReverseBgCyanMagenta,ansiReverseBgWhiteMagenta,ansiReverseBgGrayMagenta syn region ansiMagentaReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=45\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiMagentaReverseBgGroup,ansiConceal syn region ansiReverseBgBoldMagenta contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineMagenta contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultMagenta contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackMagenta contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedMagenta contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenMagenta contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowMagenta contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueMagenta contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaMagenta contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanMagenta contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteMagenta contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayMagenta contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldMagenta ansiMagentaBold hi link ansiReverseBgUnderlineMagenta ansiMagentaUnderline hi link ansiReverseBgDefaultMagenta ansiMagentaDefault hi link ansiReverseBgBlackMagenta ansiMagentaBlack hi link ansiReverseBgMagentaMagenta ansiMagentaMagenta hi link ansiReverseBgGreenMagenta ansiMagentaGreen hi link ansiReverseBgYellowMagenta ansiMagentaYellow hi link ansiReverseBgBlueMagenta ansiMagentaBlue hi link ansiReverseBgMagentaMagenta ansiMagentaMagenta hi link ansiReverseBgCyanMagenta ansiMagentaCyan hi link ansiReverseBgWhiteMagenta ansiMagentaWhite hi link ansiReverseBgGrayMagenta ansiMagentaGray syn cluster AnsiCyanReverseBgGroup contains=ansiReverseBgBoldCyan,ansiReverseBgUnderlineCyan,ansiReverseBgDefaultCyan,ansiReverseBgBlackCyan,ansiReverseBgRedCyan,ansiReverseBgGreenCyan,ansiReverseBgYellowCyan,ansiReverseBgBlueCyan,ansiReverseBgMagentaCyan,ansiReverseBgCyanCyan,ansiReverseBgWhiteCyan,ansiReverseBgGrayCyan syn region ansiCyanReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=46\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiCyanReverseBgGroup,ansiConceal syn region ansiReverseBgBoldCyan contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineCyan contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultCyan contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackCyan contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedCyan contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenCyan contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowCyan contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueCyan contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaCyan contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanCyan contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteCyan contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayCyan contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldCyan ansiCyanBold hi link ansiReverseBgUnderlineCyan ansiCyanUnderline hi link ansiReverseBgDefaultCyan ansiCyanDefault hi link ansiReverseBgBlackCyan ansiCyanBlack hi link ansiReverseBgCyanCyan ansiCyanCyan hi link ansiReverseBgGreenCyan ansiCyanGreen hi link ansiReverseBgYellowCyan ansiCyanYellow hi link ansiReverseBgBlueCyan ansiCyanBlue hi link ansiReverseBgMagentaCyan ansiCyanMagenta hi link ansiReverseBgCyanCyan ansiCyanCyan hi link ansiReverseBgWhiteCyan ansiCyanWhite hi link ansiReverseBgGrayCyan ansiCyanGray syn cluster AnsiWhiteReverseBgGroup contains=ansiReverseBgBoldWhite,ansiReverseBgUnderlineWhite,ansiReverseBgDefaultWhite,ansiReverseBgBlackWhite,ansiReverseBgRedWhite,ansiReverseBgGreenWhite,ansiReverseBgYellowWhite,ansiReverseBgBlueWhite,ansiReverseBgMagentaWhite,ansiReverseBgCyanWhite,ansiReverseBgWhiteWhite,ansiReverseBgGrayWhite syn region ansiWhiteReverseBg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=47\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=49m\|\ze\e\[[04m]" contains=@AnsiWhiteReverseBgGroup,ansiConceal syn region ansiReverseBgBoldWhite contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgUnderlineWhite contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseBgDefaultWhite contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlackWhite contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgRedWhite contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGreenWhite contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgYellowWhite contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgBlueWhite contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgMagentaWhite contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgCyanWhite contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgWhiteWhite contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiReverseBgGrayWhite contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBgBoldWhite ansiWhiteBold hi link ansiReverseBgUnderlineWhite ansiWhiteUnderline hi link ansiReverseBgDefaultWhite ansiWhiteDefault hi link ansiReverseBgBlackWhite ansiWhiteBlack hi link ansiReverseBgRedWhite ansiWhiteRed hi link ansiReverseBgGreenWhite ansiWhiteGreen hi link ansiReverseBgYellowWhite ansiWhiteYellow hi link ansiReverseBgBlueWhite ansiWhiteBlue hi link ansiReverseBgMagentaWhite ansiWhiteMagenta hi link ansiReverseBgCyanWhite ansiWhiteCyan hi link ansiReverseBgWhiteWhite ansiWhiteWhite hi link ansiReverseBgGrayWhite ansiWhiteGray "----------------------------------------- " handles implicit reverse foreground highlighting "----------------------------------------- " call Decho("installing implicit reverse foreground highlighting") syn cluster AnsiDefaultReverseFgGroup contains=ansiReverseFgDefaultBold,ansiReverseFgDefaultUnderline,ansiReverseFgDefaultDefault,ansiReverseFgDefaultBlack,ansiReverseFgDefaultRed,ansiReverseFgDefaultGreen,ansiReverseFgDefaultYellow,ansiReverseFgDefaultBlue,ansiReverseFgDefaultMagenta,ansiReverseFgDefaultCyan,ansiReverseFgDefaultWhite syn region ansiDefaultReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=39\%(;1\)\=m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=@AnsiDefaultReverseFgGroup,ansiConceal syn region ansiReverseFgDefaultBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgDefaultUnerline contained start="\e\[4m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgDefaultWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiDefaultReverseFg ansiReverseDefault hi link ansiReverseFgDefaultBold ansiBoldDefault hi link ansiReverseFgDefaultUnderline ansiUnderlineDefault hi link ansiReverseFgDefaultDefault ansiDefaultDefault hi link ansiReverseFgDefaultBlack ansiBlackDefault hi link ansiReverseFgDefaultRed ansiRedDefault hi link ansiReverseFgDefaultGreen ansiGreenDefault hi link ansiReverseFgDefaultYellow ansiYellowDefault hi link ansiReverseFgDefaultBlue ansiBlueDefault hi link ansiReverseFgDefaultMagenta ansiMagentaDefault hi link ansiReverseFgDefaultCyan ansiCyanDefault hi link ansiReverseFgDefaultWhite ansiWhiteDefault syn cluster AnsiBlackReverseFgGroup contains=ansiReverseFgBlackBold,ansiReverseFgBlackUnderline,ansiReverseFgBlackDefault,ansiReverseFgBlackBlack,ansiReverseFgBlackRed,ansiReverseFgBlackGreen,ansiReverseFgBlackYellow,ansiReverseFgBlackBlue,ansiReverseFgBlackMagenta,ansiReverseFgBlackCyan,ansiReverseFgBlackWhite syn region ansiBlackReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=30\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiBlackReverseFgGroup,ansiConceal syn region ansiReverseFgBlackBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgBlackUnerline contained start="\e\[4m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlackWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiBlackReverseFg ansiReverseBlack hi link ansiReverseFgBlackBold ansiBoldBlack hi link ansiReverseFgBlackUnderline ansiUnderlineBlack hi link ansiReverseFgBlackDefault ansiDefaultBlack hi link ansiReverseFgBlackBlack ansiBlackBlack hi link ansiReverseFgBlackRed ansiRedBlack hi link ansiReverseFgBlackGreen ansiGreenBlack hi link ansiReverseFgBlackYellow ansiYellowBlack hi link ansiReverseFgBlackBlue ansiBlueBlack hi link ansiReverseFgBlackMagenta ansiMagentaBlack hi link ansiReverseFgBlackCyan ansiCyanBlack hi link ansiReverseFgBlackWhite ansiWhiteBlack syn cluster AnsiRedReverseFgGroup contains=ansiReverseFgRedBold,ansiReverseFgRedUnderline,ansiReverseFgRedDefault,ansiReverseFgRedBlack,ansiReverseFgRedRed,ansiReverseFgRedGreen,ansiReverseFgRedYellow,ansiReverseFgRedBlue,ansiReverseFgRedMagenta,ansiReverseFgRedCyan,ansiReverseFgRedWhite syn region ansiRedReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=31\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiRedReverseFgGroup,ansiConceal syn region ansiReverseFgRedBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgRedUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgRedDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgRedWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiRedReverseFg ansiReverseRed hi link ansiReverseFgRedBold ansiBoldRed hi link ansiReverseFgRedUnderline ansiUnderlineRed hi link ansiReverseFgRedDefault ansiDefaultRed hi link ansiReverseFgRedBlack ansiBlackRed hi link ansiReverseFgRedRed ansiRedRed hi link ansiReverseFgRedGreen ansiGreenRed hi link ansiReverseFgRedYellow ansiYellowRed hi link ansiReverseFgRedBlue ansiBlueRed hi link ansiReverseFgRedMagenta ansiMagentaRed hi link ansiReverseFgRedCyan ansiCyanRed hi link ansiReverseFgRedWhite ansiWhiteRed syn cluster AnsiGreenReverseFgGroup contains=ansiReverseFgGreenBold,ansiReverseFgGreenUnderline,ansiReverseFgGreenDefault,ansiReverseFgGreenBlack,ansiReverseFgGreenRed,ansiReverseFgGreenGreen,ansiReverseFgGreenYellow,ansiReverseFgGreenBlue,ansiReverseFgGreenMagenta,ansiReverseFgGreenCyan,ansiReverseFgGreenWhite syn region ansiGreenReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=32\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiGreenReverseFgGroup,ansiConceal syn region ansiReverseFgGreenBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgGreenUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgGreenDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGreenWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiGreenReverseFg ansiReverseGreen hi link ansiReverseFgGreenBold ansiBoldGreen hi link ansiReverseFgGreenUnderline ansiUnderlineGreen hi link ansiReverseFgGreenDefault ansiDefaultGreen hi link ansiReverseFgGreenBlack ansiBlackGreen hi link ansiReverseFgGreenGreen ansiGreenGreen hi link ansiReverseFgGreenRed ansiRedGreen hi link ansiReverseFgGreenYellow ansiYellowGreen hi link ansiReverseFgGreenBlue ansiBlueGreen hi link ansiReverseFgGreenMagenta ansiMagentaGreen hi link ansiReverseFgGreenCyan ansiCyanGreen hi link ansiReverseFgGreenWhite ansiWhiteGreen syn cluster AnsiYellowReverseFgGroup contains=ansiReverseFgYellowBold,ansiReverseFgYellowUnderline,ansiReverseFgYellowDefault,ansiReverseFgYellowBlack,ansiReverseFgYellowRed,ansiReverseFgYellowGreen,ansiReverseFgYellowYellow,ansiReverseFgYellowBlue,ansiReverseFgYellowMagenta,ansiReverseFgYellowCyan,ansiReverseFgYellowWhite syn region ansiYellowReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=33\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiYellowReverseFgGroup,ansiConceal syn region ansiReverseFgYellowBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgYellowUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgYellowDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgYellowWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiYellowReverseFg ansiReverseYellow hi link ansiReverseFgYellowBold ansiBoldYellow hi link ansiReverseFgYellowUnderline ansiUnderlineYellow hi link ansiReverseFgYellowDefault ansiDefaultYellow hi link ansiReverseFgYellowBlack ansiBlackYellow hi link ansiReverseFgYellowRed ansiRedYellow hi link ansiReverseFgYellowGreen ansiGreenYellow hi link ansiReverseFgYellowYellow ansiYellowYellow hi link ansiReverseFgYellowBlue ansiBlueYellow hi link ansiReverseFgYellowMagenta ansiMagentaYellow hi link ansiReverseFgYellowCyan ansiCyanYellow hi link ansiReverseFgYellowWhite ansiWhiteYellow syn cluster AnsiBlueReverseFgGroup contains=ansiReverseFgBlueBold,ansiReverseFgBlueUnderline,ansiReverseFgBlueDefault,ansiReverseFgBlueBlack,ansiReverseFgBlueRed,ansiReverseFgBlueGreen,ansiReverseFgBlueYellow,ansiReverseFgBlueBlue,ansiReverseFgBlueMagenta,ansiReverseFgBlueCyan,ansiReverseFgBlueWhite syn region ansiBlueReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=34\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiBlueReverseFgGroup,ansiConceal syn region ansiReverseFgBlueBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgBlueUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgBlueDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgBlueWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiBlueReverseFg ansiReverseBlue hi link ansiReverseFgBlueBold ansiBoldBlue hi link ansiReverseFgBlueUnderline ansiUnderlineBlue hi link ansiReverseFgBlueDefault ansiDefaultBlue hi link ansiReverseFgBlueBlack ansiBlackBlue hi link ansiReverseFgBlueRed ansiRedBlue hi link ansiReverseFgBlueGreen ansiGreenBlue hi link ansiReverseFgBlueYellow ansiYellowBlue hi link ansiReverseFgBlueBlue ansiBlueBlue hi link ansiReverseFgBlueMagenta ansiMagentaBlue hi link ansiReverseFgBlueCyan ansiCyanBlue hi link ansiReverseFgBlueWhite ansiWhiteBlue syn cluster AnsiMagentaReverseFgGroup contains=ansiReverseFgMagentaBold,ansiReverseFgMagentaUnderline,ansiReverseFgMagentaDefault,ansiReverseFgMagentaBlack,ansiReverseFgMagentaRed,ansiReverseFgMagentaGreen,ansiReverseFgMagentaYellow,ansiReverseFgMagentaBlue,ansiReverseFgMagentaMagenta,ansiReverseFgMagentaCyan,ansiReverseFgMagentaWhite syn region ansiMagentaReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=35\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiMagentaReverseFgGroup,ansiConceal syn region ansiReverseFgMagentaBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgMagentaUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgMagentaDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgMagentaWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiMagentaReverseFg ansiReverseMagenta hi link ansiReverseFgMagentaBold ansiBoldMagenta hi link ansiReverseFgMagentaUnderline ansiUnderlineMagenta hi link ansiReverseFgMagentaDefault ansiDefaultMagenta hi link ansiReverseFgMagentaBlack ansiBlackMagenta hi link ansiReverseFgMagentaRed ansiRedMagenta hi link ansiReverseFgMagentaGreen ansiGreenMagenta hi link ansiReverseFgMagentaYellow ansiYellowMagenta hi link ansiReverseFgMagentaBlue ansiBlueMagenta hi link ansiReverseFgMagentaMagenta ansiMagentaMagenta hi link ansiReverseFgMagentaCyan ansiCyanMagenta hi link ansiReverseFgMagentaWhite ansiWhiteMagenta syn cluster AnsiCyanReverseFgGroup contains=ansiReverseFgCyanBold,ansiReverseFgCyanUnderline,ansiReverseFgCyanDefault,ansiReverseFgCyanBlack,ansiReverseFgCyanRed,ansiReverseFgCyanGreen,ansiReverseFgCyanYellow,ansiReverseFgCyanBlue,ansiReverseFgCyanMagenta,ansiReverseFgCyanCyan,ansiReverseFgCyanWhite syn region ansiCyanReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=36\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiCyanReverseFgGroup,ansiConceal syn region ansiReverseFgCyanBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgCyanUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgCyanDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgCyanWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiCyanReverseFg ansiReverseCyan hi link ansiReverseFgCyanBold ansiBoldCyan hi link ansiReverseFgCyanUnderline ansiUnderlineCyan hi link ansiReverseFgCyanDefault ansiDefaultCyan hi link ansiReverseFgCyanBlack ansiBlackCyan hi link ansiReverseFgCyanRed ansiRedCyan hi link ansiReverseFgCyanGreen ansiGreenCyan hi link ansiReverseFgCyanYellow ansiYellowCyan hi link ansiReverseFgCyanBlue ansiBlueCyan hi link ansiReverseFgCyanMagenta ansiMagentaCyan hi link ansiReverseFgCyanCyan ansiCyanCyan hi link ansiReverseFgCyanWhite ansiWhiteCyan syn cluster AnsiWhiteReverseFgGroup contains=ansiReverseFgWhiteBold,ansiReverseFgWhiteUnderline,ansiReverseFgWhiteDefault,ansiReverseFgWhiteBlack,ansiReverseFgWhiteRed,ansiReverseFgWhiteGreen,ansiReverseFgWhiteYellow,ansiReverseFgWhiteBlue,ansiReverseFgWhiteMagenta,ansiReverseFgWhiteCyan,ansiReverseFgWhiteWhite syn region ansiWhiteReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=37\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[03m]" contains=@AnsiWhiteReverseFgGroup,ansiConceal syn region ansiReverseFgWhiteBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgWhiteUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgWhiteDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgWhiteWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiWhiteReverseFg ansiReverseWhite hi link ansiReverseFgWhiteBold ansiBoldWhite hi link ansiReverseFgWhiteUnderline ansiUnderlineWhite hi link ansiReverseFgWhiteDefault ansiDefaultWhite hi link ansiReverseFgWhiteBlack ansiBlackWhite hi link ansiReverseFgWhiteRed ansiRedWhite hi link ansiReverseFgWhiteGreen ansiGreenWhite hi link ansiReverseFgWhiteYellow ansiYellowWhite hi link ansiReverseFgWhiteBlue ansiBlueWhite hi link ansiReverseFgWhiteMagenta ansiMagentaWhite hi link ansiReverseFgWhiteCyan ansiCyanWhite hi link ansiReverseFgWhiteWhite ansiWhiteWhite syn cluster AnsiGrayReverseFgGroup contains=ansiReverseFgGrayBold,ansiReverseFgGrayUnderline,ansiReverseFgGrayDefault,ansiReverseFgGrayBlack,ansiReverseFgGrayRed,ansiReverseFgGrayGreen,ansiReverseFgGrayYellow,ansiReverseFgGrayBlue,ansiReverseFgGrayMagenta,ansiReverseFgGrayCyan,ansiReverseFgGrayWhite syn region ansiGrayReverseFg contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=\%(1;\)\=90\%(;1\)\=m" skip='\e\[K' end="\e\[\%(0*;*\)\=39m\|\ze\e\[[039m]" contains=@AnsiGrayReverseFgGroup,ansiConceal syn region ansiReverseFgGrayBold contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgGrayUnderline contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiReverseFgGrayDefault contained start="\e\[49m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayBlack contained start="\e\[40m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayRed contained start="\e\[41m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayGreen contained start="\e\[42m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayYellow contained start="\e\[43m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayBlue contained start="\e\[44m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayMagenta contained start="\e\[45m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayCyan contained start="\e\[46m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal syn region ansiReverseFgGrayWhite contained start="\e\[47m" skip='\e\[K' end="\e\[[04m]"me=e-3 contains=ansiConceal hi link ansiGrayReverseFg ansiReverseGray hi link ansiReverseFgGrayBold ansiBoldGray hi link ansiReverseFgGrayUnderline ansiUnderlineGray hi link ansiReverseFgGrayDefault ansiDefaultGray hi link ansiReverseFgGrayBlack ansiBlackGray hi link ansiReverseFgGrayRed ansiRedGray hi link ansiReverseFgGrayGreen ansiGreenGray hi link ansiReverseFgGrayYellow ansiYellowGray hi link ansiReverseFgGrayBlue ansiBlueGray hi link ansiReverseFgGrayMagenta ansiMagentaGray hi link ansiReverseFgGrayCyan ansiCyanGray hi link ansiReverseFgGrayWhite ansiWhiteGray syn cluster AnsiReverseBoldGroup contains=ansiUnderlineReverseBoldRegion,ansiDefaultReverseBoldRegion,ansiBlackReverseBoldRegion,ansiWhiteReverseBoldRegion,ansiGrayReverseBoldRegion,ansiRedReverseBoldRegion,ansiGreenReverseBoldRegion,ansiYellowReverseBoldRegion,ansiBlueReverseBoldRegion,ansiMagentaReverseBoldRegion,ansiCyanReverseBoldRegion syn region ansiReverseBoldRegion contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=1;\=m" end="\ze\e\[\%(0*;*\)\=\%(0*\|22\)\=m" contains=@AnsiBoldGroup,ansiConceal syn region ansiUnderlineReverseBoldRegion contained start="\e\[4m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(24\|0*\)\=m" contains=ansiConceal syn region ansiDefaultReverseBoldRegion contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlackReverseBoldRegion contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiRedReverseBoldRegion contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGreenReverseBoldRegion contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiYellowReverseBoldRegion contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlueReverseBoldRegion contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiMagentaReverseBoldRegion contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiCyanReverseBoldRegion contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiWhiteReverseBoldRegion contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGrayReverseBoldRegion contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseBoldRegion ansiReverseBold hi link ansiUnderlineReverseBoldRegion ansiReverseBoldUnderline hi link ansiDefaultReverseBoldRegion ansiDefaultBold hi link ansiBlackReverseBoldRegion ansiBlackBold hi link ansiRedReverseBoldRegion ansiRedBold hi link ansiGreenReverseBoldRegion ansiGreenBold hi link ansiYellowReverseBoldRegion ansiYellowBold hi link ansiBlueReverseBoldRegion ansiBlueBold hi link ansiMagentaReverseBoldRegion ansiMagentaBold hi link ansiCyanReverseBoldRegion ansiCyanBold hi link ansiWhiteReverseBoldRegion ansiWhiteBold hi link ansiGrayReverseBoldRegion ansiGrayBold syn cluster AnsiReverseUnderlineGroup contains=ansiBoldReverseUnderlineRegion,ansiDefaultReverseUnderlineRegion,ansiBlackReverseUnderlineRegion,ansiWhiteReverseUnderlineRegion,ansiGrayReverseUnderlineRegion,ansiRedReverseUnderlineRegion,ansiGreenReverseUnderlineRegion,ansiYellowReverseUnderlineRegion,ansiBlueReverseUnderlineRegion,ansiMagentaReverseUnderlineRegion,ansiCyanReverseUnderlineRegion,ansiBgStop,ansiBoldStop syn region ansiReverseUnderlineRegion contained concealends matchgroup=ansiNone start="\e\[;\=0\{0,2};\=4;\=m" end="\ze\e\[\%(0*;*\)\=\%(0*\|24\)\=m" contains=@AnsiUnderlineGroup,ansiConceal syn region ansiBoldReverseUnderlineRegion contained start="\e\[1m" skip='\e\[K' end="\ze\e\[\%(0*;*\)\=\%(22\|0*\)\=m" contains=ansiConceal syn region ansiDefaultReverseUnderlineRegion contained start="\e\[39m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlackReverseUnderlineRegion contained start="\e\[30m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiRedReverseUnderlineRegion contained start="\e\[31m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGreenReverseUnderlineRegion contained start="\e\[32m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiYellowReverseUnderlineRegion contained start="\e\[33m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiBlueReverseUnderlineRegion contained start="\e\[34m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiMagentaReverseUnderlineRegion contained start="\e\[35m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiCyanReverseUnderlineRegion contained start="\e\[36m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiWhiteReverseUnderlineRegion contained start="\e\[37m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal syn region ansiGrayReverseUnderlineRegion contained start="\e\[90m" skip='\e\[K' end="\e\[[03m]"me=e-3 contains=ansiConceal hi link ansiReverseUnderlineRegion ansiReverseUnderline hi link ansiBoldReverseUnderlineRegion ansiReverseBoldUnderline hi link ansiDefaultReverseUnderlineRegion ansiDefaultUnderline hi link ansiBlackReverseUnderlineRegion ansiBlackUnderline hi link ansiRedReverseUnderlineRegion ansiRedUnderline hi link ansiGreenReverseUnderlineRegion ansiGreenUnderline hi link ansiYellowReverseUnderlineRegion ansiYellowUnderline hi link ansiBlueReverseUnderlineRegion ansiBlueUnderline hi link ansiMagentaReverseUnderlineRegion ansiMagentaUnderline hi link ansiCyanReverseUnderlineRegion ansiCyanUnderline hi link ansiWhiteReverseUnderlineRegion ansiWhiteUnderline hi link ansiGrayReverseUnderlineRegion ansiGrayUnderline endif if has("conceal") syn match ansiStop conceal "\e\[;\=0\{0,2}m" syn match ansiStop conceal "\e\[K" syn match ansiStop conceal "\e\[H" syn match ansiStop conceal "\e\[2J" else syn match ansiStop "\e\[;\=0\{0,2}m" syn match ansiStop "\e\[K" syn match ansiStop "\e\[H" syn match ansiStop "\e\[2J" endif " --------------------------------------------------------------------- " Some Color Combinations: - can't do 'em all, the qty of highlighting groups is limited! {{{2 " --------------------------------------------------------------------- syn region ansiBlackDefault start="\e\[0\{0,2};\=\(30;49\|49;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedDefault start="\e\[0\{0,2};\=\(31;49\|49;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenDefault start="\e\[0\{0,2};\=\(32;49\|49;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowDefault start="\e\[0\{0,2};\=\(33;49\|49;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueDefault start="\e\[0\{0,2};\=\(34;49\|49;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaDefault start="\e\[0\{0,2};\=\(35;49\|49;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanDefault start="\e\[0\{0,2};\=\(36;49\|49;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteDefault start="\e\[0\{0,2};\=\(37;49\|49;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultDefault start="\e\[0\{0,2};\=\(39;49\|49;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayDefault start="\e\[0\{0,2};\=\(90;49\|49;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackBlack start="\e\[0\{0,2};\=\(30;40\|40;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedBlack start="\e\[0\{0,2};\=\(31;40\|40;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenBlack start="\e\[0\{0,2};\=\(32;40\|40;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowBlack start="\e\[0\{0,2};\=\(33;40\|40;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueBlack start="\e\[0\{0,2};\=\(34;40\|40;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaBlack start="\e\[0\{0,2};\=\(35;40\|40;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanBlack start="\e\[0\{0,2};\=\(36;40\|40;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteBlack start="\e\[0\{0,2};\=\(37;40\|40;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultBlack start="\e\[0\{0,2};\=\(39;40\|40;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayBlack start="\e\[0\{0,2};\=\(90;40\|40;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackRed start="\e\[0\{0,2};\=\(30;41\|41;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedRed start="\e\[0\{0,2};\=\(31;41\|41;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenRed start="\e\[0\{0,2};\=\(32;41\|41;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowRed start="\e\[0\{0,2};\=\(33;41\|41;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueRed start="\e\[0\{0,2};\=\(34;41\|41;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaRed start="\e\[0\{0,2};\=\(35;41\|41;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanRed start="\e\[0\{0,2};\=\(36;41\|41;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteRed start="\e\[0\{0,2};\=\(37;41\|41;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultRed start="\e\[0\{0,2};\=\(39;41\|41;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayRed start="\e\[0\{0,2};\=\(90;41\|41;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackGreen start="\e\[0\{0,2};\=\(30;42\|42;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedGreen start="\e\[0\{0,2};\=\(31;42\|42;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenGreen start="\e\[0\{0,2};\=\(32;42\|42;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowGreen start="\e\[0\{0,2};\=\(33;42\|42;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueGreen start="\e\[0\{0,2};\=\(34;42\|42;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaGreen start="\e\[0\{0,2};\=\(35;42\|42;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanGreen start="\e\[0\{0,2};\=\(36;42\|42;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteGreen start="\e\[0\{0,2};\=\(37;42\|42;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultGreen start="\e\[0\{0,2};\=\(39;42\|42;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayGreen start="\e\[0\{0,2};\=\(90;42\|42;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackYellow start="\e\[0\{0,2};\=\(30;43\|43;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedYellow start="\e\[0\{0,2};\=\(31;43\|43;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenYellow start="\e\[0\{0,2};\=\(32;43\|43;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowYellow start="\e\[0\{0,2};\=\(33;43\|43;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueYellow start="\e\[0\{0,2};\=\(34;43\|43;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaYellow start="\e\[0\{0,2};\=\(35;43\|43;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanYellow start="\e\[0\{0,2};\=\(36;43\|43;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteYellow start="\e\[0\{0,2};\=\(37;43\|43;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultYellow start="\e\[0\{0,2};\=\(39;43\|43;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayYellow start="\e\[0\{0,2};\=\(90;43\|43;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackBlue start="\e\[0\{0,2};\=\(30;44\|44;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedBlue start="\e\[0\{0,2};\=\(31;44\|44;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenBlue start="\e\[0\{0,2};\=\(32;44\|44;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowBlue start="\e\[0\{0,2};\=\(33;44\|44;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueBlue start="\e\[0\{0,2};\=\(34;44\|44;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaBlue start="\e\[0\{0,2};\=\(35;44\|44;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanBlue start="\e\[0\{0,2};\=\(36;44\|44;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteBlue start="\e\[0\{0,2};\=\(37;44\|44;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultBlue start="\e\[0\{0,2};\=\(39;44\|44;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayBlue start="\e\[0\{0,2};\=\(90;44\|44;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackMagenta start="\e\[0\{0,2};\=\(30;45\|45;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedMagenta start="\e\[0\{0,2};\=\(31;45\|45;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenMagenta start="\e\[0\{0,2};\=\(32;45\|45;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowMagenta start="\e\[0\{0,2};\=\(33;45\|45;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueMagenta start="\e\[0\{0,2};\=\(34;45\|45;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaMagenta start="\e\[0\{0,2};\=\(35;45\|45;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanMagenta start="\e\[0\{0,2};\=\(36;45\|45;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteMagenta start="\e\[0\{0,2};\=\(37;45\|45;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultMagenta start="\e\[0\{0,2};\=\(39;45\|45;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayMagenta start="\e\[0\{0,2};\=\(90;45\|45;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackCyan start="\e\[0\{0,2};\=\(30;46\|46;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedCyan start="\e\[0\{0,2};\=\(31;46\|46;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenCyan start="\e\[0\{0,2};\=\(32;46\|46;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowCyan start="\e\[0\{0,2};\=\(33;46\|46;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueCyan start="\e\[0\{0,2};\=\(34;46\|46;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaCyan start="\e\[0\{0,2};\=\(35;46\|46;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanCyan start="\e\[0\{0,2};\=\(36;46\|46;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteCyan start="\e\[0\{0,2};\=\(37;46\|46;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultCyan start="\e\[0\{0,2};\=\(39;46\|46;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayCyan start="\e\[0\{0,2};\=\(90;46\|46;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlackWhite start="\e\[0\{0,2};\=\(30;47\|47;30\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiRedWhite start="\e\[0\{0,2};\=\(31;47\|47;31\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGreenWhite start="\e\[0\{0,2};\=\(32;47\|47;32\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiYellowWhite start="\e\[0\{0,2};\=\(33;47\|47;33\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiBlueWhite start="\e\[0\{0,2};\=\(34;47\|47;34\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiMagentaWhite start="\e\[0\{0,2};\=\(35;47\|47;35\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiCyanWhite start="\e\[0\{0,2};\=\(36;47\|47;36\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiWhiteWhite start="\e\[0\{0,2};\=\(37;47\|47;37\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiDefaultWhite start="\e\[0\{0,2};\=\(39;47\|47;39\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn region ansiGrayWhite start="\e\[0\{0,2};\=\(90;47\|47;90\)m" skip="\e\[K" end="\e\["me=e-2 contains=ansiConceal syn match ansiExtended "\e\[;\=\(0;\)\=[34]8;\(\d*;\)*\d*m" contains=ansiConceal " ------------- " Highlighting: {{{2 " ------------- if !has("conceal") " -------------- " ansiesc_ignore: {{{3 " -------------- hi def link ansiConceal Ignore hi def link ansiSuppress Ignore hi def link ansiIgnore ansiStop hi def link ansiStop Ignore hi def link ansiExtended Ignore endif let s:hlkeep_{bufnr("%")}= &l:hl exe "setlocal hl=".substitute(&hl,'8:[^,]\{-},','8:Ignore,',"") " handle 3 or more element ansi escape sequences by building syntax and highlighting rules " specific to the current file call s:MultiElementHandler() hi ansiNone cterm=NONE gui=NONE if &t_Co == 8 || &t_Co == 256 " --------------------- " eight-color handling: {{{3 " --------------------- " call Decho("set up 8-color highlighting groups") hi ansiBlack ctermfg=Black guifg=Black cterm=NONE gui=NONE hi ansiRed ctermfg=DarkRed guifg=DarkRed cterm=NONE gui=NONE hi ansiGreen ctermfg=DarkGreen guifg=DarkGreen cterm=NONE gui=NONE hi ansiYellow ctermfg=DarkYellow guifg=DarkYellow cterm=NONE gui=NONE hi ansiBlue ctermfg=DarkBlue guifg=DarkBlue cterm=NONE gui=NONE hi ansiMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=NONE gui=NONE hi ansiCyan ctermfg=DarkCyan guifg=DarkCyan cterm=NONE gui=NONE hi ansiWhite ctermfg=LightGray guifg=LightGray cterm=NONE gui=NONE hi ansiGray ctermfg=DarkGray guifg=DarkGray cterm=NONE gui=NONE hi ansiDefaultBg ctermbg=NONE guibg=NONE cterm=NONE gui=NONE hi ansiBlackBg ctermbg=Black guibg=Black cterm=NONE gui=NONE hi ansiRedBg ctermbg=DarkRed guibg=DarkRed cterm=NONE gui=NONE hi ansiGreenBg ctermbg=DarkGreen guibg=DarkGreen cterm=NONE gui=NONE hi ansiYellowBg ctermbg=DarkYellow guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlueBg ctermbg=DarkBlue guibg=DarkBlue cterm=NONE gui=NONE hi ansiMagentaBg ctermbg=DarkMagenta guibg=DarkMagenta cterm=NONE gui=NONE hi ansiCyanBg ctermbg=DarkCyan guibg=DarkCyan cterm=NONE gui=NONE hi ansiWhiteBg ctermbg=LightGray guibg=LightGray cterm=NONE gui=NONE hi ansiGrayBg ctermbg=DarkGray guibg=DarkGray cterm=NONE gui=NONE hi ansiBlackFg ctermfg=Black guifg=Black cterm=NONE gui=NONE hi ansiRedFg ctermfg=DarkRed guifg=DarkRed cterm=NONE gui=NONE hi ansiGreenFg ctermfg=DarkGreen guifg=DarkGreen cterm=NONE gui=NONE hi ansiYellowFg ctermfg=DarkYellow guifg=DarkYellow cterm=NONE gui=NONE hi ansiBlueFg ctermfg=DarkBlue guifg=DarkBlue cterm=NONE gui=NONE hi ansiMagentaFg ctermfg=DarkMagenta guifg=DarkMagenta cterm=NONE gui=NONE hi ansiCyanFg ctermfg=DarkCyan guifg=DarkCyan cterm=NONE gui=NONE hi ansiWhiteFg ctermfg=LightGray guifg=LightGray cterm=NONE gui=NONE hi ansiGrayFg ctermfg=DarkGray guifg=DarkGray cterm=NONE gui=NONE hi ansiDefaultReverseBg ctermbg=NONE guibg=NONE cterm=reverse gui=reverse hi ansiBlackReverseBg ctermbg=Black guibg=Black cterm=reverse gui=reverse hi ansiRedReverseBg ctermbg=DarkRed guibg=DarkRed cterm=reverse gui=reverse hi ansiGreenReverseBg ctermbg=DarkGreen guibg=DarkGreen cterm=reverse gui=reverse hi ansiYellowReverseBg ctermbg=DarkYellow guibg=DarkYellow cterm=reverse gui=reverse hi ansiBlueReverseBg ctermbg=DarkBlue guibg=DarkBlue cterm=reverse gui=reverse hi ansiMagentaReverseBg ctermbg=DarkMagenta guibg=DarkMagenta cterm=reverse gui=reverse hi ansiCyanReverseBg ctermbg=DarkCyan guibg=DarkCyan cterm=reverse gui=reverse hi ansiWhiteReverseBg ctermbg=LightGray guibg=LightGray cterm=reverse gui=reverse hi ansiBold cterm=bold gui=bold hi ansiBoldUnderline cterm=bold,underline gui=bold,underline hi ansiBoldBlack ctermfg=Black guifg=Black cterm=bold gui=bold hi ansiBoldRed ctermfg=DarkRed guifg=DarkRed cterm=bold gui=bold hi ansiBoldGreen ctermfg=DarkGreen guifg=DarkGreen cterm=bold gui=bold hi ansiBoldYellow ctermfg=DarkYellow guifg=DarkYellow cterm=bold gui=bold hi ansiBoldBlue ctermfg=DarkBlue guifg=DarkBlue cterm=bold gui=bold hi ansiBoldMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=bold gui=bold hi ansiBoldCyan ctermfg=DarkCyan guifg=DarkCyan cterm=bold gui=bold hi ansiBoldWhite ctermfg=LightGray guifg=LightGray cterm=bold gui=bold hi ansiBoldGray ctermbg=DarkGray guibg=DarkGray cterm=bold gui=bold hi ansiBlackBold ctermbg=Black guibg=Black cterm=bold gui=bold hi ansiRedBold ctermbg=DarkRed guibg=DarkRed cterm=bold gui=bold hi ansiGreenBold ctermbg=DarkGreen guibg=DarkGreen cterm=bold gui=bold hi ansiYellowBold ctermbg=DarkYellow guibg=DarkYellow cterm=bold gui=bold hi ansiBlueBold ctermbg=DarkBlue guibg=DarkBlue cterm=bold gui=bold hi ansiMagentaBold ctermbg=DarkMagenta guibg=DarkMagenta cterm=bold gui=bold hi ansiCyanBold ctermbg=DarkCyan guibg=DarkCyan cterm=bold gui=bold hi ansiWhiteBold ctermbg=LightGray guibg=LightGray cterm=bold gui=bold hi ansiReverse cterm=reverse gui=reverse hi ansiReverseUnderline cterm=reverse,underline gui=reverse,underline hi ansiReverseBold cterm=reverse,bold gui=reverse,bold hi ansiReverseBoldUnderline cterm=reverse,bold,underline gui=reverse,bold,underline hi ansiReverseBlack ctermfg=Black guifg=Black cterm=reverse gui=reverse hi ansiReverseRed ctermfg=DarkRed guifg=DarkRed cterm=reverse gui=reverse hi ansiReverseGreen ctermfg=DarkGreen guifg=DarkGreen cterm=reverse gui=reverse hi ansiReverseYellow ctermfg=DarkYellow guifg=DarkYellow cterm=reverse gui=reverse hi ansiReverseBlue ctermfg=DarkBlue guifg=DarkBlue cterm=reverse gui=reverse hi ansiReverseMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=reverse gui=reverse hi ansiReverseCyan ctermfg=DarkCyan guifg=DarkCyan cterm=reverse gui=reverse hi ansiReverseWhite ctermfg=LightGray guifg=LightGray cterm=reverse gui=reverse hi ansiReverseGray ctermfg=DarkGray guifg=DarkGray cterm=reverse gui=reverse hi ansiStandout cterm=standout gui=standout hi ansiStandoutBlack ctermfg=Black guifg=Black cterm=standout gui=standout hi ansiStandoutRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=standout hi ansiStandoutGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=standout hi ansiStandoutYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=standout hi ansiStandoutBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=standout hi ansiStandoutMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=standout hi ansiStandoutCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=standout hi ansiStandoutWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=standout hi ansiStandoutGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=standout hi ansiItalic cterm=italic gui=italic hi ansiItalicBlack ctermfg=Black guifg=Black cterm=italic gui=italic hi ansiItalicRed ctermfg=DarkRed guifg=DarkRed cterm=italic gui=italic hi ansiItalicGreen ctermfg=DarkGreen guifg=DarkGreen cterm=italic gui=italic hi ansiItalicYellow ctermfg=DarkYellow guifg=DarkYellow cterm=italic gui=italic hi ansiItalicBlue ctermfg=DarkBlue guifg=DarkBlue cterm=italic gui=italic hi ansiItalicMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=italic gui=italic hi ansiItalicCyan ctermfg=DarkCyan guifg=DarkCyan cterm=italic gui=italic hi ansiItalicWhite ctermfg=LightGray guifg=LightGray cterm=italic gui=italic hi ansiItalicGray ctermfg=DarkGray guifg=DarkGray cterm=italic gui=italic hi ansiUnderline cterm=underline gui=underline hi ansiUnderlineBlack ctermfg=Black guifg=Black cterm=underline gui=underline hi ansiUnderlineRed ctermfg=DarkRed guifg=DarkRed cterm=underline gui=underline hi ansiUnderlineGreen ctermfg=DarkGreen guifg=DarkGreen cterm=underline gui=underline hi ansiUnderlineYellow ctermfg=DarkYellow guifg=DarkYellow cterm=underline gui=underline hi ansiUnderlineBlue ctermfg=DarkBlue guifg=DarkBlue cterm=underline gui=underline hi ansiUnderlineMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=underline gui=underline hi ansiUnderlineCyan ctermfg=DarkCyan guifg=DarkCyan cterm=underline gui=underline hi ansiUnderlineWhite ctermfg=LightGray guifg=LightGray cterm=underline gui=underline hi ansiUnderlineGray ctermfg=DarkGray guifg=DarkGray cterm=underline gui=underline hi ansiBlackUnderline ctermbg=Black guibg=Black cterm=underline gui=underline hi ansiRedUnderline ctermbg=DarkRed guibg=DarkRed cterm=underline gui=underline hi ansiGreenUnderline ctermbg=DarkGreen guibg=DarkGreen cterm=underline gui=underline hi ansiYellowUnderline ctermbg=DarkYellow guibg=DarkYellow cterm=underline gui=underline hi ansiBlueUnderline ctermbg=DarkBlue guibg=DarkBlue cterm=underline gui=underline hi ansiMagentaUnderline ctermbg=DarkMagenta guibg=DarkMagenta cterm=underline gui=underline hi ansiCyanUnderline ctermbg=DarkCyan guibg=DarkCyan cterm=underline gui=underline hi ansiWhiteUnderline ctermbg=LightGray guibg=LightGray cterm=underline gui=underline hi ansiBlink cterm=standout gui=undercurl hi ansiBlinkBlack ctermfg=Black guifg=Black cterm=standout gui=undercurl hi ansiBlinkRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=undercurl hi ansiBlinkGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=undercurl hi ansiBlinkYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=undercurl hi ansiBlinkBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=undercurl hi ansiBlinkMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=undercurl hi ansiBlinkCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=undercurl hi ansiBlinkWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=undercurl hi ansiBlinkGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=undercurl hi ansiRapidBlink cterm=standout gui=undercurl hi ansiRapidBlinkBlack ctermfg=Black guifg=Black cterm=standout gui=undercurl hi ansiRapidBlinkRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=undercurl hi ansiRapidBlinkGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=undercurl hi ansiRapidBlinkYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=undercurl hi ansiRapidBlinkBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=undercurl hi ansiRapidBlinkMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=undercurl hi ansiRapidBlinkCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=undercurl hi ansiRapidBlinkWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=undercurl hi ansiRapidBlinkGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=undercurl hi ansiRV cterm=reverse gui=reverse hi ansiRVBlack ctermfg=Black guifg=Black cterm=reverse gui=reverse hi ansiRVRed ctermfg=DarkRed guifg=DarkRed cterm=reverse gui=reverse hi ansiRVGreen ctermfg=DarkGreen guifg=DarkGreen cterm=reverse gui=reverse hi ansiRVYellow ctermfg=DarkYellow guifg=DarkYellow cterm=reverse gui=reverse hi ansiRVBlue ctermfg=DarkBlue guifg=DarkBlue cterm=reverse gui=reverse hi ansiRVMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=reverse gui=reverse hi ansiRVCyan ctermfg=DarkCyan guifg=DarkCyan cterm=reverse gui=reverse hi ansiRVWhite ctermfg=LightGray guifg=LightGray cterm=reverse gui=reverse hi ansiRVGray ctermfg=DarkGray guifg=DarkGray cterm=reverse gui=reverse hi ansiBoldDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=bold gui=bold hi ansiUnderlineDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=underline gui=underline hi ansiBlackDefault ctermfg=Black ctermbg=NONE guifg=Black guibg=NONE cterm=NONE gui=NONE hi ansiRedDefault ctermfg=DarkRed ctermbg=NONE guifg=DarkRed guibg=NONE cterm=NONE gui=NONE hi ansiGreenDefault ctermfg=DarkGreen ctermbg=NONE guifg=DarkGreen guibg=NONE cterm=NONE gui=NONE hi ansiYellowDefault ctermfg=DarkYellow ctermbg=NONE guifg=DarkYellow guibg=NONE cterm=NONE gui=NONE hi ansiBlueDefault ctermfg=DarkBlue ctermbg=NONE guifg=DarkBlue guibg=NONE cterm=NONE gui=NONE hi ansiMagentaDefault ctermfg=DarkMagenta ctermbg=NONE guifg=DarkMagenta guibg=NONE cterm=NONE gui=NONE hi ansiCyanDefault ctermfg=DarkCyan ctermbg=NONE guifg=DarkCyan guibg=NONE cterm=NONE gui=NONE hi ansiWhiteDefault ctermfg=LightGray ctermbg=NONE guifg=LightGray guibg=NONE cterm=NONE gui=NONE hi ansiGrayDefault ctermfg=DarkGray ctermbg=NONE guifg=DarkGray guibg=NONE cterm=NONE gui=NONE hi ansiDefaultDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=NONE gui=NONE hi ansiDefaultBlack ctermfg=NONE ctermbg=Black guifg=NONE guibg=Black cterm=NONE gui=NONE hi ansiDefaultRed ctermfg=NONE ctermbg=DarkRed guifg=NONE guibg=DarkRed cterm=NONE gui=NONE hi ansiDefaultGreen ctermfg=NONE ctermbg=DarkGreen guifg=NONE guibg=DarkGreen cterm=NONE gui=NONE hi ansiDefaultYellow ctermfg=NONE ctermbg=DarkYellow guifg=NONE guibg=DarkYellow cterm=NONE gui=NONE hi ansiDefaultBlue ctermfg=NONE ctermbg=DarkBlue guifg=NONE guibg=DarkBlue cterm=NONE gui=NONE hi ansiDefaultMagenta ctermfg=NONE ctermbg=DarkMagenta guifg=NONE guibg=DarkMagenta cterm=NONE gui=NONE hi ansiDefaultCyan ctermfg=NONE ctermbg=DarkCyan guifg=NONE guibg=DarkCyan cterm=NONE gui=NONE hi ansiDefaultWhite ctermfg=NONE ctermbg=LightGray guifg=NONE guibg=LightGray cterm=NONE gui=NONE hi ansiDefaultGray ctermfg=NONE ctermbg=DarkGray guifg=NONE guibg=DarkGray cterm=NONE gui=NONE hi ansiBlackBlack ctermfg=Black ctermbg=Black guifg=Black guibg=Black cterm=NONE gui=NONE hi ansiRedBlack ctermfg=DarkRed ctermbg=Black guifg=DarkRed guibg=Black cterm=NONE gui=NONE hi ansiGreenBlack ctermfg=DarkGreen ctermbg=Black guifg=DarkGreen guibg=Black cterm=NONE gui=NONE hi ansiYellowBlack ctermfg=DarkYellow ctermbg=Black guifg=DarkYellow guibg=Black cterm=NONE gui=NONE hi ansiBlueBlack ctermfg=DarkBlue ctermbg=Black guifg=DarkBlue guibg=Black cterm=NONE gui=NONE hi ansiMagentaBlack ctermfg=DarkMagenta ctermbg=Black guifg=DarkMagenta guibg=Black cterm=NONE gui=NONE hi ansiCyanBlack ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black cterm=NONE gui=NONE hi ansiWhiteBlack ctermfg=LightGray ctermbg=Black guifg=LightGray guibg=Black cterm=NONE gui=NONE hi ansiGrayBlack ctermfg=DarkGray ctermbg=Black guifg=DarkGray guibg=Black cterm=NONE gui=NONE hi ansiBlackRed ctermfg=Black ctermbg=DarkRed guifg=Black guibg=DarkRed cterm=NONE gui=NONE hi ansiRedRed ctermfg=DarkRed ctermbg=DarkRed guifg=DarkRed guibg=DarkRed cterm=NONE gui=NONE hi ansiGreenRed ctermfg=DarkGreen ctermbg=DarkRed guifg=DarkGreen guibg=DarkRed cterm=NONE gui=NONE hi ansiYellowRed ctermfg=DarkYellow ctermbg=DarkRed guifg=DarkYellow guibg=DarkRed cterm=NONE gui=NONE hi ansiBlueRed ctermfg=DarkBlue ctermbg=DarkRed guifg=DarkBlue guibg=DarkRed cterm=NONE gui=NONE hi ansiMagentaRed ctermfg=DarkMagenta ctermbg=DarkRed guifg=DarkMagenta guibg=DarkRed cterm=NONE gui=NONE hi ansiCyanRed ctermfg=DarkCyan ctermbg=DarkRed guifg=DarkCyan guibg=DarkRed cterm=NONE gui=NONE hi ansiWhiteRed ctermfg=LightGray ctermbg=DarkRed guifg=LightGray guibg=DarkRed cterm=NONE gui=NONE hi ansiGrayRed ctermfg=DarkGray ctermbg=DarkRed guifg=DarkGray guibg=DarkRed cterm=NONE gui=NONE hi ansiBlackGreen ctermfg=Black ctermbg=DarkGreen guifg=Black guibg=DarkGreen cterm=NONE gui=NONE hi ansiRedGreen ctermfg=DarkRed ctermbg=DarkGreen guifg=DarkRed guibg=DarkGreen cterm=NONE gui=NONE hi ansiGreenGreen ctermfg=DarkGreen ctermbg=DarkGreen guifg=DarkGreen guibg=DarkGreen cterm=NONE gui=NONE hi ansiYellowGreen ctermfg=DarkYellow ctermbg=DarkGreen guifg=DarkYellow guibg=DarkGreen cterm=NONE gui=NONE hi ansiBlueGreen ctermfg=DarkBlue ctermbg=DarkGreen guifg=DarkBlue guibg=DarkGreen cterm=NONE gui=NONE hi ansiMagentaGreen ctermfg=DarkMagenta ctermbg=DarkGreen guifg=DarkMagenta guibg=DarkGreen cterm=NONE gui=NONE hi ansiCyanGreen ctermfg=DarkCyan ctermbg=DarkGreen guifg=DarkCyan guibg=DarkGreen cterm=NONE gui=NONE hi ansiWhiteGreen ctermfg=LightGray ctermbg=DarkGreen guifg=LightGray guibg=DarkGreen cterm=NONE gui=NONE hi ansiGrayGreen ctermfg=DarkGray ctermbg=DarkGreen guifg=DarkGray guibg=DarkGreen cterm=NONE gui=NONE hi ansiBlackYellow ctermfg=Black ctermbg=DarkYellow guifg=Black guibg=DarkYellow cterm=NONE gui=NONE hi ansiRedYellow ctermfg=DarkRed ctermbg=DarkYellow guifg=DarkRed guibg=DarkYellow cterm=NONE gui=NONE hi ansiGreenYellow ctermfg=DarkGreen ctermbg=DarkYellow guifg=DarkGreen guibg=DarkYellow cterm=NONE gui=NONE hi ansiYellowYellow ctermfg=DarkYellow ctermbg=DarkYellow guifg=DarkYellow guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlueYellow ctermfg=DarkBlue ctermbg=DarkYellow guifg=DarkBlue guibg=DarkYellow cterm=NONE gui=NONE hi ansiMagentaYellow ctermfg=DarkMagenta ctermbg=DarkYellow guifg=DarkMagenta guibg=DarkYellow cterm=NONE gui=NONE hi ansiCyanYellow ctermfg=DarkCyan ctermbg=DarkYellow guifg=DarkCyan guibg=DarkYellow cterm=NONE gui=NONE hi ansiWhiteYellow ctermfg=LightGray ctermbg=DarkYellow guifg=LightGray guibg=DarkYellow cterm=NONE gui=NONE hi ansiGrayYellow ctermfg=DarkGray ctermbg=DarkYellow guifg=DarkGray guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlackBlue ctermfg=Black ctermbg=DarkBlue guifg=Black guibg=DarkBlue cterm=NONE gui=NONE hi ansiRedBlue ctermfg=DarkRed ctermbg=DarkBlue guifg=DarkRed guibg=DarkBlue cterm=NONE gui=NONE hi ansiGreenBlue ctermfg=DarkGreen ctermbg=DarkBlue guifg=DarkGreen guibg=DarkBlue cterm=NONE gui=NONE hi ansiYellowBlue ctermfg=DarkYellow ctermbg=DarkBlue guifg=DarkYellow guibg=DarkBlue cterm=NONE gui=NONE hi ansiBlueBlue ctermfg=DarkBlue ctermbg=DarkBlue guifg=DarkBlue guibg=DarkBlue cterm=NONE gui=NONE hi ansiMagentaBlue ctermfg=DarkMagenta ctermbg=DarkBlue guifg=DarkMagenta guibg=DarkBlue cterm=NONE gui=NONE hi ansiCyanBlue ctermfg=DarkCyan ctermbg=DarkBlue guifg=DarkCyan guibg=DarkBlue cterm=NONE gui=NONE hi ansiWhiteBlue ctermfg=LightGray ctermbg=DarkBlue guifg=LightGray guibg=DarkBlue cterm=NONE gui=NONE hi ansiGrayBlue ctermfg=DarkGray ctermbg=DarkBlue guifg=DarkGray guibg=DarkBlue cterm=NONE gui=NONE hi ansiBlackMagenta ctermfg=Black ctermbg=DarkMagenta guifg=Black guibg=DarkMagenta cterm=NONE gui=NONE hi ansiRedMagenta ctermfg=DarkRed ctermbg=DarkMagenta guifg=DarkRed guibg=DarkMagenta cterm=NONE gui=NONE hi ansiGreenMagenta ctermfg=DarkGreen ctermbg=DarkMagenta guifg=DarkGreen guibg=DarkMagenta cterm=NONE gui=NONE hi ansiYellowMagenta ctermfg=DarkYellow ctermbg=DarkMagenta guifg=DarkYellow guibg=DarkMagenta cterm=NONE gui=NONE hi ansiBlueMagenta ctermfg=DarkBlue ctermbg=DarkMagenta guifg=DarkBlue guibg=DarkMagenta cterm=NONE gui=NONE hi ansiMagentaMagenta ctermfg=DarkMagenta ctermbg=DarkMagenta guifg=DarkMagenta guibg=DarkMagenta cterm=NONE gui=NONE hi ansiCyanMagenta ctermfg=DarkCyan ctermbg=DarkMagenta guifg=DarkCyan guibg=DarkMagenta cterm=NONE gui=NONE hi ansiWhiteMagenta ctermfg=LightGray ctermbg=DarkMagenta guifg=LightGray guibg=DarkMagenta cterm=NONE gui=NONE hi ansiGrayMagenta ctermfg=DarkGray ctermbg=DarkMagenta guifg=DarkGray guibg=DarkMagenta cterm=NONE gui=NONE hi ansiBlackCyan ctermfg=Black ctermbg=DarkCyan guifg=Black guibg=DarkCyan cterm=NONE gui=NONE hi ansiRedCyan ctermfg=DarkRed ctermbg=DarkCyan guifg=DarkRed guibg=DarkCyan cterm=NONE gui=NONE hi ansiGreenCyan ctermfg=DarkGreen ctermbg=DarkCyan guifg=DarkGreen guibg=DarkCyan cterm=NONE gui=NONE hi ansiYellowCyan ctermfg=DarkYellow ctermbg=DarkCyan guifg=DarkYellow guibg=DarkCyan cterm=NONE gui=NONE hi ansiBlueCyan ctermfg=DarkBlue ctermbg=DarkCyan guifg=DarkBlue guibg=DarkCyan cterm=NONE gui=NONE hi ansiMagentaCyan ctermfg=DarkMagenta ctermbg=DarkCyan guifg=DarkMagenta guibg=DarkCyan cterm=NONE gui=NONE hi ansiCyanCyan ctermfg=DarkCyan ctermbg=DarkCyan guifg=DarkCyan guibg=DarkCyan cterm=NONE gui=NONE hi ansiWhiteCyan ctermfg=LightGray ctermbg=DarkCyan guifg=LightGray guibg=DarkCyan cterm=NONE gui=NONE hi ansiGrayCyan ctermfg=DarkGray ctermbg=DarkCyan guifg=DarkGray guibg=DarkCyan cterm=NONE gui=NONE hi ansiBlackWhite ctermfg=Black ctermbg=LightGray guifg=Black guibg=LightGray cterm=NONE gui=NONE hi ansiRedWhite ctermfg=DarkRed ctermbg=LightGray guifg=DarkRed guibg=LightGray cterm=NONE gui=NONE hi ansiGreenWhite ctermfg=DarkGreen ctermbg=LightGray guifg=DarkGreen guibg=LightGray cterm=NONE gui=NONE hi ansiYellowWhite ctermfg=DarkYellow ctermbg=LightGray guifg=DarkYellow guibg=LightGray cterm=NONE gui=NONE hi ansiBlueWhite ctermfg=DarkBlue ctermbg=LightGray guifg=DarkBlue guibg=LightGray cterm=NONE gui=NONE hi ansiMagentaWhite ctermfg=DarkMagenta ctermbg=LightGray guifg=DarkMagenta guibg=LightGray cterm=NONE gui=NONE hi ansiCyanWhite ctermfg=DarkCyan ctermbg=LightGray guifg=DarkCyan guibg=LightGray cterm=NONE gui=NONE hi ansiWhiteWhite ctermfg=LightGray ctermbg=LightGray guifg=LightGray guibg=LightGray cterm=NONE gui=NONE hi ansiGrayWhite ctermfg=DarkGray ctermbg=LightGray guifg=DarkGray guibg=LightGray cterm=NONE gui=NONE hi ansiBlackGray ctermfg=Black ctermbg=DarkGray guifg=Black guibg=DarkGray cterm=NONE gui=NONE hi ansiRedGray ctermfg=DarkRed ctermbg=DarkGray guifg=DarkRed guibg=DarkGray cterm=NONE gui=NONE hi ansiGreenGray ctermfg=DarkGreen ctermbg=DarkGray guifg=DarkGreen guibg=DarkGray cterm=NONE gui=NONE hi ansiYellowGray ctermfg=DarkYellow ctermbg=DarkGray guifg=DarkYellow guibg=DarkGray cterm=NONE gui=NONE hi ansiBlueGray ctermfg=DarkBlue ctermbg=DarkGray guifg=DarkBlue guibg=DarkGray cterm=NONE gui=NONE hi ansiMagentaGray ctermfg=DarkMagenta ctermbg=DarkGray guifg=DarkMagenta guibg=DarkGray cterm=NONE gui=NONE hi ansiCyanGray ctermfg=DarkCyan ctermbg=DarkGray guifg=DarkCyan guibg=DarkGray cterm=NONE gui=NONE hi ansiWhiteGray ctermfg=LightGray ctermbg=DarkGray guifg=LightGray guibg=DarkGray cterm=NONE gui=NONE hi ansiGrayGray ctermfg=DarkGray ctermbg=DarkGray guifg=DarkGray guibg=DarkGray cterm=NONE gui=NONE if v:version >= 700 && exists("+t_Co") && &t_Co == 256 && exists("g:ansiesc_256color") " --------------------------- " handle 256-color terminals: {{{3 " --------------------------- " call Decho("set up 256-color highlighting groups") let icolor= 1 while icolor < 256 let jcolor= 1 exe "hi ansiHL_".icolor."_0 ctermfg=".icolor exe "hi ansiHL_0_".icolor." ctermbg=".icolor " call Decho("exe hi ansiHL_".icolor." ctermfg=".icolor) while jcolor < 256 exe "hi ansiHL_".icolor."_".jcolor." ctermfg=".icolor." ctermbg=".jcolor " call Decho("exe hi ansiHL_".icolor."_".jcolor." ctermfg=".icolor." ctermbg=".jcolor) let jcolor= jcolor + 1 endwhile let icolor= icolor + 1 endwhile endif else " ---------------------------------- " not 8 or 256 color terminals (gui): {{{3 " ---------------------------------- " call Decho("set up gui highlighting groups") hi ansiBlack ctermfg=Black guifg=Black cterm=NONE gui=NONE hi ansiRed ctermfg=DarkRed guifg=DarkRed cterm=NONE gui=NONE hi ansiGreen ctermfg=DarkGreen guifg=DarkGreen cterm=NONE gui=NONE hi ansiYellow ctermfg=DarkYellow guifg=DarkYellow cterm=NONE gui=NONE hi ansiBlue ctermfg=DarkBlue guifg=DarkBlue cterm=NONE gui=NONE hi ansiMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=NONE gui=NONE hi ansiCyan ctermfg=DarkCyan guifg=DarkCyan cterm=NONE gui=NONE hi ansiWhite ctermfg=LightGray guifg=LightGray cterm=NONE gui=NONE hi ansiGray ctermfg=DarkGray guifg=DarkGray cterm=NONE gui=NONE hi ansiDefaultBg ctermbg=NONE guibg=NONE cterm=NONE gui=NONE hi ansiBlackBg ctermbg=Black guibg=Black cterm=NONE gui=NONE hi ansiRedBg ctermbg=DarkRed guibg=DarkRed cterm=NONE gui=NONE hi ansiGreenBg ctermbg=DarkGreen guibg=DarkGreen cterm=NONE gui=NONE hi ansiYellowBg ctermbg=DarkYellow guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlueBg ctermbg=DarkBlue guibg=DarkBlue cterm=NONE gui=NONE hi ansiMagentaBg ctermbg=DarkMagenta guibg=DarkMagenta cterm=NONE gui=NONE hi ansiCyanBg ctermbg=DarkCyan guibg=DarkCyan cterm=NONE gui=NONE hi ansiWhiteBg ctermbg=LightGray guibg=LightGray cterm=NONE gui=NONE hi ansiGrayBg ctermbg=DarkGray guibg=DarkGray cterm=NONE gui=NONE hi ansiDefaultReverseBg ctermbg=NONE guibg=NONE cterm=reverse gui=reverse hi ansiBlackReverseBg ctermbg=Black guibg=Black cterm=reverse gui=reverse hi ansiRedReverseBg ctermbg=DarkRed guibg=DarkRed cterm=reverse gui=reverse hi ansiGreenReverseBg ctermbg=DarkGreen guibg=DarkGreen cterm=reverse gui=reverse hi ansiYellowReverseBg ctermbg=DarkYellow guibg=DarkYellow cterm=reverse gui=reverse hi ansiBlueReverseBg ctermbg=DarkBlue guibg=DarkBlue cterm=reverse gui=reverse hi ansiMagentaReverseBg ctermbg=DarkMagenta guibg=DarkMagenta cterm=reverse gui=reverse hi ansiCyanReverseBg ctermbg=DarkCyan guibg=DarkCyan cterm=reverse gui=reverse hi ansiWhiteReverseBg ctermbg=LightGray guibg=LightGray cterm=reverse gui=reverse hi ansiGrayReverseBg ctermbg=DarkGray guibg=DarkGray cterm=reverse gui=reverse hi ansiBold cterm=bold gui=bold hi ansiBoldUnderline cterm=bold,underline gui=bold,underline hi ansiBoldBlack ctermfg=Black guifg=Black cterm=bold gui=bold hi ansiBoldRed ctermfg=DarkRed guifg=DarkRed cterm=bold gui=bold hi ansiBoldGreen ctermfg=DarkGreen guifg=DarkGreen cterm=bold gui=bold hi ansiBoldYellow ctermfg=DarkYellow guifg=DarkYellow cterm=bold gui=bold hi ansiBoldBlue ctermfg=DarkBlue guifg=DarkBlue cterm=bold gui=bold hi ansiBoldMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=bold gui=bold hi ansiBoldCyan ctermfg=DarkCyan guifg=DarkCyan cterm=bold gui=bold hi ansiBoldWhite ctermfg=LightGray guifg=LightGray cterm=bold gui=bold hi ansiBoldGray ctermfg=DarkGray guifg=DarkGray cterm=bold gui=bold hi ansiBlackBold ctermbg=Black guibg=Black cterm=bold gui=bold hi ansiRedBold ctermbg=DarkRed guibg=DarkRed cterm=bold gui=bold hi ansiGreenBold ctermbg=DarkGreen guibg=DarkGreen cterm=bold gui=bold hi ansiYellowBold ctermbg=DarkYellow guibg=DarkYellow cterm=bold gui=bold hi ansiBlueBold ctermbg=DarkBlue guibg=DarkBlue cterm=bold gui=bold hi ansiMagentaBold ctermbg=DarkMagenta guibg=DarkMagenta cterm=bold gui=bold hi ansiCyanBold ctermbg=DarkCyan guibg=DarkCyan cterm=bold gui=bold hi ansiWhiteBold ctermbg=LightGray guibg=LightGray cterm=bold gui=bold hi ansiGrayBold ctermbg=DarkGray guibg=DarkGray cterm=bold gui=bold hi ansiReverse cterm=reverse gui=reverse hi ansiReverseUnderline cterm=reverse,underline gui=reverse,underline hi ansiReverseBold cterm=reverse,bold gui=reverse,bold hi ansiReverseBoldUnderline cterm=reverse,bold,underline gui=reverse,bold,underline hi ansiReverseBlack ctermfg=Black guifg=Black cterm=reverse gui=reverse hi ansiReverseRed ctermfg=DarkRed guifg=DarkRed cterm=reverse gui=reverse hi ansiReverseGreen ctermfg=DarkGreen guifg=DarkGreen cterm=reverse gui=reverse hi ansiReverseYellow ctermfg=DarkYellow guifg=DarkYellow cterm=reverse gui=reverse hi ansiReverseBlue ctermfg=DarkBlue guifg=DarkBlue cterm=reverse gui=reverse hi ansiReverseMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=reverse gui=reverse hi ansiReverseCyan ctermfg=DarkCyan guifg=DarkCyan cterm=reverse gui=reverse hi ansiReverseWhite ctermfg=LightGray guifg=LightGray cterm=reverse gui=reverse hi ansiReverseGray ctermfg=DarkGray guifg=DarkGray cterm=reverse gui=reverse hi ansiStandout cterm=standout gui=standout hi ansiStandoutBlack ctermfg=Black guifg=Black cterm=standout gui=standout hi ansiStandoutRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=standout hi ansiStandoutGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=standout hi ansiStandoutYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=standout hi ansiStandoutBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=standout hi ansiStandoutMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=standout hi ansiStandoutCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=standout hi ansiStandoutWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=standout hi ansiStandoutGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=standout hi ansiItalic cterm=italic gui=italic hi ansiItalicBlack ctermfg=Black guifg=Black cterm=italic gui=italic hi ansiItalicRed ctermfg=DarkRed guifg=DarkRed cterm=italic gui=italic hi ansiItalicGreen ctermfg=DarkGreen guifg=DarkGreen cterm=italic gui=italic hi ansiItalicYellow ctermfg=DarkYellow guifg=DarkYellow cterm=italic gui=italic hi ansiItalicBlue ctermfg=DarkBlue guifg=DarkBlue cterm=italic gui=italic hi ansiItalicMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=italic gui=italic hi ansiItalicCyan ctermfg=DarkCyan guifg=DarkCyan cterm=italic gui=italic hi ansiItalicWhite ctermfg=LightGray guifg=LightGray cterm=italic gui=italic hi ansiItalicGray ctermfg=DarkGray guifg=DarkGray cterm=italic gui=italic hi ansiUnderline cterm=underline gui=underline hi ansiUnderlineBlack ctermfg=Black guifg=Black cterm=underline gui=underline hi ansiUnderlineRed ctermfg=DarkRed guifg=DarkRed cterm=underline gui=underline hi ansiUnderlineGreen ctermfg=DarkGreen guifg=DarkGreen cterm=underline gui=underline hi ansiUnderlineYellow ctermfg=DarkYellow guifg=DarkYellow cterm=underline gui=underline hi ansiUnderlineBlue ctermfg=DarkBlue guifg=DarkBlue cterm=underline gui=underline hi ansiUnderlineMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=underline gui=underline hi ansiUnderlineCyan ctermfg=DarkCyan guifg=DarkCyan cterm=underline gui=underline hi ansiUnderlineWhite ctermfg=LightGray guifg=LightGray cterm=underline gui=underline hi ansiUnderlineGray ctermfg=DarkGray guifg=DarkGray cterm=underline gui=underline hi ansiBlackUnderline ctermbg=Black guibg=Black cterm=underline gui=underline hi ansiRedUnderline ctermbg=DarkRed guibg=DarkRed cterm=underline gui=underline hi ansiGreenUnderline ctermbg=DarkGreen guibg=DarkGreen cterm=underline gui=underline hi ansiYellowUnderline ctermbg=DarkYellow guibg=DarkYellow cterm=underline gui=underline hi ansiBlueUnderline ctermbg=DarkBlue guibg=DarkBlue cterm=underline gui=underline hi ansiMagentaUnderline ctermbg=DarkMagenta guibg=DarkMagenta cterm=underline gui=underline hi ansiCyanUnderline ctermbg=DarkCyan guibg=DarkCyan cterm=underline gui=underline hi ansiWhiteUnderline ctermbg=LightGray guibg=LightGray cterm=underline gui=underline hi ansiGrayUnderline ctermbg=DarkGray guibg=DarkGray cterm=underline gui=underline hi ansiBlink cterm=standout gui=undercurl hi ansiBlinkBlack ctermfg=Black guifg=Black cterm=standout gui=undercurl hi ansiBlinkRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=undercurl hi ansiBlinkGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=undercurl hi ansiBlinkYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=undercurl hi ansiBlinkBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=undercurl hi ansiBlinkMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=undercurl hi ansiBlinkCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=undercurl hi ansiBlinkWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=undercurl hi ansiBlinkGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=undercurl hi ansiRapidBlink cterm=standout gui=undercurl hi ansiRapidBlinkBlack ctermfg=Black guifg=Black cterm=standout gui=undercurl hi ansiRapidBlinkRed ctermfg=DarkRed guifg=DarkRed cterm=standout gui=undercurl hi ansiRapidBlinkGreen ctermfg=DarkGreen guifg=DarkGreen cterm=standout gui=undercurl hi ansiRapidBlinkYellow ctermfg=DarkYellow guifg=DarkYellow cterm=standout gui=undercurl hi ansiRapidBlinkBlue ctermfg=DarkBlue guifg=DarkBlue cterm=standout gui=undercurl hi ansiRapidBlinkMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=standout gui=undercurl hi ansiRapidBlinkCyan ctermfg=DarkCyan guifg=DarkCyan cterm=standout gui=undercurl hi ansiRapidBlinkWhite ctermfg=LightGray guifg=LightGray cterm=standout gui=undercurl hi ansiRapidBlinkGray ctermfg=DarkGray guifg=DarkGray cterm=standout gui=undercurl hi ansiRV cterm=reverse gui=reverse hi ansiRVBlack ctermfg=Black guifg=Black cterm=reverse gui=reverse hi ansiRVRed ctermfg=DarkRed guifg=DarkRed cterm=reverse gui=reverse hi ansiRVGreen ctermfg=DarkGreen guifg=DarkGreen cterm=reverse gui=reverse hi ansiRVYellow ctermfg=DarkYellow guifg=DarkYellow cterm=reverse gui=reverse hi ansiRVBlue ctermfg=DarkBlue guifg=DarkBlue cterm=reverse gui=reverse hi ansiRVMagenta ctermfg=DarkMagenta guifg=DarkMagenta cterm=reverse gui=reverse hi ansiRVCyan ctermfg=DarkCyan guifg=DarkCyan cterm=reverse gui=reverse hi ansiRVWhite ctermfg=LightGray guifg=LightGray cterm=reverse gui=reverse hi ansiRVGray ctermfg=DarkGray guifg=DarkGray cterm=reverse gui=reverse hi ansiBoldDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=bold gui=bold hi ansiUnderlineDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=underline gui=underline hi ansiBlackDefault ctermfg=Black ctermbg=NONE guifg=Black guibg=NONE cterm=NONE gui=NONE hi ansiRedDefault ctermfg=DarkRed ctermbg=NONE guifg=DarkRed guibg=NONE cterm=NONE gui=NONE hi ansiGreenDefault ctermfg=DarkGreen ctermbg=NONE guifg=DarkGreen guibg=NONE cterm=NONE gui=NONE hi ansiYellowDefault ctermfg=DarkYellow ctermbg=NONE guifg=DarkYellow guibg=NONE cterm=NONE gui=NONE hi ansiBlueDefault ctermfg=DarkBlue ctermbg=NONE guifg=DarkBlue guibg=NONE cterm=NONE gui=NONE hi ansiMagentaDefault ctermfg=DarkMagenta ctermbg=NONE guifg=DarkMagenta guibg=NONE cterm=NONE gui=NONE hi ansiCyanDefault ctermfg=DarkCyan ctermbg=NONE guifg=DarkCyan guibg=NONE cterm=NONE gui=NONE hi ansiWhiteDefault ctermfg=LightGray ctermbg=NONE guifg=LightGray guibg=NONE cterm=NONE gui=NONE hi ansiGrayDefault ctermfg=DarkGray ctermbg=NONE guifg=DarkGray guibg=NONE cterm=NONE gui=NONE hi ansiDefaultDefault ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE cterm=NONE gui=NONE hi ansiDefaultBlack ctermfg=NONE ctermbg=Black guifg=NONE guibg=Black cterm=NONE gui=NONE hi ansiDefaultRed ctermfg=NONE ctermbg=DarkRed guifg=NONE guibg=DarkRed cterm=NONE gui=NONE hi ansiDefaultGreen ctermfg=NONE ctermbg=DarkGreen guifg=NONE guibg=DarkGreen cterm=NONE gui=NONE hi ansiDefaultYellow ctermfg=NONE ctermbg=DarkYellow guifg=NONE guibg=DarkYellow cterm=NONE gui=NONE hi ansiDefaultBlue ctermfg=NONE ctermbg=DarkBlue guifg=NONE guibg=DarkBlue cterm=NONE gui=NONE hi ansiDefaultMagenta ctermfg=NONE ctermbg=DarkMagenta guifg=NONE guibg=DarkMagenta cterm=NONE gui=NONE hi ansiDefaultCyan ctermfg=NONE ctermbg=DarkCyan guifg=NONE guibg=DarkCyan cterm=NONE gui=NONE hi ansiDefaultWhite ctermfg=NONE ctermbg=LightGray guifg=NONE guibg=LightGray cterm=NONE gui=NONE hi ansiDefaultGray ctermfg=NONE ctermbg=DarkGray guifg=NONE guibg=DarkGray cterm=NONE gui=NONE hi ansiBlackBlack ctermfg=Black ctermbg=Black guifg=Black guibg=Black cterm=NONE gui=NONE hi ansiRedBlack ctermfg=DarkRed ctermbg=Black guifg=DarkRed guibg=Black cterm=NONE gui=NONE hi ansiGreenBlack ctermfg=DarkGreen ctermbg=Black guifg=DarkGreen guibg=Black cterm=NONE gui=NONE hi ansiYellowBlack ctermfg=DarkYellow ctermbg=Black guifg=DarkYellow guibg=Black cterm=NONE gui=NONE hi ansiBlueBlack ctermfg=DarkBlue ctermbg=Black guifg=DarkBlue guibg=Black cterm=NONE gui=NONE hi ansiMagentaBlack ctermfg=DarkMagenta ctermbg=Black guifg=DarkMagenta guibg=Black cterm=NONE gui=NONE hi ansiCyanBlack ctermfg=DarkCyan ctermbg=Black guifg=DarkCyan guibg=Black cterm=NONE gui=NONE hi ansiWhiteBlack ctermfg=LightGray ctermbg=Black guifg=LightGray guibg=Black cterm=NONE gui=NONE hi ansiGrayBlack ctermfg=DarkGray ctermbg=Black guifg=DarkGray guibg=Black cterm=NONE gui=NONE hi ansiBlackRed ctermfg=Black ctermbg=DarkRed guifg=Black guibg=DarkRed cterm=NONE gui=NONE hi ansiRedRed ctermfg=DarkRed ctermbg=DarkRed guifg=DarkRed guibg=DarkRed cterm=NONE gui=NONE hi ansiGreenRed ctermfg=DarkGreen ctermbg=DarkRed guifg=DarkGreen guibg=DarkRed cterm=NONE gui=NONE hi ansiYellowRed ctermfg=DarkYellow ctermbg=DarkRed guifg=DarkYellow guibg=DarkRed cterm=NONE gui=NONE hi ansiBlueRed ctermfg=DarkBlue ctermbg=DarkRed guifg=DarkBlue guibg=DarkRed cterm=NONE gui=NONE hi ansiMagentaRed ctermfg=DarkMagenta ctermbg=DarkRed guifg=DarkMagenta guibg=DarkRed cterm=NONE gui=NONE hi ansiCyanRed ctermfg=DarkCyan ctermbg=DarkRed guifg=DarkCyan guibg=DarkRed cterm=NONE gui=NONE hi ansiWhiteRed ctermfg=LightGray ctermbg=DarkRed guifg=LightGray guibg=DarkRed cterm=NONE gui=NONE hi ansiGrayRed ctermfg=DarkGray ctermbg=DarkRed guifg=DarkGray guibg=DarkRed cterm=NONE gui=NONE hi ansiBlackGreen ctermfg=Black ctermbg=DarkGreen guifg=Black guibg=DarkGreen cterm=NONE gui=NONE hi ansiRedGreen ctermfg=DarkRed ctermbg=DarkGreen guifg=DarkRed guibg=DarkGreen cterm=NONE gui=NONE hi ansiGreenGreen ctermfg=DarkGreen ctermbg=DarkGreen guifg=DarkGreen guibg=DarkGreen cterm=NONE gui=NONE hi ansiYellowGreen ctermfg=DarkYellow ctermbg=DarkGreen guifg=DarkYellow guibg=DarkGreen cterm=NONE gui=NONE hi ansiBlueGreen ctermfg=DarkBlue ctermbg=DarkGreen guifg=DarkBlue guibg=DarkGreen cterm=NONE gui=NONE hi ansiMagentaGreen ctermfg=DarkMagenta ctermbg=DarkGreen guifg=DarkMagenta guibg=DarkGreen cterm=NONE gui=NONE hi ansiCyanGreen ctermfg=DarkCyan ctermbg=DarkGreen guifg=DarkCyan guibg=DarkGreen cterm=NONE gui=NONE hi ansiWhiteGreen ctermfg=LightGray ctermbg=DarkGreen guifg=LightGray guibg=DarkGreen cterm=NONE gui=NONE hi ansiGrayGreen ctermfg=DarkGray ctermbg=DarkGreen guifg=DarkGray guibg=DarkGreen cterm=NONE gui=NONE hi ansiBlackYellow ctermfg=Black ctermbg=DarkYellow guifg=Black guibg=DarkYellow cterm=NONE gui=NONE hi ansiRedYellow ctermfg=DarkRed ctermbg=DarkYellow guifg=DarkRed guibg=DarkYellow cterm=NONE gui=NONE hi ansiGreenYellow ctermfg=DarkGreen ctermbg=DarkYellow guifg=DarkGreen guibg=DarkYellow cterm=NONE gui=NONE hi ansiYellowYellow ctermfg=DarkYellow ctermbg=DarkYellow guifg=DarkYellow guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlueYellow ctermfg=DarkBlue ctermbg=DarkYellow guifg=DarkBlue guibg=DarkYellow cterm=NONE gui=NONE hi ansiMagentaYellow ctermfg=DarkMagenta ctermbg=DarkYellow guifg=DarkMagenta guibg=DarkYellow cterm=NONE gui=NONE hi ansiCyanYellow ctermfg=DarkCyan ctermbg=DarkYellow guifg=DarkCyan guibg=DarkYellow cterm=NONE gui=NONE hi ansiWhiteYellow ctermfg=LightGray ctermbg=DarkYellow guifg=LightGray guibg=DarkYellow cterm=NONE gui=NONE hi ansiGrayYellow ctermfg=DarkGray ctermbg=DarkYellow guifg=DarkGray guibg=DarkYellow cterm=NONE gui=NONE hi ansiBlackBlue ctermfg=Black ctermbg=DarkBlue guifg=Black guibg=DarkBlue cterm=NONE gui=NONE hi ansiRedBlue ctermfg=DarkRed ctermbg=DarkBlue guifg=DarkRed guibg=DarkBlue cterm=NONE gui=NONE hi ansiGreenBlue ctermfg=DarkGreen ctermbg=DarkBlue guifg=DarkGreen guibg=DarkBlue cterm=NONE gui=NONE hi ansiYellowBlue ctermfg=DarkYellow ctermbg=DarkBlue guifg=DarkYellow guibg=DarkBlue cterm=NONE gui=NONE hi ansiBlueBlue ctermfg=DarkBlue ctermbg=DarkBlue guifg=DarkBlue guibg=DarkBlue cterm=NONE gui=NONE hi ansiMagentaBlue ctermfg=DarkMagenta ctermbg=DarkBlue guifg=DarkMagenta guibg=DarkBlue cterm=NONE gui=NONE hi ansiCyanBlue ctermfg=DarkCyan ctermbg=DarkBlue guifg=DarkCyan guibg=DarkBlue cterm=NONE gui=NONE hi ansiWhiteBlue ctermfg=LightGray ctermbg=DarkBlue guifg=LightGray guibg=DarkBlue cterm=NONE gui=NONE hi ansiGrayBlue ctermfg=DarkGray ctermbg=DarkBlue guifg=DarkGray guibg=DarkBlue cterm=NONE gui=NONE hi ansiBlackMagenta ctermfg=Black ctermbg=DarkMagenta guifg=Black guibg=DarkMagenta cterm=NONE gui=NONE hi ansiRedMagenta ctermfg=DarkRed ctermbg=DarkMagenta guifg=DarkRed guibg=DarkMagenta cterm=NONE gui=NONE hi ansiGreenMagenta ctermfg=DarkGreen ctermbg=DarkMagenta guifg=DarkGreen guibg=DarkMagenta cterm=NONE gui=NONE hi ansiYellowMagenta ctermfg=DarkYellow ctermbg=DarkMagenta guifg=DarkYellow guibg=DarkMagenta cterm=NONE gui=NONE hi ansiBlueMagenta ctermfg=DarkBlue ctermbg=DarkMagenta guifg=DarkBlue guibg=DarkMagenta cterm=NONE gui=NONE hi ansiMagentaMagenta ctermfg=DarkMagenta ctermbg=DarkMagenta guifg=DarkMagenta guibg=DarkMagenta cterm=NONE gui=NONE hi ansiCyanMagenta ctermfg=DarkCyan ctermbg=DarkMagenta guifg=DarkCyan guibg=DarkMagenta cterm=NONE gui=NONE hi ansiWhiteMagenta ctermfg=LightGray ctermbg=DarkMagenta guifg=LightGray guibg=DarkMagenta cterm=NONE gui=NONE hi ansiGrayMagenta ctermfg=DarkGray ctermbg=DarkMagenta guifg=DarkGray guibg=DarkMagenta cterm=NONE gui=NONE hi ansiBlackCyan ctermfg=Black ctermbg=DarkCyan guifg=Black guibg=DarkCyan cterm=NONE gui=NONE hi ansiRedCyan ctermfg=DarkRed ctermbg=DarkCyan guifg=DarkRed guibg=DarkCyan cterm=NONE gui=NONE hi ansiGreenCyan ctermfg=DarkGreen ctermbg=DarkCyan guifg=DarkGreen guibg=DarkCyan cterm=NONE gui=NONE hi ansiYellowCyan ctermfg=DarkYellow ctermbg=DarkCyan guifg=DarkYellow guibg=DarkCyan cterm=NONE gui=NONE hi ansiBlueCyan ctermfg=DarkBlue ctermbg=DarkCyan guifg=DarkBlue guibg=DarkCyan cterm=NONE gui=NONE hi ansiMagentaCyan ctermfg=DarkMagenta ctermbg=DarkCyan guifg=DarkMagenta guibg=DarkCyan cterm=NONE gui=NONE hi ansiCyanCyan ctermfg=DarkCyan ctermbg=DarkCyan guifg=DarkCyan guibg=DarkCyan cterm=NONE gui=NONE hi ansiWhiteCyan ctermfg=LightGray ctermbg=DarkCyan guifg=LightGray guibg=DarkCyan cterm=NONE gui=NONE hi ansiGrayCyan ctermfg=DarkGray ctermbg=DarkCyan guifg=DarkGray guibg=DarkCyan cterm=NONE gui=NONE hi ansiBlackWhite ctermfg=Black ctermbg=LightGray guifg=Black guibg=LightGray cterm=NONE gui=NONE hi ansiRedWhite ctermfg=DarkRed ctermbg=LightGray guifg=DarkRed guibg=LightGray cterm=NONE gui=NONE hi ansiGreenWhite ctermfg=DarkGreen ctermbg=LightGray guifg=DarkGreen guibg=LightGray cterm=NONE gui=NONE hi ansiYellowWhite ctermfg=DarkYellow ctermbg=LightGray guifg=DarkYellow guibg=LightGray cterm=NONE gui=NONE hi ansiBlueWhite ctermfg=DarkBlue ctermbg=LightGray guifg=DarkBlue guibg=LightGray cterm=NONE gui=NONE hi ansiMagentaWhite ctermfg=DarkMagenta ctermbg=LightGray guifg=DarkMagenta guibg=LightGray cterm=NONE gui=NONE hi ansiCyanWhite ctermfg=DarkCyan ctermbg=LightGray guifg=DarkCyan guibg=LightGray cterm=NONE gui=NONE hi ansiWhiteWhite ctermfg=LightGray ctermbg=LightGray guifg=LightGray guibg=LightGray cterm=NONE gui=NONE hi ansiGrayWhite ctermfg=DarkGray ctermbg=LightGray guifg=DarkGray guibg=LightGray cterm=NONE gui=NONE endif " call Dret("AnsiEsc#AnsiEsc") endfun " --------------------------------------------------------------------- " s:MultiElementHandler: builds custom syntax highlighting for three or more element ansi escape sequences {{{2 fun! s:MultiElementHandler() " call Dfunc("s:MultiElementHandler()") let curwp= SaveWinPosn(0) keepj 1 keepj norm! 0 let mehcnt = 0 let mehrules = [] while search('\e\[;\=\d\+;\d\+;\d\+\(;\d\+\)*m','cW') let curcol = col(".")+1 call search('m','cW') let mcol = col(".") let ansiesc = strpart(getline("."),curcol,mcol - curcol) let aecodes = split(ansiesc,'[;m]') " call Decho("ansiesc<".ansiesc."> aecodes=".string(aecodes)) let skip = 0 let mod = "NONE," let fg = "" let bg = "" " if the ansiesc is if index(mehrules,ansiesc) == -1 let mehrules+= [ansiesc] for code in aecodes " handle multi-code sequences (38;5;color and 48;5;color) if skip == 38 && code == 5 " handling [38;5 let skip= 385 " call Decho(" 1: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">") continue elseif skip == 385 " handling [38;5;... if has("gui") && has("gui_running") let fg= s:Ansi2Gui(code) else let fg= code endif let skip= 0 " call Decho(" 2: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">") continue elseif skip == 48 && code == 5 " handling [48;5 let skip= 485 " call Decho(" 3: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">") continue elseif skip == 485 " handling [48;5;... if has("gui") && has("gui_running") let bg= s:Ansi2Gui(code) else let bg= code endif let skip= 0 " call Decho(" 4: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">") continue else let skip= 0 endif " handle single-code sequences if code == 1 let mod=mod."bold," elseif code == 2 let mod=mod."italic," elseif code == 3 let mod=mod."standout," elseif code == 4 let mod=mod."underline," elseif code == 5 || code == 6 let mod=mod."undercurl," elseif code == 7 let mod=mod."reverse," elseif code == 30 let fg= "black" elseif code == 31 let fg= "red" elseif code == 32 let fg= "green" elseif code == 33 let fg= "yellow" elseif code == 34 let fg= "blue" elseif code == 35 let fg= "magenta" elseif code == 36 let fg= "cyan" elseif code == 37 let fg= "white" elseif code == 40 let bg= "black" elseif code == 41 let bg= "red" elseif code == 42 let bg= "green" elseif code == 43 let bg= "yellow" elseif code == 44 let bg= "blue" elseif code == 45 let bg= "magenta" elseif code == 46 let bg= "cyan" elseif code == 47 let bg= "white" elseif code == 38 let skip= 38 elseif code == 48 let skip= 48 endif " call Decho(" 5: building code=".code." skip=".skip.": mod<".mod."> fg<".fg."> bg<".bg.">") endfor " fixups let mod= substitute(mod,',$','','') " build syntax-recognition rule let mehcnt = mehcnt + 1 let synrule = "syn region ansiMEH".mehcnt let synrule = synrule.' start="\e\['.ansiesc.'"' let synrule = synrule.' end="\e\["me=e-2' let synrule = synrule." contains=ansiConceal" " call Decho(" exe synrule: ".synrule) exe synrule " build highlighting rule let hirule= "hi ansiMEH".mehcnt if has("gui") && has("gui_running") let hirule=hirule." gui=".mod if fg != ""| let hirule=hirule." guifg=".fg| endif if bg != ""| let hirule=hirule." guibg=".bg| endif else let hirule=hirule." cterm=".mod if fg != ""| let hirule=hirule." ctermfg=".fg| endif if bg != ""| let hirule=hirule." ctermbg=".bg| endif endif " call Decho(" exe hirule: ".hirule) exe hirule endif endwhile call RestoreWinPosn(curwp) " call Dret("s:MultiElementHandler") endfun " --------------------------------------------------------------------- " s:Ansi2Gui: converts an ansi-escape sequence (for 256-color xterms) {{{2 " to an equivalent gui color " colors 0- 15: " colors 16-231: 6x6x6 color cube, code= 16+r*36+g*6+b with r,g,b each in [0,5] " colors 232-255: grayscale ramp, code= 10*gray + 8 with gray in [0,23] (black,white left out) fun! s:Ansi2Gui(code) " call Dfunc("s:Ansi2Gui(code=)".a:code) let guicolor= a:code if a:code < 16 let code2rgb = [ "black", "red3", "green3", "yellow3", "blue3", "magenta3", "cyan3", "gray70", "gray40", "red", "green", "yellow", "royalblue3", "magenta", "cyan", "white"] let guicolor = code2rgb[a:code] elseif a:code >= 232 let code = a:code - 232 let code = 10*code + 8 let guicolor = printf("#%02x%02x%02x",code,code,code) else let code = a:code - 16 let code2rgb = [43,85,128,170,213,255] let r = code2rgb[code/36] let g = code2rgb[(code%36)/6] let b = code2rgb[code%6] let guicolor = printf("#%02x%02x%02x",r,g,b) endif " call Dret("s:Ansi2Gui ".guicolor) return guicolor endfun " --------------------------------------------------------------------- " Restore: {{{1 let &cpo= s:keepcpo unlet s:keepcpo " --------------------------------------------------------------------- " Modelines: {{{1 " vim: ts=12 fdm=marker doc/AnsiEsc.txt [[[1 177 *AnsiEsc.txt* Ansi Escape Sequence Visualization Jan 10, 2015 Author: Charles E. Campbell (remove NOSPAM from Campbell's email first) Copyright: (c) 2004-2014 by Charles E. Campbell *AnsiEsc-copyright* The VIM LICENSE applies to AnsiEsc.vim and AnsiEsc.txt (see |copyright|) except use "AnsiEsc" instead of "Vim". No warranty, express or implied. Use At-Your-Own-Risk. ============================================================================== 1. Contents *AnsiEsc* *AnsiEsc-contents* 1. Contents ...................................|AnsiEsc-contents| 2. AnsiEsc Manual ...................................|AnsiEsc| 3. AnsiEsc History ...................................|AnsiEsc-history| ============================================================================== 2. Manual *AnsiEsc-manual* CONCEAL~ The best option: for this, your vim must have +conceal. Try either > :version :echo has("conceal") < if you have vim v7.3. Your vim needs to have been compiled for "big" or "huge" and to support syntax highlighting. Vim: (v7.2 or earlier) -- ansi escape sequences themselves are Ignore'd~ Ansi escape sequences have the expected effect on subsequent text, but the ansi escape sequences themselves still take up screen columns. The sequences are displayed using "Ignore" highlighting; depending on your colorscheme, this should either make the sequences blend into your background or be visually suppressed. If the sequences aren't suppressed, you need to improve your colorscheme! *:AnsiEsc* USAGE~ :AnsiEsc -- toggles Ansi escape sequence highlighting :AnsiEsc! -- rebuilds highlighting for new/removed three or more element Ansi escape sequences. RESULT~ Ansi escape sequences become concealed or ignored (depending on whether your vim supports Negri's conceal mode), and their effect on subsequent text is emulated with Vim's syntax highlighting. Syntax highlighting for one and two element codes are hard-coded into AnsiEsc.vim. There are too many possibilities for three or more element codes; these are supported by examining the file for such sequences and only building syntax highlighting rules for such sequences as are actually present in the document. EXAMPLE~ You'll want to use :AnsiEsc to see the following properly! Color Escape Sequences  -   1   2   3   4   5   7  black black black black black black black red red red red red red red green green green green green green green yellow yellow yellow yellow yellow yellow yellow blue blue blue blue blue blue blue magenta magenta magenta magenta magenta magenta magenta cyan cyan cyan cyan cyan cyan cyan white white white white white white white Black B B B B B B B B Red R R R R R R R R Green G G G G G G G G Yellow Y Y Y Y Y Y Y Y Blue B B B B B B B B Magenta M M M M M M M M Cyan C C C C C C C C White W W W W W W W W Here's the vim logo: / \ / \ / \ / \ +----+ +----+ \ ++ ++ +- | \ /| | / / \ X | | / /O \ \| | / /+-+ +-\//-+ | |/ / | | | v | | / / | | | + +| | / | |/| |\/|| +----\ +-+ +-+ ++ \ / \ / PROBLEM WITH EMBEDDING: AnsiEsc plugin highlighting cannot be embedded in another syntax language. AnsiEsc uses the syntax highlighting engine, so it is effectively another syntax highlighting language. But, there are major differences: * It supports being turned on and off * AnsiEsc is not a syntax highlighting file, it is a plugin * AnsiEsc dynamically determines some syntax highlighting by analyzing what's needed in the current file. To do a syntax highlighting file would involve an inordinate quantity of permutations, resulting in a file that would take much time to load (about a half hour with only a partially complete set of permutations on my system). Normally to embed a syntax highlighting language in another would involve a pair of syntax highlighting commands such as: syn include @AnsiEsc syn region ... defines the region where AnsiEsc \ highlighting is to occur ... contains=@AnsiEsc placed in the other syntax file's definitions. That won't work with AnsiEc because, again, AnsiEsc is not a syntax highlighting file. ============================================================================== 3. AnsiEsc History *AnsiEsc-history* {{{1 v13 Apr 12, 2012 * (Peter Brant) a "conceal" was left on a syntax definition in a no-conceal-support if block. Fixed. Apr 17, 2012 * (Ingo Karkat) support for the "reverse" attribute May 13, 2014 * (Jason Schmidt) reported that [39m didn't work. This means revert to default foreground. Similarly, [49m didn't work (which means revert to default background). Dec 11, 2014 * Implemented implicit foreground/background Jan 10, 2015 * (Evgeny Lukianchikov) provided XUbuntu support for no-ansi-sequence (AnsiNone) v12 Jul 23, 2010 * changed conc to |'cole'| to correspond to vim 7.3's change * for menus, &go =~# used to insure correct case Aug 10, 2010 * (Rainer M Schmid) changed conceallevel setting to depend on whether the version is before vim 7.3; for 7.3, also sets concealcursor * Restores conc/cole/cocu settings when AnsiEsc is toggled off. Dec 13, 2010 * Included some additional sequences involving 0 Feb 22, 2011 * for menus, &go =~# used to insure correct case v11 Apr 20, 2010 * AnsiEsc now supports enabling/disabling via a menu * [K and [00m now supported (as grep --color=always issues them) v10 May 06, 2009 * Three or more codes in an ANSI escape sequence are supported by building custom syntax and highlighting commands. May 20, 2009 * cecutil bugfix v9 May 12, 2008 * Now in plugin + autoload format. Provides :AnsiEsc command to toggle Ansi-escape sequence processing. Jan 01, 2009 * Applies Ignore highlighting to extended Ansi escape sequences support 256-colors. Mar 18, 2009 * Includes "rapid blink" ansi escape sequences. Vim doesn't have a blinking attribute, so such text uses "standout" for vim and "undercurl" for gvim. v8 Aug 16, 2006 * Uses undercurl, and so is only available for vim 7.0 v7 Dec 14, 2004 * Works better with vim2ansi output and Vince Negri's conceal patch for vim 6.x. v2 Nov 24, 2004 * This version didn't use Vince Negri's conceal patch (used Ignore highlighting) ============================================================================== Modelines: {{{1 vim:tw=78:ts=8:ft=help:fdm=marker: plugin/AnsiEscPlugin.vim [[[1 32 " AnsiEscPlugin.vim " Author: Charles E. Campbell " Date: Apr 07, 2010 " Version: 13i " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_AnsiEscPlugin") finish endif let g:loaded_AnsiEscPlugin = "v13i" let s:keepcpo = &cpo set cpo&vim " --------------------------------------------------------------------- " Public Interface: {{{1 com! -bang -nargs=0 AnsiEsc :call AnsiEsc#AnsiEsc(0) " DrChip Menu Support: {{{2 if !exists('g:no_drchip_menu') && !exists('g:no_ansiesc_menu') if has("gui_running") && has("menu") && &go =~ 'm' if !exists("g:DrChipTopLvlMenu") let g:DrChipTopLvlMenu= "DrChip." endif exe 'menu '.g:DrChipTopLvlMenu.'AnsiEsc.Start:AnsiEsc :AnsiEsc' endif endif " --------------------------------------------------------------------- " Restore: {{{1 let &cpo= s:keepcpo unlet s:keepcpo " vim: ts=4 fdm=marker plugin/cecutil.vim [[[1 538 " cecutil.vim : save/restore window position " save/restore mark position " save/restore selected user maps " Author: Charles E. Campbell " Version: 18i ASTRO-ONLY " Date: Oct 21, 2013 " " Saving Restoring Destroying Marks: {{{1 " call SaveMark(markname) let savemark= SaveMark(markname) " call RestoreMark(markname) call RestoreMark(savemark) " call DestroyMark(markname) " commands: SM RM DM " " Saving Restoring Destroying Window Position: {{{1 " call SaveWinPosn() let winposn= SaveWinPosn() " call RestoreWinPosn() call RestoreWinPosn(winposn) " \swp : save current window/buffer's position " \rwp : restore current window/buffer's previous position " commands: SWP RWP " " Saving And Restoring User Maps: {{{1 " call SaveUserMaps(mapmode,maplead,mapchx,suffix) " call RestoreUserMaps(suffix) " " GetLatestVimScripts: 1066 1 :AutoInstall: cecutil.vim " " You believe that God is one. You do well. The demons also {{{1 " believe, and shudder. But do you want to know, vain man, that " faith apart from works is dead? (James 2:19,20 WEB) "redraw!|call inputsave()|call input("Press to continue")|call inputrestore() " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_cecutil") finish endif let g:loaded_cecutil = "v18i" let s:keepcpo = &cpo set cpo&vim "DechoRemOn " ======================= " Public Interface: {{{1 " ======================= " --------------------------------------------------------------------- " Map Interface: {{{2 if !exists('g:no_plugin_maps') && !exists('g:no_cecutil_maps') if !hasmapto('SaveWinPosn') map swp SaveWinPosn endif if !hasmapto('RestoreWinPosn') map rwp RestoreWinPosn endif endif nmap SaveWinPosn :call SaveWinPosn() nmap RestoreWinPosn :call RestoreWinPosn() " --------------------------------------------------------------------- " Command Interface: {{{2 com! -bar -nargs=0 SWP call SaveWinPosn() com! -bar -nargs=? RWP call RestoreWinPosn() com! -bar -nargs=1 SM call SaveMark() com! -bar -nargs=1 RM call RestoreMark() com! -bar -nargs=1 DM call DestroyMark() com! -bar -nargs=1 WLR call s:WinLineRestore() if v:version < 630 let s:modifier= "sil! " else let s:modifier= "sil! keepj " endif " =============== " Functions: {{{1 " =============== " --------------------------------------------------------------------- " SaveWinPosn: {{{2 " let winposn= SaveWinPosn() will save window position in winposn variable " call SaveWinPosn() will save window position in b:cecutil_winposn{b:cecutil_iwinposn} " let winposn= SaveWinPosn(0) will *only* save window position in winposn variable (no stacking done) fun! SaveWinPosn(...) " echomsg "Decho: SaveWinPosn() a:0=".a:0 if line("$") == 1 && getline(1) == "" " echomsg "Decho: SaveWinPosn : empty buffer" return "" endif let so_keep = &l:so let siso_keep = &siso let ss_keep = &l:ss setlocal so=0 siso=0 ss=0 let swline = line(".") " save-window line in file let swcol = col(".") " save-window column in file if swcol >= col("$") let swcol= swcol + virtcol(".") - virtcol("$") " adjust for virtual edit (cursor past end-of-line) endif let swwline = winline() - 1 " save-window window line let swwcol = virtcol(".") - wincol() " save-window window column let savedposn = "" " echomsg "Decho: sw[".swline.",".swcol."] sww[".swwline.",".swwcol."]" let savedposn = "call GoWinbufnr(".winbufnr(0).")" let savedposn = savedposn."|".s:modifier.swline let savedposn = savedposn."|".s:modifier."norm! 0z\" if swwline > 0 let savedposn= savedposn.":".s:modifier."call s:WinLineRestore(".(swwline+1).")\" endif if swwcol > 0 let savedposn= savedposn.":".s:modifier."norm! 0".swwcol."zl\" endif let savedposn = savedposn.":".s:modifier."call cursor(".swline.",".swcol.")\" " save window position in " b:cecutil_winposn_{iwinposn} (stack) " only when SaveWinPosn() is used if a:0 == 0 if !exists("b:cecutil_iwinposn") let b:cecutil_iwinposn= 1 else let b:cecutil_iwinposn= b:cecutil_iwinposn + 1 endif " echomsg "Decho: saving posn to SWP stack" let b:cecutil_winposn{b:cecutil_iwinposn}= savedposn endif let &l:so = so_keep let &siso = siso_keep let &l:ss = ss_keep " if exists("b:cecutil_iwinposn") " Decho " echomsg "Decho: b:cecutil_winpos{".b:cecutil_iwinposn."}[".b:cecutil_winposn{b:cecutil_iwinposn}."]" " else " Decho " echomsg "Decho: b:cecutil_iwinposn doesn't exist" " endif " Decho " echomsg "Decho: SaveWinPosn [".savedposn."]" return savedposn endfun " --------------------------------------------------------------------- " RestoreWinPosn: {{{2 " call RestoreWinPosn() " call RestoreWinPosn(winposn) fun! RestoreWinPosn(...) " echomsg "Decho: RestoreWinPosn() a:0=".a:0 " echomsg "Decho: getline(1)<".getline(1).">" " echomsg "Decho: line(.)=".line(".") if line("$") == 1 && getline(1) == "" " echomsg "Decho: RestoreWinPosn : empty buffer" return "" endif let so_keep = &l:so let siso_keep = &l:siso let ss_keep = &l:ss setlocal so=0 siso=0 ss=0 if a:0 == 0 || a:1 == "" " use saved window position in b:cecutil_winposn{b:cecutil_iwinposn} if it exists if exists("b:cecutil_iwinposn") && exists("b:cecutil_winposn{b:cecutil_iwinposn}") " echomsg "Decho: using stack b:cecutil_winposn{".b:cecutil_iwinposn."}<".b:cecutil_winposn{b:cecutil_iwinposn}.">" try exe s:modifier.b:cecutil_winposn{b:cecutil_iwinposn} catch /^Vim\%((\a\+)\)\=:E749/ " ignore empty buffer error messages endtry " normally drop top-of-stack by one " but while new top-of-stack doesn't exist " drop top-of-stack index by one again if b:cecutil_iwinposn >= 1 unlet b:cecutil_winposn{b:cecutil_iwinposn} let b:cecutil_iwinposn= b:cecutil_iwinposn - 1 while b:cecutil_iwinposn >= 1 && !exists("b:cecutil_winposn{b:cecutil_iwinposn}") let b:cecutil_iwinposn= b:cecutil_iwinposn - 1 endwhile if b:cecutil_iwinposn < 1 unlet b:cecutil_iwinposn endif endif else echohl WarningMsg echomsg "***warning*** need to SaveWinPosn first!" echohl None endif else " handle input argument " echomsg "Decho: using input a:1<".a:1.">" " use window position passed to this function exe a:1 " remove a:1 pattern from b:cecutil_winposn{b:cecutil_iwinposn} stack if exists("b:cecutil_iwinposn") let jwinposn= b:cecutil_iwinposn while jwinposn >= 1 " search for a:1 in iwinposn..1 if exists("b:cecutil_winposn{jwinposn}") " if it exists if a:1 == b:cecutil_winposn{jwinposn} " and the pattern matches unlet b:cecutil_winposn{jwinposn} " unlet it if jwinposn == b:cecutil_iwinposn " if at top-of-stack let b:cecutil_iwinposn= b:cecutil_iwinposn - 1 " drop stacktop by one endif endif endif let jwinposn= jwinposn - 1 endwhile endif endif " Seems to be something odd: vertical motions after RWP " cause jump to first column. The following fixes that. " Note: was using wincol()>1, but with signs, a cursor " at column 1 yields wincol()==3. Beeping ensued. let vekeep= &ve set ve=all if virtcol('.') > 1 exe s:modifier."norm! hl" elseif virtcol(".") < virtcol("$") exe s:modifier."norm! lh" endif let &ve= vekeep let &l:so = so_keep let &l:siso = siso_keep let &l:ss = ss_keep " echomsg "Decho: RestoreWinPosn" endfun " --------------------------------------------------------------------- " s:WinLineRestore: {{{2 fun! s:WinLineRestore(swwline) " echomsg "Decho: s:WinLineRestore(swwline=".a:swwline.")" while winline() < a:swwline let curwinline= winline() exe s:modifier."norm! \" if curwinline == winline() break endif endwhile " echomsg "Decho: s:WinLineRestore" endfun " --------------------------------------------------------------------- " GoWinbufnr: go to window holding given buffer (by number) {{{2 " Prefers current window; if its buffer number doesn't match, " then will try from topleft to bottom right fun! GoWinbufnr(bufnum) " call Dfunc("GoWinbufnr(".a:bufnum.")") if winbufnr(0) == a:bufnum " call Dret("GoWinbufnr : winbufnr(0)==a:bufnum") return endif winc t let first=1 while winbufnr(0) != a:bufnum && (first || winnr() != 1) winc w let first= 0 endwhile " call Dret("GoWinbufnr") endfun " --------------------------------------------------------------------- " SaveMark: sets up a string saving a mark position. {{{2 " For example, SaveMark("a") " Also sets up a global variable, g:savemark_{markname} fun! SaveMark(markname) " call Dfunc("SaveMark(markname<".a:markname.">)") let markname= a:markname if strpart(markname,0,1) !~ '\a' let markname= strpart(markname,1,1) endif " call Decho("markname=".markname) let lzkeep = &lz set lz if 1 <= line("'".markname) && line("'".markname) <= line("$") let winposn = SaveWinPosn(0) exe s:modifier."norm! `".markname let savemark = SaveWinPosn(0) let g:savemark_{markname} = savemark let savemark = markname.savemark call RestoreWinPosn(winposn) else let g:savemark_{markname} = "" let savemark = "" endif let &lz= lzkeep " call Dret("SaveMark : savemark<".savemark.">") return savemark endfun " --------------------------------------------------------------------- " RestoreMark: {{{2 " call RestoreMark("a") -or- call RestoreMark(savemark) fun! RestoreMark(markname) " call Dfunc("RestoreMark(markname<".a:markname.">)") if strlen(a:markname) <= 0 " call Dret("RestoreMark : no such mark") return endif let markname= strpart(a:markname,0,1) if markname !~ '\a' " handles 'a -> a styles let markname= strpart(a:markname,1,1) endif " call Decho("markname=".markname." strlen(a:markname)=".strlen(a:markname)) let lzkeep = &lz set lz let winposn = SaveWinPosn(0) if strlen(a:markname) <= 2 if exists("g:savemark_{markname}") && strlen(g:savemark_{markname}) != 0 " use global variable g:savemark_{markname} " call Decho("use savemark list") call RestoreWinPosn(g:savemark_{markname}) exe "norm! m".markname endif else " markname is a savemark command (string) " call Decho("use savemark command") let markcmd= strpart(a:markname,1) call RestoreWinPosn(markcmd) exe "norm! m".markname endif call RestoreWinPosn(winposn) let &lz = lzkeep " call Dret("RestoreMark") endfun " --------------------------------------------------------------------- " DestroyMark: {{{2 " call DestroyMark("a") -- destroys mark fun! DestroyMark(markname) " call Dfunc("DestroyMark(markname<".a:markname.">)") " save options and set to standard values let reportkeep= &report let lzkeep = &lz set lz report=10000 let markname= strpart(a:markname,0,1) if markname !~ '\a' " handles 'a -> a styles let markname= strpart(a:markname,1,1) endif " call Decho("markname=".markname) let curmod = &mod let winposn = SaveWinPosn(0) 1 let lineone = getline(".") exe "k".markname d put! =lineone let &mod = curmod call RestoreWinPosn(winposn) " restore options to user settings let &report = reportkeep let &lz = lzkeep " call Dret("DestroyMark") endfun " --------------------------------------------------------------------- " QArgSplitter: to avoid \ processing by , is needed. {{{2 " However, doesn't split at all, so this one returns a list " with splits at all whitespace (only!), plus a leading length-of-list. " The resulting list: qarglist[0] corresponds to a:0 " qarglist[i] corresponds to a:{i} fun! QArgSplitter(qarg) " call Dfunc("QArgSplitter(qarg<".a:qarg.">)") let qarglist = split(a:qarg) let qarglistlen = len(qarglist) let qarglist = insert(qarglist,qarglistlen) " call Dret("QArgSplitter ".string(qarglist)) return qarglist endfun " --------------------------------------------------------------------- " ListWinPosn: {{{2 "fun! ListWinPosn() " Decho " if !exists("b:cecutil_iwinposn") || b:cecutil_iwinposn == 0 " Decho " call Decho("nothing on SWP stack") " Decho " else " Decho " let jwinposn= b:cecutil_iwinposn " Decho " while jwinposn >= 1 " Decho " if exists("b:cecutil_winposn{jwinposn}") " Decho " call Decho("winposn{".jwinposn."}<".b:cecutil_winposn{jwinposn}.">") " Decho " else " Decho " call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho " endif " Decho " let jwinposn= jwinposn - 1 " Decho " endwhile " Decho " endif " Decho "endfun " Decho "com! -nargs=0 LWP call ListWinPosn() " Decho " --------------------------------------------------------------------- " SaveUserMaps: this function sets up a script-variable (s:restoremap) {{{2 " which can be used to restore user maps later with " call RestoreUserMaps() " " mapmode - see :help maparg for details (n v o i c l "") " ex. "n" = Normal " The letters "b" and "u" are optional prefixes; " The "u" means that the map will also be unmapped " The "b" means that the map has a qualifier " ex. "un" = Normal + unmapping " ex. "bn" = Normal + " ex. "bun" = Normal + + unmapping " ex. "ubn" = Normal + + unmapping " maplead - see mapchx " mapchx - "" handled as a single map item. " ex. "" " - "string" a string of single letters which are actually " multiple two-letter maps (using the maplead: " maplead . each_character_in_string) " ex. maplead="\" and mapchx="abc" saves user mappings for " \a, \b, and \c " Of course, if maplead is "", then for mapchx="abc", " mappings for a, b, and c are saved. " - :something handled as a single map item, w/o the ":" " ex. mapchx= ":abc" will save a mapping for "abc" " suffix - a string unique to your plugin " ex. suffix= "DrawIt" fun! SaveUserMaps(mapmode,maplead,mapchx,suffix) " call Dfunc("SaveUserMaps(mapmode<".a:mapmode."> maplead<".a:maplead."> mapchx<".a:mapchx."> suffix<".a:suffix.">)") if !exists("s:restoremap_{a:suffix}") " initialize restoremap_suffix to null string let s:restoremap_{a:suffix}= "" endif " set up dounmap: if 1, then save and unmap (a:mapmode leads with a "u") " if 0, save only let mapmode = a:mapmode let dounmap = 0 let dobuffer = "" while mapmode =~ '^[bu]' if mapmode =~ '^u' let dounmap = 1 let mapmode = strpart(a:mapmode,1) elseif mapmode =~ '^b' let dobuffer = " " let mapmode = strpart(a:mapmode,1) endif endwhile " call Decho("dounmap=".dounmap." dobuffer<".dobuffer.">") " save single map :...something... if strpart(a:mapchx,0,1) == ':' " call Decho("save single map :...something...") let amap= strpart(a:mapchx,1) if amap == "|" || amap == "\" let amap= "\".amap endif let amap = a:maplead.amap let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:sil! ".mapmode."unmap ".dobuffer.amap if maparg(amap,mapmode) != "" let maprhs = substitute(maparg(amap,mapmode),'|','','ge') let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:".mapmode."map ".dobuffer.amap." ".maprhs endif if dounmap exe "sil! ".mapmode."unmap ".dobuffer.amap endif " save single map elseif strpart(a:mapchx,0,1) == '<' " call Decho("save single map ") let amap = a:mapchx if amap == "|" || amap == "\" let amap= "\".amap " call Decho("amap[[".amap."]]") endif let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|sil! ".mapmode."unmap ".dobuffer.amap if maparg(a:mapchx,mapmode) != "" let maprhs = substitute(maparg(amap,mapmode),'|','','ge') let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".dobuffer.amap." ".maprhs endif if dounmap exe "sil! ".mapmode."unmap ".dobuffer.amap endif " save multiple maps else " call Decho("save multiple maps") let i= 1 while i <= strlen(a:mapchx) let amap= a:maplead.strpart(a:mapchx,i-1,1) if amap == "|" || amap == "\" let amap= "\".amap endif let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|sil! ".mapmode."unmap ".dobuffer.amap if maparg(amap,mapmode) != "" let maprhs = substitute(maparg(amap,mapmode),'|','','ge') let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".dobuffer.amap." ".maprhs endif if dounmap exe "sil! ".mapmode."unmap ".dobuffer.amap endif let i= i + 1 endwhile endif " call Dret("SaveUserMaps : restoremap_".a:suffix.": ".s:restoremap_{a:suffix}) endfun " --------------------------------------------------------------------- " RestoreUserMaps: {{{2 " Used to restore user maps saved by SaveUserMaps() fun! RestoreUserMaps(suffix) " call Dfunc("RestoreUserMaps(suffix<".a:suffix.">)") if exists("s:restoremap_{a:suffix}") let s:restoremap_{a:suffix}= substitute(s:restoremap_{a:suffix},'|\s*$','','e') if s:restoremap_{a:suffix} != "" " call Decho("exe ".s:restoremap_{a:suffix}) exe "sil! ".s:restoremap_{a:suffix} endif unlet s:restoremap_{a:suffix} endif " call Dret("RestoreUserMaps") endfun " ============== " Restore: {{{1 " ============== let &cpo= s:keepcpo unlet s:keepcpo " ================ " Modelines: {{{1 " ================ " vim: ts=4 fdm=marker t/lib/File/Slurp.pm [[[1 1261 package File::Slurp; use 5.6.2 ; use strict; use warnings ; use Carp ; use Exporter ; use Fcntl qw( :DEFAULT ) ; use POSIX qw( :fcntl_h ) ; use Errno ; #use Symbol ; use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION ) ; @ISA = qw( Exporter ) ; $VERSION = '9999.19'; my @std_export = qw( read_file write_file overwrite_file append_file read_dir ) ; my @edit_export = qw( edit_file edit_file_lines ) ; my @ok_export = qw( ) ; @EXPORT_OK = ( @edit_export, qw( slurp prepend_file ), ) ; %EXPORT_TAGS = ( 'all' => [ @std_export, @edit_export, @EXPORT_OK ], 'edit' => [ @edit_export ], 'std' => [ @std_export ], ) ; @EXPORT = @std_export ; my $max_fast_slurp_size = 1024 * 100 ; my $is_win32 = $^O =~ /win32/i ; # Install subs for various constants that aren't set in older perls # (< 5.005). Fcntl on old perls uses Exporter to define subs without a # () prototype These can't be overridden with the constant pragma or # we get a prototype mismatch. Hence this less than aesthetically # appealing BEGIN block: BEGIN { unless( defined &SEEK_SET ) { *SEEK_SET = sub { 0 }; *SEEK_CUR = sub { 1 }; *SEEK_END = sub { 2 }; } unless( defined &O_BINARY ) { *O_BINARY = sub { 0 }; *O_RDONLY = sub { 0 }; *O_WRONLY = sub { 1 }; } unless ( defined &O_APPEND ) { if ( $^O =~ /olaris/ ) { *O_APPEND = sub { 8 }; *O_CREAT = sub { 256 }; *O_EXCL = sub { 1024 }; } elsif ( $^O =~ /inux/ ) { *O_APPEND = sub { 1024 }; *O_CREAT = sub { 64 }; *O_EXCL = sub { 128 }; } elsif ( $^O =~ /BSD/i ) { *O_APPEND = sub { 8 }; *O_CREAT = sub { 512 }; *O_EXCL = sub { 2048 }; } } } # print "OS [$^O]\n" ; # print "O_BINARY = ", O_BINARY(), "\n" ; # print "O_RDONLY = ", O_RDONLY(), "\n" ; # print "O_WRONLY = ", O_WRONLY(), "\n" ; # print "O_APPEND = ", O_APPEND(), "\n" ; # print "O_CREAT ", O_CREAT(), "\n" ; # print "O_EXCL ", O_EXCL(), "\n" ; *slurp = \&read_file ; sub read_file { my $file_name = shift ; my $opts = ( ref $_[0] eq 'HASH' ) ? shift : { @_ } ; # this is the optimized read_file for shorter files. # the test for -s > 0 is to allow pseudo files to be read with the # regular loop since they return a size of 0. if ( !ref $file_name && -e $file_name && -s _ > 0 && -s _ < $max_fast_slurp_size && !%{$opts} && !wantarray ) { my $fh ; unless( sysopen( $fh, $file_name, O_RDONLY ) ) { @_ = ( $opts, "read_file '$file_name' - sysopen: $!"); goto &_error ; } my $read_cnt = sysread( $fh, my $buf, -s _ ) ; unless ( defined $read_cnt ) { @_ = ( $opts, "read_file '$file_name' - small sysread: $!"); goto &_error ; } $buf =~ s/\015\012/\n/g if $is_win32 ; return $buf ; } # set the buffer to either the passed in one or ours and init it to the null # string my $buf ; my $buf_ref = $opts->{'buf_ref'} || \$buf ; ${$buf_ref} = '' ; my( $read_fh, $size_left, $blk_size ) ; # deal with ref for a file name # it could be an open handle or an overloaded object if ( ref $file_name ) { my $ref_result = _check_ref( $file_name ) ; if ( ref $ref_result ) { # we got an error, deal with it @_ = ( $opts, $ref_result ) ; goto &_error ; } if ( $ref_result ) { # we got an overloaded object and the result is the stringified value # use it as the file name $file_name = $ref_result ; } else { # here we have just an open handle. set $read_fh so we don't do a sysopen $read_fh = $file_name ; $blk_size = $opts->{'blk_size'} || 1024 * 1024 ; $size_left = $blk_size ; } } # see if we have a path we need to open unless ( $read_fh ) { # a regular file. set the sysopen mode my $mode = O_RDONLY ; #printf "RD: BINARY %x MODE %x\n", O_BINARY, $mode ; $read_fh = local( *FH ) ; # $read_fh = gensym ; unless ( sysopen( $read_fh, $file_name, $mode ) ) { @_ = ( $opts, "read_file '$file_name' - sysopen: $!"); goto &_error ; } if ( my $binmode = $opts->{'binmode'} ) { binmode( $read_fh, $binmode ) ; } # get the size of the file for use in the read loop $size_left = -s $read_fh ; #print "SIZE $size_left\n" ; # we need a blk_size if the size is 0 so we can handle pseudofiles like in # /proc. these show as 0 size but have data to be slurped. unless( $size_left ) { $blk_size = $opts->{'blk_size'} || 1024 * 1024 ; $size_left = $blk_size ; } } # infinite read loop. we exit when we are done slurping while( 1 ) { # do the read and see how much we got my $read_cnt = sysread( $read_fh, ${$buf_ref}, $size_left, length ${$buf_ref} ) ; # since we're using sysread Perl won't automatically restart the call # when interrupted by a signal. next if $!{EINTR}; unless ( defined $read_cnt ) { @_ = ( $opts, "read_file '$file_name' - loop sysread: $!"); goto &_error ; } # good read. see if we hit EOF (nothing left to read) last if $read_cnt == 0 ; # loop if we are slurping a handle. we don't track $size_left then. next if $blk_size ; # count down how much we read and loop if we have more to read. $size_left -= $read_cnt ; last if $size_left <= 0 ; } # fix up cr/lf to be a newline if this is a windows text file ${$buf_ref} =~ s/\015\012/\n/g if $is_win32 && !$opts->{'binmode'} ; my $sep = $/ ; $sep = '\n\n+' if defined $sep && $sep eq '' ; # see if caller wants lines if( wantarray || $opts->{'array_ref'} ) { use re 'taint' ; my @lines = length(${$buf_ref}) ? ${$buf_ref} =~ /(.*?$sep|.+)/sg : () ; chomp @lines if $opts->{'chomp'} ; # caller wants an array ref return \@lines if $opts->{'array_ref'} ; # caller wants list of lines return @lines ; } # caller wants a scalar ref to the slurped text return $buf_ref if $opts->{'scalar_ref'} ; # caller wants a scalar with the slurped text (normal scalar context) return ${$buf_ref} if defined wantarray ; # caller passed in an i/o buffer by reference (normal void context) return ; } # errors in this sub are returned as scalar refs # a normal IO/GLOB handle is an empty return # an overloaded object returns its stringified as a scalarfilename sub _check_ref { my( $handle ) = @_ ; # check if we are reading from a handle (GLOB or IO object) if ( eval { $handle->isa( 'GLOB' ) || $handle->isa( 'IO' ) } ) { # we have a handle. deal with seeking to it if it is DATA my $err = _seek_data_handle( $handle ) ; # return the error string if any return \$err if $err ; # we have good handle return ; } eval { require overload } ; # return an error if we can't load the overload pragma # or if the object isn't overloaded return \"Bad handle '$handle' is not a GLOB or IO object or overloaded" if $@ || !overload::Overloaded( $handle ) ; # must be overloaded so return its stringified value return "$handle" ; } sub _seek_data_handle { my( $handle ) = @_ ; # DEEP DARK MAGIC. this checks the UNTAINT IO flag of a # glob/handle. only the DATA handle is untainted (since it is from # trusted data in the source file). this allows us to test if this is # the DATA handle and then to do a sysseek to make sure it gets # slurped correctly. on some systems, the buffered i/o pointer is not # left at the same place as the fd pointer. this sysseek makes them # the same so slurping with sysread will work. eval{ require B } ; if ( $@ ) { return <IO->IoFLAGS & 16 ) { # set the seek position to the current tell. unless( sysseek( $handle, tell( $handle ), SEEK_SET ) ) { return "read_file '$handle' - sysseek: $!" ; } } # seek was successful, return no error string return ; } sub write_file { my $file_name = shift ; # get the optional argument hash ref from @_ or an empty hash ref. my $opts = ( ref $_[0] eq 'HASH' ) ? shift : {} ; my( $buf_ref, $write_fh, $no_truncate, $orig_file_name, $data_is_ref ) ; # get the buffer ref - it depends on how the data is passed into write_file # after this if/else $buf_ref will have a scalar ref to the data. if ( ref $opts->{'buf_ref'} eq 'SCALAR' ) { # a scalar ref passed in %opts has the data # note that the data was passed by ref $buf_ref = $opts->{'buf_ref'} ; $data_is_ref = 1 ; } elsif ( ref $_[0] eq 'SCALAR' ) { # the first value in @_ is the scalar ref to the data # note that the data was passed by ref $buf_ref = shift ; $data_is_ref = 1 ; } elsif ( ref $_[0] eq 'ARRAY' ) { # the first value in @_ is the array ref to the data so join it. ${$buf_ref} = join '', @{$_[0]} ; } else { # good old @_ has all the data so join it. ${$buf_ref} = join '', @_ ; } # deal with ref for a file name if ( ref $file_name ) { my $ref_result = _check_ref( $file_name ) ; if ( ref $ref_result ) { # we got an error, deal with it @_ = ( $opts, $ref_result ) ; goto &_error ; } if ( $ref_result ) { # we got an overloaded object and the result is the stringified value # use it as the file name $file_name = $ref_result ; } else { # we now have a proper handle ref. # make sure we don't call truncate on it. $write_fh = $file_name ; $no_truncate = 1 ; } } # see if we have a path we need to open unless( $write_fh ) { # spew to regular file. if ( $opts->{'atomic'} ) { # in atomic mode, we spew to a temp file so make one and save the original # file name. $orig_file_name = $file_name ; $file_name .= ".$$" ; } # set the mode for the sysopen my $mode = O_WRONLY | O_CREAT ; $mode |= O_APPEND if $opts->{'append'} ; $mode |= O_EXCL if $opts->{'no_clobber'} ; my $perms = $opts->{perms} ; $perms = 0666 unless defined $perms ; #printf "WR: BINARY %x MODE %x\n", O_BINARY, $mode ; # open the file and handle any error. $write_fh = local( *FH ) ; # $write_fh = gensym ; unless ( sysopen( $write_fh, $file_name, $mode, $perms ) ) { @_ = ( $opts, "write_file '$file_name' - sysopen: $!"); goto &_error ; } } if ( my $binmode = $opts->{'binmode'} ) { binmode( $write_fh, $binmode ) ; } sysseek( $write_fh, 0, SEEK_END ) if $opts->{'append'} ; #print 'WR before data ', unpack( 'H*', ${$buf_ref}), "\n" ; # fix up newline to write cr/lf if this is a windows text file if ( $is_win32 && !$opts->{'binmode'} ) { # copy the write data if it was passed by ref so we don't clobber the # caller's data $buf_ref = \do{ my $copy = ${$buf_ref}; } if $data_is_ref ; ${$buf_ref} =~ s/\n/\015\012/g ; } #print 'after data ', unpack( 'H*', ${$buf_ref}), "\n" ; # get the size of how much we are writing and init the offset into that buffer my $size_left = length( ${$buf_ref} ) ; my $offset = 0 ; # loop until we have no more data left to write do { # do the write and track how much we just wrote my $write_cnt = syswrite( $write_fh, ${$buf_ref}, $size_left, $offset ) ; # since we're using syswrite Perl won't automatically restart the call # when interrupted by a signal. next if $!{EINTR}; unless ( defined $write_cnt ) { @_ = ( $opts, "write_file '$file_name' - syswrite: $!"); goto &_error ; } # track how much left to write and where to write from in the buffer $size_left -= $write_cnt ; $offset += $write_cnt ; } while( $size_left > 0 ) ; # we truncate regular files in case we overwrite a long file with a shorter file # so seek to the current position to get it (same as tell()). truncate( $write_fh, sysseek( $write_fh, 0, SEEK_CUR ) ) unless $no_truncate ; close( $write_fh ) ; # handle the atomic mode - move the temp file to the original filename. if ( $opts->{'atomic'} && !rename( $file_name, $orig_file_name ) ) { @_ = ( $opts, "write_file '$file_name' - rename: $!" ) ; goto &_error ; } return 1 ; } # this is for backwards compatibility with the previous File::Slurp module. # write_file always overwrites an existing file *overwrite_file = \&write_file ; # the current write_file has an append mode so we use that. this # supports the same API with an optional second argument which is a # hash ref of options. sub append_file { # get the optional opts hash ref my $opts = $_[1] ; if ( ref $opts eq 'HASH' ) { # we were passed an opts ref so just mark the append mode $opts->{append} = 1 ; } else { # no opts hash so insert one with the append mode splice( @_, 1, 0, { append => 1 } ) ; } # magic goto the main write_file sub. this overlays the sub without touching # the stack or @_ goto &write_file } # prepend data to the beginning of a file sub prepend_file { my $file_name = shift ; #print "FILE $file_name\n" ; my $opts = ( ref $_[0] eq 'HASH' ) ? shift : {} ; # delete unsupported options my @bad_opts = grep $_ ne 'err_mode' && $_ ne 'binmode', keys %{$opts} ; delete @{$opts}{@bad_opts} ; my $prepend_data = shift ; $prepend_data = '' unless defined $prepend_data ; $prepend_data = ${$prepend_data} if ref $prepend_data eq 'SCALAR' ; #print "PRE [$prepend_data]\n" ; my $err_mode = delete $opts->{err_mode} ; $opts->{ err_mode } = 'croak' ; $opts->{ scalar_ref } = 1 ; my $existing_data = eval { read_file( $file_name, $opts ) } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "prepend_file '$file_name' - read_file: $!" ) ; goto &_error ; } #print "EXIST [$$existing_data]\n" ; $opts->{atomic} = 1 ; my $write_result = eval { write_file( $file_name, $opts, $prepend_data, $$existing_data ) ; } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "prepend_file '$file_name' - write_file: $!" ) ; goto &_error ; } return $write_result ; } # edit a file as a scalar in $_ sub edit_file(&$;$) { my( $edit_code, $file_name, $opts ) = @_ ; $opts = {} unless ref $opts eq 'HASH' ; # my $edit_code = shift ; # my $file_name = shift ; # my $opts = ( ref $_[0] eq 'HASH' ) ? shift : {} ; #print "FILE $file_name\n" ; # delete unsupported options my @bad_opts = grep $_ ne 'err_mode' && $_ ne 'binmode', keys %{$opts} ; delete @{$opts}{@bad_opts} ; # keep the user err_mode and force croaking on internal errors my $err_mode = delete $opts->{err_mode} ; $opts->{ err_mode } = 'croak' ; # get a scalar ref for speed and slurp the file into a scalar $opts->{ scalar_ref } = 1 ; my $existing_data = eval { read_file( $file_name, $opts ) } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "edit_file '$file_name' - read_file: $!" ) ; goto &_error ; } #print "EXIST [$$existing_data]\n" ; my( $edited_data ) = map { $edit_code->(); $_ } $$existing_data ; $opts->{atomic} = 1 ; my $write_result = eval { write_file( $file_name, $opts, $edited_data ) } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "edit_file '$file_name' - write_file: $!" ) ; goto &_error ; } return $write_result ; } sub edit_file_lines(&$;$) { my( $edit_code, $file_name, $opts ) = @_ ; $opts = {} unless ref $opts eq 'HASH' ; # my $edit_code = shift ; # my $file_name = shift ; # my $opts = ( ref $_[0] eq 'HASH' ) ? shift : {} ; #print "FILE $file_name\n" ; # delete unsupported options my @bad_opts = grep $_ ne 'err_mode' && $_ ne 'binmode', keys %{$opts} ; delete @{$opts}{@bad_opts} ; # keep the user err_mode and force croaking on internal errors my $err_mode = delete $opts->{err_mode} ; $opts->{ err_mode } = 'croak' ; # get an array ref for speed and slurp the file into lines $opts->{ array_ref } = 1 ; my $existing_data = eval { read_file( $file_name, $opts ) } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "edit_file_lines '$file_name' - read_file: $!" ) ; goto &_error ; } #print "EXIST [$$existing_data]\n" ; my @edited_data = map { $edit_code->(); $_ } @$existing_data ; $opts->{atomic} = 1 ; my $write_result = eval { write_file( $file_name, $opts, @edited_data ) } ; if ( $@ ) { @_ = ( { err_mode => $err_mode }, "edit_file_lines '$file_name' - write_file: $!" ) ; goto &_error ; } return $write_result ; } # basic wrapper around opendir/readdir sub read_dir { my $dir = shift ; my $opts = ( ref $_[0] eq 'HASH' ) ? shift : { @_ } ; # this handle will be destroyed upon return local(*DIRH); # open the dir and handle any errors unless ( opendir( DIRH, $dir ) ) { @_ = ( $opts, "read_dir '$dir' - opendir: $!" ) ; goto &_error ; } my @dir_entries = readdir(DIRH) ; @dir_entries = grep( $_ ne "." && $_ ne "..", @dir_entries ) unless $opts->{'keep_dot_dot'} ; if ( $opts->{'prefix'} ) { substr( $_, 0, 0, "$dir/" ) for @dir_entries ; } return @dir_entries if wantarray ; return \@dir_entries ; } # error handling section # # all the error handling uses magic goto so the caller will get the # error message as if from their code and not this module. if we just # did a call on the error code, the carp/croak would report it from # this module since the error sub is one level down on the call stack # from read_file/write_file/read_dir. my %err_func = ( 'carp' => \&carp, 'croak' => \&croak, ) ; sub _error { my( $opts, $err_msg ) = @_ ; # get the error function to use my $func = $err_func{ $opts->{'err_mode'} || 'croak' } ; # if we didn't find it in our error function hash, they must have set # it to quiet and we don't do anything. return unless $func ; # call the carp/croak function $func->($err_msg) if $func ; # return a hard undef (in list context this will be a single value of # undef which is not a legal in-band value) return undef ; } 1; __END__ =head1 NAME File::Slurp - Simple and Efficient Reading/Writing/Modifying of Complete Files =head1 SYNOPSIS use File::Slurp; # read in a whole file into a scalar my $text = read_file( 'filename' ) ; # read in a whole file into an array of lines my @lines = read_file( 'filename' ) ; # write out a whole file from a scalar write_file( 'filename', $text ) ; # write out a whole file from an array of lines write_file( 'filename', @lines ) ; # Here is a simple and fast way to load and save a simple config file # made of key=value lines. my %conf = read_file( $file_name ) =~ /^(\w+)=(.*)$/mg ; write_file( $file_name, {atomic => 1}, map "$_=$conf{$_}\n", keys %conf ) ; # insert text at the beginning of a file prepend_file( 'filename', $text ) ; # in-place edit to replace all 'foo' with 'bar' in file edit_file { s/foo/bar/g } 'filename' ; # in-place edit to delete all lines with 'foo' from file edit_file_lines sub { $_ = '' if /foo/ }, 'filename' ; # read in a whole directory of file names (skipping . and ..) my @files = read_dir( '/path/to/dir' ) ; =head1 DESCRIPTION This module provides subs that allow you to read or write entire files with one simple call. They are designed to be simple to use, have flexible ways to pass in or get the file contents and to be very efficient. There is also a sub to read in all the files in a directory other than C<.> and C<..> These slurp/spew subs work for files, pipes and sockets, stdio, pseudo-files, and the DATA handle. Read more about why slurping files is a good thing in the file 'slurp_article.pod' in the extras/ directory. If you are interested in how fast these calls work, check out the slurp_bench.pl program in the extras/ directory. It compares many different forms of slurping. You can select the I/O direction, context and file sizes. Use the --help option to see how to run it. =head2 B This sub reads in an entire file and returns its contents to the caller. In scalar context it returns the entire file as a single scalar. In list context it will return a list of lines (using the current value of $/ as the separator including support for paragraph mode when it is set to ''). my $text = read_file( 'filename' ) ; my $bin = read_file( 'filename' { binmode => ':raw' } ) ; my @lines = read_file( 'filename' ) ; my $lines = read_file( 'filename', array_ref => 1 ) ; The first argument is the file to slurp in. If the next argument is a hash reference, then it is used as the options. Otherwise the rest of the argument list are is used as key/value options. If the file argument is a handle (if it is a ref and is an IO or GLOB object), then that handle is slurped in. This mode is supported so you slurp handles such as C and C. See the test handle.t for an example that does C and the child process spews data to the parant which slurps it in. All of the options that control how the data is returned to the caller still work in this case. If the first argument is an overloaded object then its stringified value is used for the filename and that file is opened. This is a new feature in 9999.14. See the stringify.t test for an example. By default C returns an undef in scalar contex or a single undef in list context if it encounters an error. Those are both impossible to get with a clean read_file call which means you can check the return value and always know if you had an error. You can change how errors are handled with the C option. Speed Note: If you call read_file and just get a scalar return value it is now optimized to handle shorter files. This is only used if no options are used, the file is shorter then 100k bytes, the filename is a plain scalar and a scalar file is returned. If you want the fastest slurping, use the C or C options (see below) NOTE: as of version 9999.06, read_file works correctly on the C handle. It used to need a sysseek workaround but that is now handled when needed by the module itself. You can optionally request that C is exported to your code. This is an alias for read_file and is meant to be forward compatible with Perl 6 (which will have slurp() built-in). The options for C are: =head3 binmode If you set the binmode option, then its value is passed to a call to binmode on the opened handle. You can use this to set the file to be read in binary mode, utf8, etc. See perldoc -f binmode for more. my $bin_data = read_file( $bin_file, binmode => ':raw' ) ; my $utf_text = read_file( $bin_file, binmode => ':utf8' ) ; =head3 array_ref If this boolean option is set, the return value (only in scalar context) will be an array reference which contains the lines of the slurped file. The following two calls are equivalent: my $lines_ref = read_file( $bin_file, array_ref => 1 ) ; my $lines_ref = [ read_file( $bin_file ) ] ; =head3 chomp If this boolean option is set, the lines are chomped. This only happens if you are slurping in a list context or using the C option. =head3 scalar_ref If this boolean option is set, the return value (only in scalar context) will be an scalar reference to a string which is the contents of the slurped file. This will usually be faster than returning the plain scalar. It will also save memory as it will not make a copy of the file to return. Run the extras/slurp_bench.pl script to see speed comparisons. my $text_ref = read_file( $bin_file, scalar_ref => 1 ) ; =head3 buf_ref You can use this option to pass in a scalar reference and the slurped file contents will be stored in the scalar. This can be used in conjunction with any of the other options. This saves an extra copy of the slurped file and can lower ram usage vs returning the file. It is usually the fastest way to read a file into a scalar. Run the extras/slurp_bench.pl script to see speed comparisons. read_file( $bin_file, buf_ref => \$buffer ) ; =head3 blk_size You can use this option to set the block size used when slurping from an already open handle (like \*STDIN). It defaults to 1MB. my $text_ref = read_file( $bin_file, blk_size => 10_000_000, array_ref => 1 ) ; =head3 err_mode You can use this option to control how read_file behaves when an error occurs. This option defaults to 'croak'. You can set it to 'carp' or to 'quiet to have no special error handling. This code wants to carp and then read another file if it fails. my $text_ref = read_file( $file, err_mode => 'carp' ) ; unless ( $text_ref ) { # read a different file but croak if not found $text_ref = read_file( $another_file ) ; } # process ${$text_ref} =head2 B This sub writes out an entire file in one call. write_file( 'filename', @data ) ; The first argument to C is the filename. The next argument is an optional hash reference and it contains key/values that can modify the behavior of C. The rest of the argument list is the data to be written to the file. write_file( 'filename', {append => 1 }, @data ) ; write_file( 'filename', {binmode => ':raw'}, $buffer ) ; As a shortcut if the first data argument is a scalar or array reference, it is used as the only data to be written to the file. Any following arguments in @_ are ignored. This is a faster way to pass in the output to be written to the file and is equivalent to the C option of C. These following pairs are equivalent but the pass by reference call will be faster in most cases (especially with larger files). write_file( 'filename', \$buffer ) ; write_file( 'filename', $buffer ) ; write_file( 'filename', \@lines ) ; write_file( 'filename', @lines ) ; If the first argument is a handle (if it is a ref and is an IO or GLOB object), then that handle is written to. This mode is supported so you spew to handles such as \*STDOUT. See the test handle.t for an example that does C and child process spews data to the parent which slurps it in. All of the options that control how the data are passed into C still work in this case. If the first argument is an overloaded object then its stringified value is used for the filename and that file is opened. This is new feature in 9999.14. See the stringify.t test for an example. By default C returns 1 upon successfully writing the file or undef if it encountered an error. You can change how errors are handled with the C option. The options are: =head3 binmode If you set the binmode option, then its value is passed to a call to binmode on the opened handle. You can use this to set the file to be read in binary mode, utf8, etc. See perldoc -f binmode for more. write_file( $bin_file, {binmode => ':raw'}, @data ) ; write_file( $bin_file, {binmode => ':utf8'}, $utf_text ) ; =head3 perms The perms option sets the permissions of newly-created files. This value is modified by your process's umask and defaults to 0666 (same as sysopen). NOTE: this option is new as of File::Slurp version 9999.14; =head3 buf_ref You can use this option to pass in a scalar reference which has the data to be written. If this is set then any data arguments (including the scalar reference shortcut) in @_ will be ignored. These are equivalent: write_file( $bin_file, { buf_ref => \$buffer } ) ; write_file( $bin_file, \$buffer ) ; write_file( $bin_file, $buffer ) ; =head3 atomic If you set this boolean option, the file will be written to in an atomic fashion. A temporary file name is created by appending the pid ($$) to the file name argument and that file is spewed to. After the file is closed it is renamed to the original file name (and rename is an atomic operation on most OS's). If the program using this were to crash in the middle of this, then the file with the pid suffix could be left behind. =head3 append If you set this boolean option, the data will be written at the end of the current file. Internally this sets the sysopen mode flag O_APPEND. write_file( $file, {append => 1}, @data ) ; You can import append_file and it does the same thing. =head3 no_clobber If you set this boolean option, an existing file will not be overwritten. write_file( $file, {no_clobber => 1}, @data ) ; =head3 err_mode You can use this option to control how C behaves when an error occurs. This option defaults to 'croak'. You can set it to 'carp' or to 'quiet' to have no error handling other than the return value. If the first call to C fails it will carp and then write to another file. If the second call to C fails, it will croak. unless ( write_file( $file, { err_mode => 'carp', \$data ) ; # write a different file but croak if not found write_file( $other_file, \$data ) ; } =head2 overwrite_file This sub is just a typeglob alias to write_file since write_file always overwrites an existing file. This sub is supported for backwards compatibility with the original version of this module. See write_file for its API and behavior. =head2 append_file This sub will write its data to the end of the file. It is a wrapper around write_file and it has the same API so see that for the full documentation. These calls are equivalent: append_file( $file, @data ) ; write_file( $file, {append => 1}, @data ) ; =head2 prepend_file This sub writes data to the beginning of a file. The previously existing data is written after that so the effect is prepending data in front of a file. It is a counterpart to the append_file sub in this module. It works by first using C to slurp in the file and then calling C with the new data and the existing file data. The first argument to C is the filename. The next argument is an optional hash reference and it contains key/values that can modify the behavior of C. The rest of the argument list is the data to be written to the file and that is passed to C as is (see that for allowed data). Only the C and C options are supported. The C call has the C option set so you will always have a consistant file. See above for more about those options. C is not exported by default, you need to import it explicitly. use File::Slurp qw( prepend_file ) ; prepend_file( $file, $header ) ; prepend_file( $file, \@lines ) ; prepend_file( $file, { binmode => 'raw:'}, $bin_data ) ; =head2 edit_file, edit_file_lines These subs read in a file into $_, execute a code block which should modify $_ and then write $_ back to the file. The difference between them is that C reads the whole file into $_ and calls the code block one time. With C each line is read into $_ and the code is called for each line. In both cases the code should modify $_ if desired and it will be written back out. These subs are the equivalent of the -pi command line options of Perl but you can call them from inside your program and not fork out a process. They are in @EXPORT_OK so you need to request them to be imported on the use line or you can import both of them with: use File::Slurp qw( :edit ) ; The first argument to C and C is a code block or a code reference. The code block is not followed by a comma (as with grep and map) but a code reference is followed by a comma. See the examples below for both styles. The next argument is the filename. The last argument is an optional hash reference and it contains key/values that can modify the behavior of C. Only the C and C options are supported. The C call has the C option set so you will always have a consistant file. See above for more about those options. Each group of calls below show a Perl command line instance and the equivalent calls to C and C. perl -0777 -pi -e 's/foo/bar/g' filename use File::Slurp qw( edit_file ) ; edit_file { s/foo/bar/g } 'filename' ; edit_file sub { s/foo/bar/g }, 'filename' ; edit_file \&replace_foo, 'filename' ; sub replace_foo { s/foo/bar/g } perl -pi -e '$_ = "" if /foo/' filename use File::Slurp qw( edit_file_lines ) ; use File::Slurp ; edit_file_lines { $_ = '' if /foo/ } 'filename' ; edit_file_lines sub { $_ = '' if /foo/ }, 'filename' ; edit_file \&delete_foo, 'filename' ; sub delete_foo { $_ = '' if /foo/ } =head2 read_dir This sub reads all the file names from directory and returns them to the caller but C<.> and C<..> are removed by default. my @files = read_dir( '/path/to/dir' ) ; The first argument is the path to the directory to read. If the next argument is a hash reference, then it is used as the options. Otherwise the rest of the argument list are is used as key/value options. In list context C returns a list of the entries in the directory. In a scalar context it returns an array reference which has the entries. =head3 err_mode If the C option is set, it selects how errors are handled (see C in C or C). =head3 keep_dot_dot If this boolean option is set, C<.> and C<..> are not removed from the list of files. my @all_files = read_dir( '/path/to/dir', keep_dot_dot => 1 ) ; =head3 prefix If this boolean option is set, the string "$dir/" is prefixed to each dir entry. This means you can directly use the results to open files. A common newbie mistake is not putting the directory in front of entries when opening themn. my @paths = read_dir( '/path/to/dir', prefix => 1 ) ; =head2 EXPORT These are exported by default or with use File::Slurp qw( :std ) ; read_file write_file overwrite_file append_file read_dir These are exported with use File::Slurp qw( :edit ) ; edit_file edit_file_lines You can get all subs in the module exported with use File::Slurp qw( :all ) ; =head2 LICENSE Same as Perl. =head2 SEE ALSO An article on file slurping in extras/slurp_article.pod. There is also a benchmarking script in extras/slurp_bench.pl. =head2 BUGS If run under Perl 5.004, slurping from the DATA handle will fail as that requires B.pm which didn't get into core until 5.005. =head1 AUTHOR Uri Guttman, Euri AT stemsystems DOT comE =cut t/bin/colordiff [[[1 558 #!/usr/bin/perl -w ######################################################################## # # # ColorDiff - a wrapper/replacement for 'diff' producing # # colourful output # # # # Copyright (C)2002-2015 Dave Ewart (davee@sungate.co.uk) # # # ######################################################################## # # # This program is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # ######################################################################## use strict; use Getopt::Long qw(:config pass_through no_auto_abbrev); my $app_name = 'colordiff'; my $version = '1.0.15'; my $author = 'Dave Ewart'; my $author_email = 'davee@sungate.co.uk'; my $app_www = 'http://www.colordiff.org/'; my $copyright = '(C)2002-2015'; my $show_banner = 1; my $color_patch = 0; my $diff_cmd = "diff"; # ANSI sequences for colours my %colour; $colour{white} = "\033[1;37m"; $colour{yellow} = "\033[1;33m"; $colour{green} = "\033[1;32m"; $colour{blue} = "\033[1;34m"; $colour{cyan} = "\033[1;36m"; $colour{red} = "\033[1;31m"; $colour{magenta} = "\033[1;35m"; $colour{black} = "\033[1;30m"; $colour{darkwhite} = "\033[0;37m"; $colour{darkyellow} = "\033[0;33m"; $colour{darkgreen} = "\033[0;32m"; $colour{darkblue} = "\033[0;34m"; $colour{darkcyan} = "\033[0;36m"; $colour{darkred} = "\033[0;31m"; $colour{darkmagenta} = "\033[0;35m"; $colour{darkblack} = "\033[0;30m"; $colour{off} = "\033[0;0m"; # Default colours if /usr/local/etc/colordiffrc or ~/.colordiffrc do not exist my $plain_text = $colour{white}; my $file_old = $colour{red}; my $file_new = $colour{blue}; my $diff_stuff = $colour{magenta}; my $cvs_stuff = $colour{green}; # Locations for personal and system-wide colour configurations my $HOME = $ENV{HOME}; my $etcdir = '/usr/local/etc'; my ($setting, $value); my @config_files = ("$etcdir/colordiffrc"); push (@config_files, "$ENV{HOME}/.colordiffrc") if (defined $ENV{HOME}); my $config_file; my $diff_type = 'unknown'; # Convert tabs to spaces sub expand_tabs_to_spaces ($) { my ($s) = @_; while ((my $i = index ($s, "\t")) > -1) { substr ( $s, $i, 1, # range to replace (' ' x (8 - ($i % 8))), # string to replace with ); } $s; } sub check_for_file_arguments { my $nonopts = 0; my $ddash = 0; while (my $arg = shift) { if ($arg eq "--") { $ddash = 1; next; } if ($ddash || $arg eq "-") { $nonopts++; next; } if ($arg !~ /^-/) { $nonopts++; } if ($arg eq "--help" || $arg eq "--version" || $arg eq "-v") { $nonopts++; } } return $nonopts; } sub detect_diff_type { # Two parameters: # $record is line in which a diff format has to be detected # $allow_diffy is flag indicating whether diffy is a # permitted diff type my $record = shift; my $allow_diffy = shift; # This may not be perfect - should identify most reasonably # formatted diffs and patches # Unified diffs are the only flavour having '+++ ' or '--- ' # at the start of a line if ($record =~ /^(\+\+\+ |--- |@@ )/) { return 'diffu'; } # Context diffs are the only flavour having '***' # at the start of a line elsif ($record =~ /^\*\*\*/) { return 'diffc'; } # Plain diffs have NcN, NdN and NaN etc. elsif ($record =~ /^[0-9,]+[acd][0-9,]+$/) { return 'diff'; } # FIXME - This is not very specific, since the regex matches could # easily match non-diff output. # However, given that we have not yet matched any of the *other* diff # types, this might be good enough # # Only pick diffy if our flag parameter indicates so elsif ( ($allow_diffy == 1) && ($record =~ /(\s\|\s|\s<$|\s>\s)/) ) { return 'diffy'; } # wdiff deleted/added patterns # should almost always be pairwise? elsif ($record =~ /\[-.*?-\]/s || $record =~ /\{\+.*?\+\}/s) { return 'wdiff'; } # FIXME - This is a bit risky, but if we haven't matched any other # diff type by this stage, this line usually indicates we have # debdiff output elsif ($record =~ /^Control files: lines which differ/) { return 'debdiff'; } return 'unknown'; } my $enable_verifymode; my $specified_difftype; my $enable_fakeexitcode; my $color_mode = "auto"; GetOptions( # --enable-verifymode option is for testing behaviour of colordiff # against standard test diffs "verifymode" => \$enable_verifymode, "fakeexitcode" => \$enable_fakeexitcode, "difftype=s" => \$specified_difftype, "color=s" => \$color_mode # TODO - check that specified type is valid, issue warning if not ); if (defined $enable_verifymode) { # When in verify mode, to ensure consistent output we don't source # any external config files, so we use built-in defaults # and we add colour to our patches @config_files = (); $color_patch = 1; $show_banner = 0; } foreach $config_file (@config_files) { if (open (COLORDIFFRC, "<$config_file")) { while () { my $colourval; chop; next if (/^#/ || /^$/); s/\s+//g; ($setting, $value) = split ('='); if (!defined $value) { print STDERR "Invalid configuration line ($_) in $config_file\n"; next; } if ($setting eq 'banner') { if ($value eq 'no') { $show_banner = 0; } next; } if ($setting eq 'color_patches') { if ($value eq 'yes') { $color_patch = 1; } next; } if ($setting eq 'diff_cmd') { $diff_cmd = $value; next; } $setting =~ tr/A-Z/a-z/; $value =~ tr/A-Z/a-z/; if (($value eq 'normal') || ($value eq 'none')) { $value = 'off'; } if ($value =~ m/[0-9]+/ && $value >= 0 && $value <= 255) { # Numeric color if( $value < 8 ) { $colourval = "\033[0;3${value}m"; } elsif( $value < 15 ) { $colourval = "\033[0;9" . (${value} - 8) . "m"; } else { $colourval = "\033[0;38;5;${value}m"; } } elsif (defined($colour{$value})) { $colourval = $colour{$value}; } else { print STDERR "Invalid colour specification for setting $setting ($value) in $config_file\n"; next; } if ($setting eq 'plain') { $plain_text = $colourval; } elsif ($setting eq 'oldtext') { $file_old = $colourval; } elsif ($setting eq 'newtext') { $file_new = $colourval; } elsif ($setting eq 'diffstuff') { $diff_stuff = $colourval; } elsif ($setting eq 'cvsstuff') { $cvs_stuff = $colourval; } else { print STDERR "Unknown option in $config_file: $setting\n"; } } close COLORDIFFRC; } } # --color=yes and --color=no will override the color_patches setting if ($color_mode eq "yes") { $color_patch = 1; } elsif ($color_mode eq "no") { $color_patch = 0; } # If output is to a file, switch off colours, unless 'color_patch' is set, # which might be due to --color=no being specified # Relates to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378563 if ((-f STDOUT) && ($color_patch == 0)) { $plain_text = ''; $file_old = ''; $file_new = ''; $diff_stuff = ''; $cvs_stuff = ''; $plain_text = ''; $colour{off} = ''; } # Disable output buffering. This allows "producer | colordiff | less" to output # earlier without having to wait for 'producer' to finish. select STDOUT; $| = 1; # ---------------------------------------------------------------------------- if ($show_banner == 1) { print STDERR "$app_name $version ($app_www)\n"; print STDERR "$copyright $author, $author_email\n\n"; } my $operating_methodology; if (check_for_file_arguments (@ARGV)) { $operating_methodology = 1; # we have files as arg, so we act as diff } else { $operating_methodology = 2; # no files as args, so operate as filter } my @inputstream; my $inputhandle; my $pid; if ($operating_methodology == 1) { # Feed stdin of colordiff with output from the diff program $pid = open($inputhandle, "-|", "$diff_cmd", @ARGV); } else { $inputhandle = \*STDIN; } # Input stream has been read - need to examine it # to determine type of diff we have. my $lastline; my $record; if (defined $specified_difftype) { $diff_type = $specified_difftype; # diffy needs at least one line to look at if ($diff_type eq 'diffy' and ($_ = <$inputhandle>)) { push @inputstream, $_; } $lastline = $_; } else { # Detect diff type, diffy is permitted while (<$inputhandle>) { push @inputstream, $_; $diff_type = detect_diff_type($_, 1); last if $diff_type ne 'unknown'; } $lastline = $_; } my $inside_file_old = 1; # ------------------------------------------------------------------------------ # Special pre-processing for side-by-side diffs # Figure out location of central markers: these will be a consecutive set of # three columns where the first and third always consist of spaces and the # second consists only of spaces, '<', '>' and '|' # This is not a 100% certain match, but should be good enough my $diffy_sep_col = 0; my $mostlikely_sum = 0; if ($diff_type eq 'diffy') { # Not very elegant, but does the job my $longest_record = -1; my %separator_col = (); my %candidate_col = (); my $possible_cols = 0; my @checkbuffer; (@checkbuffer, @inputstream) = (@inputstream, @checkbuffer); while (@checkbuffer) { $_ = shift @checkbuffer; push @inputstream, $_; $_ = expand_tabs_to_spaces $_; if (length ($_) > $longest_record) { my $i = $longest_record + 1; $longest_record = length ($_); while ($i <= $longest_record) { $separator_col{$i} = 1; $candidate_col{$i} = 0; $i++; } } for (my $i = 0 ; $i < (length ($_) - 2) ; $i++) { next if ($separator_col{$i} == 0); next if ($_ =~ /^(Index: |={4,}|RCS file: |retrieving |diff )/); my $subsub = substr ($_, $i, 2); if ($subsub !~ / [ (|<>]/) { $separator_col{$i} = 0; if ($candidate_col{$i} > 0) { $possible_cols--; } } if ($subsub =~ / [|<>]/) { $candidate_col{$i}++; if ($candidate_col{$i} == 1) { $possible_cols++; } } } if ( !@checkbuffer ) { if (! (defined $specified_difftype) and $possible_cols == 0 && detect_diff_type($_, 0) ne 'unknown') { $diff_type = detect_diff_type($_, 0); last; } if (defined ($_ = <$inputhandle>)) { push @checkbuffer, $_; } $lastline = $_; } } for (my $i = 0 ; $i < $longest_record - 2 ; $i++) { if ($separator_col{$i} == 1) { if ($candidate_col{$i} > $mostlikely_sum) { $diffy_sep_col = $i; $mostlikely_sum = $i; } } } # If we don't find a suitable separator column then # we've probably misidentified the input as diffy # Search stream again, this time excluding diffy # as a possible outcome if ($diffy_sep_col == 0) { # Detect diff type, diffy is NOT permitted foreach (@inputstream) { $diff_type = detect_diff_type($_, 0); last if $diff_type ne 'unknown'; } } } # ------------------------------------------------------------------------------ while (defined( $_ = @inputstream ? shift @inputstream : ($lastline and <$inputhandle>) )) { if (/^Binary files (.*) and (.*) differ$/) { print "Binary files $file_old$1$plain_text and $file_new$2$plain_text differ\n"; next; } if ($diff_type eq 'diff') { if (/^/) { print "$file_new"; } elsif (/^[0-9]/) { print "$diff_stuff"; } elsif (/^(Index: |={4,}|RCS file: |retrieving |diff )/) { print "$cvs_stuff"; } elsif (/^Only in/) { print "$diff_stuff"; } else { print "$plain_text"; } } elsif ($diff_type eq 'diffc') { if (/^- /) { print "$file_old"; } elsif (/^\+ /) { print "$file_new"; } elsif (/^\*{4,}/) { print "$diff_stuff"; } elsif (/^Only in/) { print "$diff_stuff"; } elsif (/^\*\*\* [0-9]+,[0-9]+/) { print "$diff_stuff"; $inside_file_old = 1; } elsif (/^\*\*\* /) { print "$file_old"; } elsif (/^--- [0-9]+,[0-9]+/) { print "$diff_stuff"; $inside_file_old = 0; } elsif (/^--- /) { print "$file_new"; } elsif (/^!/) { if ($inside_file_old == 1) { print "$file_old"; } else { print "$file_new"; } } elsif (/^(Index: |={4,}|RCS file: |retrieving |diff )/) { print "$cvs_stuff"; } else { print "$plain_text"; } } elsif ($diff_type eq 'diffu') { if (/^-/) { print "$file_old"; } elsif (/^\+/) { print "$file_new"; } elsif (/^\@/) { print "$diff_stuff"; } elsif (/^Only in/) { print "$diff_stuff"; } elsif (/^(Index: |={4,}|RCS file: |retrieving |diff )/) { print "$cvs_stuff"; } else { print "$plain_text"; } } # Works with previously-identified column containing the diff-y # separator characters elsif ($diff_type eq 'diffy') { $_ = expand_tabs_to_spaces $_; if (length ($_) > ($diffy_sep_col + 2)) { my $sepchars = substr ($_, $diffy_sep_col, 2); if ($sepchars eq ' <') { print "$file_old"; } elsif ($sepchars eq ' |') { print "$diff_stuff"; } elsif ($sepchars eq ' >') { print "$file_new"; } else { print "$plain_text"; } } elsif (/^Only in/) { print "$diff_stuff"; } else { print "$plain_text"; } } elsif ($diff_type eq 'wdiff') { $_ =~ s/(\[-.+?-\])/$file_old$1$colour{off}/g; $_ =~ s/(\{\+.+?\+\})/$file_new$1$colour{off}/g; } elsif ($diff_type eq 'debdiff') { $_ =~ s/(\[-.+?-\])/$file_old$1$colour{off}/g; $_ =~ s/(\{\+.+?\+\})/$file_new$1$colour{off}/g; } s/$/$colour{off}/; print "$_"; } my $exitcode = 0; if ($operating_methodology == 1) { waitpid $pid, 0; $exitcode=$? >> 8; } if (defined $enable_fakeexitcode) { exit 0; } else { exit $exitcode; } t/bin/vimcat [[[1 418 #!/bin/sh #!/usr/bin/env vim #! This is a bash script that executes itself as a vimscript to do its work #! Based on _v by Magnus Woldrich: https://github.com/trapd00r/utils/blob/master/_v : if 0 # try to find a better shell, especially on Solaris PATH="$PATH:/usr/local/bin:/opt/csw/bin:/opt/local/bin:/usr/dt/bin:/usr/xpg4/bin:/usr/bin:/bin" _MY_SHELL=/bin/sh export _MY_SHELL if [ -z "$IN_BASH" ] && command -v bash >/dev/null; then IN_BASH=1 export IN_BASH _MY_SHELL=`command -v bash` export _MY_SHELL exec bash "$0" "$@" elif [ -z "$IN_BASH" ] && [ -z "$IN_KSH" ]; then if command -v dtksh >/dev/null; then IN_KSH=1 export IN_KSH _MY_SHELL=`command -v dtksh` export _MY_SHELL exec dtksh "$0" "$@" elif [ -x /usr/xpg4/bin/sh ]; then IN_KSH=1 export IN_KSH _MY_SHELL=/usr/xpg4/bin/sh export _MY_SHELL exec /usr/xpg4/bin/sh "$0" "$@" elif command -v ksh93 >/dev/null; then IN_KSH=1 export IN_KSH _MY_SHELL=`command -v ksh93` export _MY_SHELL exec ksh93 "$0" "$@" elif command -v ksh >/dev/null; then IN_KSH=1 export IN_KSH _MY_SHELL=`command -v ksh` export _MY_SHELL exec ksh "$0" "$@" else _MY_SHELL="${SHELL:-/bin/sh}" fi fi # hopefully we're now POSIX, and shell is saved in ${_MY_SHELL} tmp_dir=/tmp mkdir_options="-m 700" case "$(uname -s)" in MINGW*|MSYS*) if [ -n "${temp}" ]; then # MSYS2 is a little tricky, we're gonna stick to the user's private temp # the -m mode switch to mkdir doesn't work tmp_dir="$(cygpath --unix "${temp}")" mkdir_options="" fi ;; esac tmp_dir="${tmp_dir}/vimcat_${$}" if ! mkdir ${mkdir_options} "${tmp_dir}"; then echo Could not create temporary directory "${tmp_dir}" >&2 exit 1 fi trap "rm -rf ${tmp_dir}" HUP INT QUIT ILL TRAP KILL BUS TERM tmp_file_in="${tmp_dir}/vimcat_in.txt" tmp_file_out="${tmp_dir}/vimcat_out.txt" script="$(command -v ${0})" # check for arguments to pass to vim while [ "${#}" -gt 0 ] ; do case "${1}" in "-c") shift if [ -z "${extra_c}" ]; then extra_c="${1}" else extra_c="${extra_c} | ${1}" fi shift ;; "--cmd") shift if [ -z "${extra_cmd}" ]; then extra_cmd="${1}" else extra_cmd="${extra_cmd} | ${1}" fi shift ;; "-u") shift vimcatrc="${1}" shift ;; "-o") shift output_file="${1}" shift ;; "-s") shift squeeze_blank_lines=1 ;; "--") shift break ;; -*) echo "${0}: bad option '${1}'" exit 1 ;; *) break ;; esac done # Just pass through if not on a tty, unless -o was given if [ -z "${output_file}" ]; then if [ ! -t 1 ]; then exec cat "${@}" fi fi if [ -z "${vimcatrc}" ]; then if [ -f ~/.vimcatrc ]; then vimcatrc="~/.vimcatrc" else vimcatrc="" fi fi if [ -z "${extra_cmd}" ]; then extra_cmd='silent! echo' fi if [ -z "${extra_c}" ]; then extra_c='silent! echo' fi if [ "${#}" -eq 0 ]; then set -- - fi for file in "$@" do if [ "${#}" -ge 2 ]; then echo "==> ${file} <==" fi if [ "${file}" = "-" ]; then cat - >"${tmp_file_in}" file="${tmp_file_in}" fi if [ "${squeeze_blank_lines}" = "1" ]; then cat -- "${file}" > "${tmp_file_in}.work" sed -e '/^[ ]*$/{ N /^[ ]*\n[ ]*$/D }' -- "${tmp_file_in}.work" > "${tmp_file_in}" rm -f -- "${tmp_file_in}.work" file="${tmp_file_in}" fi # Check that the file exists if test -r "${file}" -a -f "${file}"; then if test -s "${file}"; then if [ -z "${output_file}" -o "${output_file}" = "-" ]; then dest_file="${tmp_file_out}" else dest_file="${output_file}" fi if [ -n "${vimcatrc}" ]; then vim -N -E -X -R -i NONE -u "${vimcatrc}" --cmd "visual | ${extra_cmd}" -c "set bg=dark | syn on | hi Normal ctermbg=NONE | silent! source ${script} | ${extra_c} | call AnsiHighlight(\"${dest_file}\") | q" -- "${file}" /dev/null 2>&1 else vim -N -E -X -R -i NONE --cmd "visual | ${extra_cmd}" -c "set bg=dark | syn on | hi Normal ctermbg=NONE | silent! source ${script} | ${extra_c} | call AnsiHighlight(\"${dest_file}\") | q" -- "${file}" /dev/null 2>&1 fi if [ -z "${output_file}" -o "${output_file}" = "-" ]; then cat "${tmp_file_out}" fi if [ -z "${output_file}" ]; then # if file doesn't end in a newline, output a newline # regular Solaris tail does not work for this tail_cmd=tail if [ -x /usr/xpg4/bin/tail ]; then tail_cmd=/usr/xpg4/bin/tail fi if command -v gtail >/dev/null; then tail_cmd=gtail fi last_char="$($tail_cmd -c 1 "${tmp_file_out}")" if [ "${last_char}" != "" ]; then echo fi fi fi else echo "${0}: Cannot read file: ${file}" >&2 fi done rm -rf "${tmp_dir}" exit : endif : endif : endif : endif : endif : endwhile : endif : endfor " AnsiHighlight: Allows for marking up a file, using ANSI color escapes when " the syntax changes colors, for easy, faithful reproduction. " Author: Matthew Wozniski (mjw@drexel.edu) " Date: Fri, 01 Aug 2008 05:22:55 -0400 " Version: 1.0 FIXME " History: FIXME see :help marklines-history " License: BSD. Completely open source, but I would like to be " credited if you use some of this code elsewhere. " Copyright (c) 2015, Matthew J. Wozniski {{{1 " " Redistribution and use in source and binary forms, with or without " modification, are permitted provided that the following conditions are met: " * Redistributions of source code must retain the above copyright " notice, this list of conditions and the following disclaimer. " * Redistributions in binary form must reproduce the above copyright " notice, this list of conditions and the following disclaimer in the " documentation and/or other materials provided with the distribution. " " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY " EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED " WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE " DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY " DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES " (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; " LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND " ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. " Turn off vi-compatible mode, unless it's already off {{{1 if &cp set nocp endif let s:type = 'cterm' if &t_Co == 0 let s:type = 'term' endif " Converts info for a highlight group to a string of ANSI color escapes {{{1 function! s:GroupToAnsi(groupnum) if ! exists("s:ansicache") let s:ansicache = {} endif let groupnum = a:groupnum if groupnum == 0 let groupnum = hlID('Normal') endif if has_key(s:ansicache, groupnum) return s:ansicache[groupnum] endif let fg = synIDattr(groupnum, 'fg', s:type) let bg = synIDattr(groupnum, 'bg', s:type) let rv = synIDattr(groupnum, 'reverse', s:type) let bd = synIDattr(groupnum, 'bold', s:type) " FIXME other attributes? if rv == "" || rv == -1 let rv = 0 endif if bd == "" || bd == -1 let bd = 0 endif if rv let temp = bg let bg = fg let fg = temp endif if fg == "" || fg == -1 unlet fg endif if !exists('fg') && !groupnum == hlID('Normal') let fg = synIDattr(hlID('Normal'), 'fg', s:type) if fg == "" || fg == -1 unlet fg endif endif if bg == "" || bg == -1 unlet bg endif if !exists('bg') let bg = synIDattr(hlID('Normal'), 'bg', s:type) if bg == "" || bg == -1 unlet bg endif endif let retv = "\[22;24;25;27;28" if bd let retv .= ";1" endif if exists('fg') && fg < 8 let retv .= ";3" . fg elseif exists('fg') && fg < 16 "use aixterm codes let retv .= ";9" . (fg - 8) elseif exists('fg') "use xterm256 codes let retv .= ";38;5;" . fg else let retv .= ";39" endif if exists('bg') && bg < 8 let retv .= ";4" . bg elseif exists('bg') && bg < 16 "use aixterm codes let retv .= ";10" . (bg - 8) elseif exists('bg') "use xterm256 codes let retv .= ";48;5;" . bg else let retv .= ";49" endif let retv .= "m" let s:ansicache[groupnum] = retv return retv endfunction function! AnsiHighlight(output_file) let retv = [] for lnum in range(1, line('$')) let last = hlID('Normal') let output = s:GroupToAnsi(last) . "\[K" " Clear to right " Hopefully fix highlighting sync issues exe "norm! " . lnum . "G$" let line = getline(lnum) let cnum = 1 while cnum <=# col('.') " skip ansi codes in the file if cnum <=# col('.') - 1 && line[cnum-1] ==# "\e" && line[cnum] ==# '[' let cnum += 2 while match(line[cnum-1], '[A-Za-z]') ==# -1 let cnum += 1 endwhile let cnum += 1 continue endif let concealed = synconcealed(lnum, cnum) if concealed[0] !=# 1 && synIDtrans(synID(lnum, cnum, 1)) != last let last = synIDtrans(synID(lnum, cnum, 1)) let output .= s:GroupToAnsi(last) endif if concealed[0] ==# 1 && &conceallevel !=# 0 if &conceallevel ==# 1 || &conceallevel ==# 2 let output .= concealed[1] endif else let output .= line[cnum-1] endif "let line = substitute(line, '.', '', '') "let line = matchstr(line, '^\@[0m" return writefile(retv, a:output_file) endfunction " See copyright in the vim script above (for the vim script) and in " vimcat.md for the whole script. " " The list of contributors is at the bottom of the vimpager script in this " project. " " vim: sw=2 sts=2 et ft=vim t/01_files.t [[[1 127 #!/usr/bin/env perl use strict; use warnings; use lib 't/lib'; use Test::More; use File::Slurp qw/read_file write_file/; use File::Temp 'tempfile'; use Data::Dumper; my $ANSI_CODESET = qr/(?:\e\[;*\??(?:\d+(?:;\d+)*)?[A-Za-z])+/; my $RESET_CODESET = qr/\e\[([;\e\[m]|22|24|25|27|28|39|49|0)+m/; # Various ANSI reset codes my %RESETS; @RESETS{qw/22 24 25 27 28 39 49/} = (); foreach my $file ($ENV{ANSI_FILES} ? (split ' ', $ENV{ANSI_FILES}||'') : (glob 't/data/files/*.ans*')) { my $content = read_file $file; my (undef, $tmp_file) = tempfile; system qq{t/bin/vimcat -o "$tmp_file" -u NONE -c 'set t_Co=8 | so plugin/cecutil.vim | so autoload/AnsiEsc.vim | call AnsiEsc#AnsiEsc(0)' "$file" }; my $vimcat_out = read_file $tmp_file; my ($content_pieces, $vimcat_pieces) = normalize($content, $vimcat_out); if ($content eq $vimcat_out) { pass($file); } else { fail($file); # dump a diff by pieces my (undef, $content_tmp) = tempfile('content_XXXXX', TMPDIR => 1); my (undef, $vimcat_tmp) = tempfile('vimcat_XXXXX', TMPDIR => 1); local $Data::Dumper::Useqq = 1; write_file $content_tmp, Dumper($content_pieces); write_file $vimcat_tmp, Dumper($vimcat_pieces); system "t/bin/colordiff -u $content_tmp $vimcat_tmp"; } } done_testing; sub normalize { my ($content, $vimcat_out) = (\$_[0], \$_[1]); # strip trailing reset ansi codes (from line ends as well) s/${RESET_CODESET}$//mg foreach $$content, $$vimcat_out; # strip CRs y/\r//d foreach $$content, $$vimcat_out; if ((not exists $ENV{NORMALIZE_WHITESPACE}) || $ENV{NORMALIZE_WHITESPACE} != 0) { $$_ =~ s/\s+/ /g, $$_ =~ s/\n//g for $content, $vimcat_out; } my @content_pieces = grep { $_ ne '' } split /($ANSI_CODESET)/, $$content; my @vimcat_pieces = grep { $_ ne '' } split /($ANSI_CODESET)/, $$vimcat_out; ($$content, $$vimcat_out) = ('', ''); my (@content_pieces_normalized, @vimcat_pieces_normalized); my ($i, $j) = (0, 0); while ($i < @content_pieces) { if (($content_pieces[$i]||'') =~ /^\e\[/ && ($vimcat_pieces[$j]||'') =~ /^\e\[/) { my $content_piece = $content_pieces[$i]; my $vimcat_piece = $vimcat_pieces[$j]; my @content_codes = $content_piece =~ /\d+/g; my @vimcat_codes = $vimcat_piece =~ /\d+/g; my (%content_codes, %vimcat_codes); @content_codes{@content_codes} = (); @vimcat_codes{@vimcat_codes} = (); # remove any reset codes from vimcat codes that are not in # content foreach my $reset (keys %RESETS) { if ((not exists $content_codes{$reset}) && exists $vimcat_codes{$reset}) { delete $vimcat_codes{$reset}; } } # put back sorted codes $content_piece = "\e[" . (join ';', sort { $a <=> $b } keys %content_codes) . 'm'; $vimcat_piece = "\e[" . (join ';', sort { $a <=> $b } keys %vimcat_codes) . 'm'; push @content_pieces_normalized, $content_piece; push @vimcat_pieces_normalized, $vimcat_piece; $$content .= $content_piece; $$vimcat_out .= $vimcat_piece; } else { # mismatch, skip ahead one piece and keep trying $$content .= $content_pieces[$i]||''; $$vimcat_out .= $vimcat_pieces[$j]||''; push @content_pieces_normalized, $content_pieces[$i]||''; push @vimcat_pieces_normalized, $vimcat_pieces[$j]||''; } $i++; $j++; # scan ahead to next part that has codes # assume the codeset positions match foreach my $set ([\$i, \@content_pieces, $content, \@content_pieces_normalized], [\$j, \@vimcat_pieces, $vimcat_out, \@vimcat_pieces_normalized]) { my ($i, $arr, $text, $pieces) = @$set; while ($$i < @$arr && $arr->[$$i] !~ /^\e\[/) { $$text .= $arr->[$$i]; push @$pieces, $arr->[$$i]; $$i++; } } } return (\@content_pieces_normalized, \@vimcat_pieces_normalized); } t/data/files/bull1_old.ans [[[1 20  This is a FREE BBS!  (And worth every penny)  The only thing on this board that costs you one red cent to use are the files on CD-ROM. And that's not too expensive. How expensive, you say? Well, how much would you pay? $20 a year? $40 a month? $32,767.42 a minute?  But no! It's just five bucks a year! Certainly you can spring for that. What all do you get? Well, since you get so much normally, there's not a whole lot more we can give you. But you do get 100 minutes a day online, and of course CD-ROM access. Plus, if you order now, we will NOT release the photos!  Andy takes sexual favors, I take cash or check. Send your donation to the following adress, along with a note telling me what you want me to do with it:  Leonard Richardson  2006 Napa Rd. Arvin, CA 93203  (Letter bombs returned to sender) дддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддд We currently have the following CDs avaliable for those who have paid us off: Giga Games Shareware Overload Trio 1, 2, & 3 Arsenal Files 1 & 2 Night Owl 14дддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддд t/data/files/simple.ansi [[[1 6 This is a green line. This is a blue line. This is a red line. This is a green on blue line. This is a blue on red line. This is a red on green line. t/data/files/bull12.ans [[[1 104 04/27/94 WILDNET NETWORK RULES --------------------- [ ACCESS TO MESSAGES ] UNRESTRICTED Conferences: Most Wildnet conferences are unrestricted forums where ALL messages are accessible to all members of the network, subject to the discretion of local sysops and network administration. There are no facilities for private or secure messages in unrestricted conferences and all messages no matter how marked, are open to all members of the network. RESTRICTED Conferences: Some Wildnet conferences are restricted forums; they include a few network admin and age restricted conferences. Access to these conferences is limited to BBS callers and member Sysops who meet the requirements listed in network documentation. Members who meet the requirements will be allowed access to all messages in the forum subject to the discretion of local sysop(s) and network administration. In accordance with the Electronic Communications Privacy Act of 1986, it is unlawful for a person who is not a member of the Wildnet network and/or does not meet the requirements for access to a restricted conference to intentionally intercept or use any messages or message portions from a restricted conference. It is also unlawful for any person authorized access to a restricted Wildnet conference to intentionally disclose messages or message portions from restricted conferences to any other person who is not authorized access to that conference. There are no facilities for private or secure messages in restricted conferences and all messages no matter how marked are open to all network members with authorized access. [ CONFERENCE RULES ] Each conference has a moderator/host who will post the special guidelines for that conference if needed. Please co-operate with the conference moderator; He or she is in charge of the conference. There is more information located in NODES.DOC, under the heading of "Problem Resolution". Please refer there for greater detail. [ ALIASES ] Aliases are only allowed in conferences that are marked "ALIAS ALLOWED" in the conference listings. All other conferences require the use of REAL NAMES ONLY. Real names are allowed in the alias conferences, but aliases are not allowed in the real name conferences. Sysops: Please make sure your Wildnet conferences are configured correctly. [ QUOTING OF MESSAGES ] When replying to a message, please don't quote the entire message; We've all read the same messages and don't wish to read them again. You should usually quote a couple lines to refresh people's memory, but keep the quotes to 15 lines or less, unless there are several questions/points that you wish to reply to. Taglines should normally not be quoted. Moving mail costs everyone money. Cutting down on overquoting will greatly reduce everyone's phone bill. [ TAGLINES ] In order to promote cost savings, we feel that 3 lines should suffice for the length of a tagline. Use of ANSI in taglines may be restricted in some conferences. Common courtesy is asked of all to refrain from exceeding this limit on a regular basis. [ TOPICS ] Please keep your messages on the topic of the conference. If off-topic or out-of-place messages occur, please let the moderator take care of it. If the moderator is unavailable (vacation, illness, etc.), please let your Sysop know about the problem. A moderator may declare a topic "off topic" if it is warranted in their judgement. [ FOUL LANGUAGE ] Unless you are writing messages in an adult conference (over 18/21), you must keep your language clean. Most Wildnet conferences are open to people of all ages and foul language is inappropriate in these conferences. Don't use text like SH#%, F%#K, or anything similar. It doesn't take that much imagination to figure these out. When in doubt, use the Billboard principle. Do not post words in a message that you would not see on roadside advertisements. [ ADDITIONAL INFORMATION ] For additional information about Wildnet along with a node list, historical information, node and hub guidelines, please refer to the Wildnet information file. Enjoy! WILDNET (tm) is a trademark of the Wildnet Communications Network. t/data/files/vimcat_doc.ansi [[[1 46 % VIMCAT(1) vimcat user manual % Abdó Roig-Maranges <abdo.roig@gmail.com> % April 29, 2015  # NAME  vimcat - vim based syntax highlighter  # SYNOPSIS  vimcat [options] file1 [file2 ...]  # DESCRIPTION cat's a file to stdout, syntax-highlighting it using vim as a backend.  On GitHub: <http://github.com/rkitover/vimpager>  To use a different vimrc with vimcat, put your settings into a ~/.vimcatrc.  To disable loading plugins, put "set noloadplugins" into a ~/.vimcatrc file.  If output is not a terminal, it will simply run cat, so using vimcat in pipe commands is safe. If you actually need the ANSI codes, use -o .  # COMMAND LINE OPTIONS  ## -c cmd  Run a vim command after opening the file. Multiple -c arguments are supported.  ## --cmd cmd  Run a vim command when entering vim before anything else. Multiple --cmd arguments are supported.  ## -u vimrc  Use an alternate .vimrc or .vimcatrc.  ## -o output_file  Write output to output_file instead of the terminal. This works when vimcat is not run on a terminal as well.  If output_file is "-" then output is written to STDOUT. t/data/files/README [[[1 5 The *.ans files are ANSI art taken from: http://artscene.textfiles.com/ansi/unsorted/ The *.ansi files are other test files from various sources. t/data/files/bull11.ans [[[1 212  зддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддд©  Ё Bulletin #16 _OUR_ Glossary of BBS Terms Ё  юддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддддды  (w/apologies to MSI) We hope you find this information useful. ARQ - Awfully Repetitive Questionnaire. The questionnaire you have to fill in when you log onto a board for the first time that differs only slightly from board to board. ASCII - American Standard Code for Information Exchange. A 7-bit binary code representation of letters, numbers and happy faces. Asynchronous - A term used by modem professionals to make themselves look smart and to confuse everyone else. Comare Synchronous, Parity, CRC, and in fact most of the rest of this file. Auto Answer - The modem feature which means you have to unplug the modem as well as the phone when you don't want to be disturbed. Baud Rate - The variable B in the equation T=S/B, where T is time and S is the size of the file you want to download. BBS - Bulletin Board System. Bit - A computer signal so small as to be unimportant. Like a quark. Buffer - The place data goes when the host modem bites off more than it can chew. Bulletin Board System - A sure way to get rid of all that excess time and money. Many hermits have turned from living in the desert to running a BBS as their chosen form of self-discipline. Byte - The leftover bit at the end of all the files you download that don't make a complete block. Carrier - An open phone line. Dropping carrier=hanging up. Conference - An area of public messages on a Bulletin Board System, usually with a particular topic. The topic serves no purpose except to give the conference a name, since practically nothing posted in a conference has anything to do with the topic. CCITT - A weird way of spelling "sit." What this has to do with communications we haven't figured out yet. CPS - Conferences Per Sysop. The number of conferences a sysop makes that people actually post in. The average CPS in Bakersfield is 2. CRC - Clashing Red Colors. The term for any ANSI drawing in which it's impossible to tell which is light red and which is dark red. Download - Receiving a file from a Bulletin Board System. This is a complicated process but very easy once you master it. How the computers actually do the download is beyond us. DTE - Drastically Tacky Entry. A message left by someone new to computers or communications such as "HI!!!!!!!!!". This is an unconscious sign that they are new and need help. DTR - Deter, according to the Short Circuit Industries Pseudo4800 modem, which is actually only a 2400 but takes out all vowels in order to save time. Data Compression Protocols - External protocols developed by PkWare in order to be able to download PKWare products in half the time. Unfortunately, any PKWare product you may wish to download takes less time to download then the actual compression protocol, so they are rarely used. Data Transmission Protocols - Um... protocols for transmitting data. Don't ask stupid questions. Right! On to the next one! Echomail - Local message conferences on a Bulletin Board System, so called because if it were a room it would echo whenever someone posted a message. Expanded Memory - The ability to remember the file you wanted to download after seeing the rest of the list. Extended Memory - The ability to remember the number of the file area you want to list without having to list the areas. Flow Control - A conspiracy between the modem companies to build imperfections in some modems to make them transfer at lower speeds. This means that they can charge $200+ for a 14400 baud modem. Error Control Protocols - These are a form of virus checking that scrutinizes each individual block of data for a virus. Since it is very hard to fit a virus inside a single block and the results are very unreliable, this is obviously another way to slow down our modems. Freeware - Computer software which may be distributed on Bulletin Board Systems, and for which the author requests no license fee or registration fee. Either they were very kind or desperate for recognition, or the software sucks. Full Duplex - A sysop who runs a free BBS. Half Duplex - The co-sysop of a free BBS (it wasn't their idea). Host System - What the Coneheads would call a Bulletin Board System. Local Area Network (LAN) -  A BBS that never actually uses phone lines and allows access to DOS. Mail Door - The department of Sears that delivers doors to your home. This also has nothing to do with communications so we have no idea what it's doing in this glossary. MNP - Many Nutty People. The reason subscription BBSes make money. Netmail -  Private mail that has been tampered with so as to go to a different individual. A mail-netting program is used by unscrupulous sysops to read their users' private mail without informing them of it. NRAM - Not Really Allocated Money. Embezzled funds. Where most of the donations to BBSes come from. ON/OFF Hook -  The practice of putting a fake hook on your hand and flipping the ON/OFF switch on your computer rapidly with it while shouting, "I'll get ye, Peter Pan!" Packer -  A BBS caller who has resorted to low-paying jobs such as work in a packing shed in order to afford subscription BBSes. Packet -  What a packer hears 32,767 times a day. Parity -  This file. Protocol -  A set of rules used by both the host and remote computer in order to avoid a fight between the two modems. This is especially important when two modems from different companies are connected. Public Domain - Software that anyone can screw up, not just the author. Remote Echo - A conference on which NOBODY ever posts. Shareware - Software that can be distributed to other people. You're supposed to send them money if you like it but nobody ever does. SysOp - The operator of a Bulletin Board System. Sufficient proof for legal insanity in most states. Thread - What most BBSes are held together with. Unpacker - Someone who was born rich and can afford all those subscription BBSes. They occasionally go out in the fields and enrage the packers. Upload - Sending a file to a BBS instead of recieving one. Usually only practiced by sysops. V.21 - The standard term for a communications program in first alpha testing. V.22 and up - Standard terms for a communications program in other stages of testing.  здддддддддддддддддддддддддддд End of Bulletin дддддддддддддддддддддддддддддд© тммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммммм╬ t/data/files/bull2.ans [[[1 23   THE RULESч  ъъъъъъъъъъ 1: No public demonstrations of bodily functions 2: OBEY THE RULES DAMMIT!  Other than that, anything goes. Note that there is no rule instructing you to have fun. You don't have to have fun if you don't want to. However, if you don'tlike having fun, you might want to call a BBS less conductive to it than this one.  tank-u tank-u  з© юеы зе©eonard юыю t/data/files/bull7.ans [[[1 16 THE TOP 10 REASONS BARBIE DOLLS SHOULD BE BANNED: 10. Her commercials make me vomit. 9. Bubble Princess Barbie? What the heck is Bubble Princess Barbie? 8. She embodies values that most Americans associate with yogurt. 7. Her head comes off, presenting a choking hazard. 6. She is degrading to women. 5. She is degrading to men. 4. New Radioactive Barbie just isn't a good idea. 3. She provides bad avant-garde artists with an endless source of material. 2. New boxes have sticker on front saying "BAN ME!" AND THE NUMBER ONE REASON BARBIE DOLLS SHOULD BE BANNED... 1. The latest Talking Barbie says "Where the hell are my nipples?" t/data/files/bull8.ans [[[1 12 ммммммммммммммммммммммммммм ч Hareware Productions' щ  Birthday Files Lister  ммммммммммммммммммммммммммм -----------------------------------------------------------------------------  The following files have birthdays today. Why not write them a message  wishing them congratulations on a very special day? ----------------------------------------------------------------------------- Oh no! No birthday files? I'll just have to eat all this cake myself! MMMMPHHRRRRPHMBGGGG! t/data/files/paws_js_pg1_w_extra_markup.ansi [[[1 25 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  Hi! My name's ______ __ | __ \.---.-.--.--.--.-----. |__|.-----. | __/| _ | | | |__ --|__| ||__ --| |___| |___._|________|_____|__| ||_____| ... and I love you lots. ♥️ |___| Usage:  >  paws.js [flags] operation [operation parameters]     # for example,   >  paws.js foo.paws [[--] arguments]   >  paws.js interact   >  paws.js parse bar.paws  The first non-flag argument will be an operation to perform; the second depends on the operation, but is usually a path to a file to load. If no operation is given, then the start operation is assumed. In true UNIX style, single-letter flags may be combined serially; that is, -aBc is synonymous with -a -B -c. Furthermore, all arguments following a bare -- are passed to the program un-parsed (that is, even if it's a flag that would otherwise be interpreted by the Paws.js CLI, it will be ignored and passed Verbatim to the Paws program being run.)