my dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
9.1 KiB

  1. *AnsiEsc.txt* Ansi Escape Sequence Visualization Jan 10, 2015
  2. Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
  3. (remove NOSPAM from Campbell's email first)
  4. Copyright: (c) 2004-2014 by Charles E. Campbell *AnsiEsc-copyright*
  5. The VIM LICENSE applies to AnsiEsc.vim and AnsiEsc.txt
  6. (see |copyright|) except use "AnsiEsc" instead of "Vim".
  7. No warranty, express or implied. Use At-Your-Own-Risk.
  8. ==============================================================================
  9. 1. Contents *AnsiEsc* *AnsiEsc-contents*
  10. 1. Contents ...................................|AnsiEsc-contents|
  11. 2. AnsiEsc Manual ...................................|AnsiEsc|
  12. 3. AnsiEsc History ...................................|AnsiEsc-history|
  13. ==============================================================================
  14. 2. Manual *AnsiEsc-manual*
  15. CONCEAL~
  16. The best option: for this, your vim must have +conceal. Try either >
  17. :version
  18. :echo has("conceal")
  19. < if you have vim v7.3. Your vim needs to have been compiled
  20. for "big" or "huge" and to support syntax highlighting.
  21. Vim: (v7.2 or earlier) -- ansi escape sequences themselves are Ignore'd~
  22. Ansi escape sequences have the expected effect on subsequent
  23. text, but the ansi escape sequences themselves still take up
  24. screen columns. The sequences are displayed using "Ignore"
  25. highlighting; depending on your colorscheme, this should either
  26. make the sequences blend into your background or be visually
  27. suppressed. If the sequences aren't suppressed, you need to
  28. improve your colorscheme!
  29. *:AnsiEsc*
  30. USAGE~
  31. :AnsiEsc -- toggles Ansi escape sequence highlighting
  32. :AnsiEsc! -- rebuilds highlighting for new/removed three
  33. or more element Ansi escape sequences.
  34. RESULT~
  35. Ansi escape sequences become concealed or ignored (depending
  36. on whether your vim supports Negri's conceal mode), and their
  37. effect on subsequent text is emulated with Vim's syntax
  38. highlighting.
  39. Syntax highlighting for one and two element codes are
  40. hard-coded into AnsiEsc.vim. There are too many possibilities
  41. for three or more element codes; these are supported by
  42. examining the file for such sequences and only building syntax
  43. highlighting rules for such sequences as are actually present
  44. in the document.
  45. EXAMPLE~
  46. You'll want to use :AnsiEsc to see the following properly!
  47. Color Escape Sequences
  48.  -   1   2   3   4   5   7 
  49. black black black black black black black
  50. red red red red red red red
  51. green green green green green green green
  52. yellow yellow yellow yellow yellow yellow yellow
  53. blue blue blue blue blue blue blue
  54. magenta magenta magenta magenta magenta magenta magenta
  55. cyan cyan cyan cyan cyan cyan cyan
  56. white white white white white white white
  57. Black B B B B B B B B
  58. Red R R R R R R R R
  59. Green G G G G G G G G
  60. Yellow Y Y Y Y Y Y Y Y
  61. Blue B B B B B B B B
  62. Magenta M M M M M M M M
  63. Cyan C C C C C C C C
  64. White W W W W W W W W
  65. Here's the vim logo:
  66. / \
  67. / \
  68. / \
  69. / \
  70. +----+ +----+ \
  71. ++ ++ +- | \
  72. /| | / / \
  73. X | | / /O \
  74. \| | / /+-+ +-\//-+
  75. | |/ / | | | v |
  76. | / / | | | + +|
  77. | / | |/| |\/||
  78. +----\ +-+ +-+ ++
  79. \ /
  80. \ /
  81. PROBLEM WITH EMBEDDING:
  82. AnsiEsc plugin highlighting cannot be embedded in another
  83. syntax language.
  84. AnsiEsc uses the syntax highlighting engine, so it is
  85. effectively another syntax highlighting language. But,
  86. there are major differences:
  87. * It supports being turned on and off
  88. * AnsiEsc is not a syntax highlighting file, it
  89. is a plugin
  90. * AnsiEsc dynamically determines some syntax
  91. highlighting by analyzing what's needed in the
  92. current file.
  93. To do a syntax highlighting file would involve an inordinate
  94. quantity of permutations, resulting in a file that would take
  95. much time to load (about a half hour with only a partially
  96. complete set of permutations on my system).
  97. Normally to embed a syntax highlighting language in another
  98. would involve a pair of syntax highlighting commands such as:
  99. syn include @AnsiEsc
  100. syn region ... defines the region where AnsiEsc
  101. \ highlighting is to occur ... contains=@AnsiEsc
  102. placed in the other syntax file's definitions. That won't
  103. work with AnsiEc because, again, AnsiEsc is not a syntax
  104. highlighting file.
  105. ==============================================================================
  106. 3. AnsiEsc History *AnsiEsc-history* {{{1
  107. v13 Apr 12, 2012 * (Peter Brant) a "conceal" was left on a syntax
  108. definition in a no-conceal-support if block.
  109. Fixed.
  110. Apr 17, 2012 * (Ingo Karkat) support for the "reverse" attribute
  111. May 13, 2014 * (Jason Schmidt) reported that <esc>[39m didn't work.
  112. This means revert to default foreground. Similarly,
  113. <esc>[49m didn't work (which means revert to default
  114. background).
  115. Dec 11, 2014 * Implemented implicit foreground/background
  116. Jan 10, 2015 * (Evgeny Lukianchikov) provided XUbuntu support for
  117. no-ansi-sequence (AnsiNone)
  118. v12 Jul 23, 2010 * changed conc to |'cole'| to correspond to vim 7.3's
  119. change
  120. * for menus, &go =~# used to insure correct case
  121. Aug 10, 2010 * (Rainer M Schmid) changed conceallevel setting to
  122. depend on whether the version is before vim 7.3;
  123. for 7.3, also sets concealcursor
  124. * Restores conc/cole/cocu settings when AnsiEsc is
  125. toggled off.
  126. Dec 13, 2010 * Included some additional sequences involving 0
  127. Feb 22, 2011 * for menus, &go =~# used to insure correct case
  128. v11 Apr 20, 2010 * AnsiEsc now supports enabling/disabling via a menu
  129. * <esc>[K and <esc>[00m now supported (as
  130. grep --color=always issues them)
  131. v10 May 06, 2009 * Three or more codes in an ANSI escape sequence are
  132. supported by building custom syntax and highlighting
  133. commands.
  134. May 20, 2009 * cecutil bugfix
  135. v9 May 12, 2008 * Now in plugin + autoload format. Provides :AnsiEsc
  136. command to toggle Ansi-escape sequence processing.
  137. Jan 01, 2009 * Applies Ignore highlighting to extended Ansi escape
  138. sequences support 256-colors.
  139. Mar 18, 2009 * Includes "rapid blink" ansi escape sequences. Vim
  140. doesn't have a blinking attribute, so such text uses
  141. "standout" for vim and "undercurl" for gvim.
  142. v8 Aug 16, 2006 * Uses undercurl, and so is only available for vim 7.0
  143. v7 Dec 14, 2004 * Works better with vim2ansi output and Vince Negri's
  144. conceal patch for vim 6.x.
  145. v2 Nov 24, 2004 * This version didn't use Vince Negri's conceal patch
  146. (used Ignore highlighting)
  147. ==============================================================================
  148. Modelines: {{{1
  149. vim:tw=78:ts=8:ft=help:fdm=marker: