home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / vim-2.0.lha / Vim-2.0 / doc / msdos.doc < prev    next >
Encoding:
Text File  |  1993-12-15  |  6.4 KB  |  145 lines

  1. This file contains the particularities for the MSDOS version of Vim.
  2.  
  3. The default output method is to use bios calls. This will work right away on
  4. most systems. You do not need ansi.sys.
  5.  
  6. You can set the color used in vim with two termcap options:
  7.  
  8.     ":set t_tp=^V^[\|xxm"        for normal text
  9.     ":set t_ti=^V^[\|xxm"        for error messages and visual mode
  10.  
  11. ^V is CTRL-V
  12. ^[ is ESC
  13. xx must be replaced by a decimal code: The foreground color number and
  14.    background color number added together:
  15.  
  16. COLOR        FOREGROUND    BACKGROUND
  17. black            0            0
  18. blue            1           16
  19. green            2           32
  20. cyan            3           48
  21. red            4           64
  22. magenta            5           80
  23. brown            6           96
  24. lighgray        7          112
  25. darkgray        8
  26. lightblue        9
  27. lightgreen       10
  28. lighcyan       11
  29. lightred       12
  30. lighmagenta       13
  31. yellow           14
  32. white           15
  33. blink               128
  34.  
  35. When you use 0, the color is reset to the one used when you started Vim. This
  36. is the default for t_tp. The default for t_ti is white on red, 15 + 64 = 79.
  37.  
  38. The termcap codes that are translated into bios calls are:
  39.     ESC |J        clear screen
  40.     ESC |K        clear to end of line
  41.     ESC |L        insert line
  42.     ESC |M        delete line
  43.     ESC |row;colH    position cursor
  44.     ESC |attrm    set character attribute
  45.  
  46. If you want to use another output method (e.g. when using a terminal on a COM
  47. port), set the terminal name to "pcansi". You can change the termcap options
  48. when needed (see chapter 20 of reference.doc). Note that the normal IBM
  49. ansi.sys does not support all the codes of the builtin pcansi terminal. If
  50. you use ansi.sys you will need to delete the termcap entries t_il and t_dl
  51. with
  52.     ":set t_il= t_dl=".
  53. Otherwise the screen will not be updated correctly. It is better to use
  54. nansi.sys, nnansi.sys or the like instead of ansi.sys.
  55.  
  56. If you want to use Vim on a terminal connected to a COM: port, reset the
  57. 'bioskey' option. Otherwise the commands will be read from the PC keyboard.
  58. CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
  59.  
  60. If the "tx" (textmode) option is set (which is the default), Vim will accept a 
  61. single <LF> or a <CR><LF> pair for end-of-line. When writing a file Vim will 
  62. use <CR><LF>. Thus if you edit a file and write it, <LF> is replaced with 
  63. <CR><LF>. If the "tx" option is not set the single <LF> will be used for
  64. end-of-line. A <CR> will be shown as ^M. You can use Vim to replace <LF> by
  65. <CR><LF> by reading in any mode and writing in text mode. You can use Vim to
  66. replace <CR><LF> by <LF> by reading in text mode and writing in non-text
  67. mode. 'textmode' is set automatically when 'textauto' is on (which is the
  68. default), so you don't really have to worry about what you are doing.
  69.  
  70. If you want to edit a script file or a binary file you should reset the
  71. 'textmode' and 'textauto' options before loading the file. Script files
  72. contain single <LF> characters which would be replaced by <CR><LF>. You can
  73. do this by starting Vim with the "-b" (binary) option.
  74.  
  75. The default help filename is "$VIM\vim.hlp". If the environment variable $VIM 
  76. is not defined or the file is not found, the DOS search path is used to 
  77. search for the file "vim.hlp". If you do not want to put "vim.hlp" in your 
  78. search path, use the command ":set helpfile=pathname" to tell Vim where the 
  79. help file is.
  80.  
  81. The ":cd" command recognizes the drive specifier and changes the current
  82. drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\dos" to go
  83. to the directory "dos" in the root of drive D.
  84.  
  85. The files "_vimrc" and "_exrc" are used instead of ".vimrc" and ".exrc".
  86. The files "$VIM\_vimrc" and "$VIM\_exrc" are used instead of "s:.vimrc" and 
  87. "s:.exrc". To use the file "c:\_vimrc" use the command "set vim=c:".
  88.  
  89. Use CTRL-break instead of CTRL-C to interrupt searches. The CTRL-C is not
  90. detected until a key is read.
  91.  
  92. Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and 
  93. SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or 
  94. CTRL.
  95.  
  96. Temporary files (for filtering) are put in the current directory.
  97.  
  98. The default for the sh (shell) option is "command". External commands are 
  99. started with "command /c <command_name>". Typing CTRL-Z starts a new command 
  100. shell. Return to Vim with "exit".
  101.  
  102. If you want to use different colors set the termcap code t_tp (for normal
  103. text) and/or t_ti (for inverted text).
  104.  
  105. Standard ANSI escape sequences are used. The codes are:
  106. 30 black foreground       40 black background        0 all attributes off
  107. 31 red foreground         41 red background         1 high intensity (bold)
  108. 32 green foreground       42 green background       2 normal intensity
  109. 33 yellow foreground      43 yellow background      4 underline
  110. 34 blue foreground        44 blue background        5 blinking
  111. 35 magenta foreground     45 magenta background     7 reverse video
  112. 36 cyan foreground        46 cyan background        8 invisible
  113. 37 white foreground       47 white background  
  114.  
  115. The codes can be combined by separating them with a semicolon. For example to
  116. get white text on a blue background:
  117.     :set t_tp=^V<ESC>[0;37;44m
  118.  
  119.  
  120. MS-DOS allows for only one filename extention. Therefore, in the original 
  121. filename the '.' is replaced by a '_', the name is truncated to 8 characters 
  122. and the new extention ".vim" or ".bak" is appended. Two examples: "test.c" 
  123. becomes "test_c.bak", "ditiseen.tst" becomes "ditiseen.bak". The 'shortname' 
  124. option is not available.
  125.  
  126. The MS-DOS binary was compiled with Borland-C++ version 3.1, using
  127. makefile.bcc. Other compilers should also work. Use makefile.dos for Turbo-C
  128. 2.0. Use makefile.bcc for other Borland compilers, also Turbo-C++ 3.0 (with
  129. small changes). If you get all kinds of strange error messages when compiling,
  130. you have to add <CR> characters at the end of each line. This can be done with
  131. the addcr program: "make addcr". This will compile addcr.c to addcr.exe and
  132. execute the addcr.bat file. Sometimes this fails. Then execute the addcr.bat
  133. file from the DOS prompt.
  134.  
  135. All text is kept in memory. This limits the size of the file you can edit,
  136. the number of undo levels that can be remembered, etc.. If Vim gives an "Out 
  137. of memory" warning you should stop editing. Result of further editing actions 
  138. is unpredictable. Setting 'undolevels' to 0 saves some memory. Running the
  139. maze macros on a big maze is guaranteed to run out of memory, because each
  140. change is remembered for undo. In this case set 'undolevels' to a negative
  141. number. This will switch off undo completely. In a future release extended
  142. memory and/or a swap file will be used to avoid these problems.
  143.  
  144. The *.info files are for the Amiga. You don't need them with MSDOS.
  145.