home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim53os2.zip / vim-5.3 / doc / os_msdos.txt < prev    next >
Text File  |  1998-08-30  |  12KB  |  248 lines

  1. *os_msdos.txt*  For Vim version 5.3.  Last modification: 1998 Jun 03
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Bram Moolenaar
  5.  
  6.  
  7.                         *msdos* *ms-dos*
  8. This file contains the particularities for the MS-DOS version of Vim.
  9.  
  10. 1. Two versions for MS-DOS    |msdos-versions|
  11. 2. Known problems        |msdos-problems|
  12. 3. Long file names        |msdos-longfname|
  13. 4. Termcap codes        |msdos-termcap|
  14. 5. Shifted arrow keys        |msdos-arrows|
  15. 6. Filename extensions        |msdos-fname-extensions|
  16. 7. Memory usage and limitations    |msdos-limitations|
  17. 8. Symbolically linked files    |msdos-linked-files|
  18. 9. Copy/paste in a dos box    |msdos-copy-paste|
  19.  
  20. Additionally, there are a number of common Win32 and DOS items:
  21. File locations            |dos-locations|
  22. Using backslashes        |dos-backslash|
  23. Standard mappings        |dos-standard-mappings|
  24. Screen output and colors    |dos-colors|
  25. File formats            |dos-file-formats|
  26. :cd command            |dos-:cd|
  27. Interrupting            |dos-CTRL-Break|
  28. Temp files            |dos-temp-files|
  29. Shell option default        |dos-shell|
  30.  
  31. For compiling Vim see src/INSTALL.pc.            *msdos-compiling*
  32.  
  33. ==============================================================================
  34. 1. Two versions for MS-DOS                *msdos-versions*
  35.  
  36. There are two versions of Vim that can be used with MS-DOS machines:
  37.  
  38.                             *dos16*
  39. Dos16 version    Can be used on any MS-DOS system, only uses up to 640 Kbyte of
  40.         memory.  Also runs on OS/2, Windows 95, and NT.  Excludes some
  41.         Vim-specific features (autocommands, syntax highlighting,
  42.         etc.).  Recommended for use on pre-386 machines.
  43.                             *dos32*
  44. Dos32 version    Requires 386 processor and a |DPMI| driver, uses all
  45.         available memory.  Supports long file names, but NOT on
  46.         Windows NT.  Recommended for MS-DOS, Windows 3.1 and Windows
  47.         95.
  48.  
  49. There are also two versions that run under Windows:
  50. Win32 version   Requires Windows 95 or Windows NT, uses all available
  51.         memory, supports long file names, etc.  Has some problems on
  52.         Windows 95.  Recommended for Windows NT.  See |os_win32.txt|
  53. Win32 GUI    Requirements like the Win32 version, but runs in its own
  54.         window, instead of a console.  Has scrollbars, menu, etc.
  55.         Recommended for Windows 95 and Windows NT.  See |gui-w32|.
  56.  
  57. It is recommended to use the Dos32 or Win32 version.  Although the Dos16
  58. version is able to edit very big files, it quickly runs out of memory when
  59. making big changes.  Disabling undo helps: ":set ul=-1".  The screen updating
  60. of the Dos16 version is the fastest of the three on DOS or Windows 95; on
  61. Windows NT, the Win32 version is just as fast.
  62.  
  63.                                 *DPMI*
  64. For the Dos32 version, you may need a DPMI driver when running in MS-DOS.  If
  65. you are running Windows or installed a clever memory manager, it will probably
  66. work already.  If you get the message "No DPMI", you need to install a DPMI
  67. driver.  Such a driver is included with the executable in CSDPMI4B.ZIP.  Run
  68. "cwsdpmi" just before starting Vim each time.  Or you might want to include
  69. "cwsdpmi -p" in your autoexec.bat to make it resident.  The latest version of
  70. "CSDPMI*.ZIP" can be obtained from: "ftp.neosoft.com:pub/users/s/sandmann".
  71.  
  72. The 16 bit DOS version has been compiled with minimal functions.  These are
  73. missing:
  74. |+autocmd|    autocommands
  75. |+cindent|    'cindent'
  76. |+digraphs|    digraph support
  77. |+eval|        expression evaluation, including ":if", ":while", ":let"
  78. |+ex_extra|    Ex commands ":retab", ":right", ":left", ":center", ":normal"
  79. |+file_in_path|    searching for a file in 'path': "gf", <cfile>
  80. |+find_in_path|    commands that search in included files, such as "[I",
  81.         ":ilist", ":checkpath"
  82. |+insert_expand| Insert mode expansion, such as CTRL-N, CTRL-X CTRL-F
  83. |+lispindent|    'lispindent'
  84. |+quickfix|    Quickfix commands ":make", ":cnext", "-q" command-line option
  85. |+showcmd|    'showcmd' option
  86. |+smartindent|    'smartindent'
  87. |+syntax|    syntax highlighting
  88. |+textobjects|    text objects, such as "as", "iw"
  89. You can include (some of) these by editing feature.h and recompiling.
  90.  
  91. ==============================================================================
  92. 2. Known problems                    *msdos-problems*
  93.  
  94. - When using smartdrive (MS-DOS 6.x) with write-behind caching, it is possible
  95.   that Vim will try to create a swap file on a read-only file system (e.g.
  96.   write protected floppy).  You will then be given the message
  97.     "A serious disk error has occurred .., Retry (r)? " There is nothing
  98.   you can do but unprotect the floppy or switch off the computer.  Even
  99.   CTRL-ALT-DEL will not get you out of this.  This is really a problem of
  100.   smartdrive, not Vim.  Smartdrive works fine otherwise.  If this bothers you,
  101.   don't use the write-behind caching.
  102. - Vim can't read swap files that have been opened already, unless the "share"
  103.   command has been used.  If you see stray warnings for existing swap files,
  104.   include the "share" command in your config.sys or autoexec.bat (see your
  105.   MSDOS documentation).
  106. - The Dos16 version can only have about 10 files open (in a window or hidden)
  107.   at one time.  With more files you will get error messages when trying to
  108.   read or write a file, and for filter commands.  Or Vim runs out of memory,
  109.   and random problems may result.
  110. - The Dos32 version cannot have an unlimited number of files open at any one
  111.   time.  The limit depends on the setting of FILES in your CONFIG.SYS. This
  112.   defaults to 15; if you need to edit a lot of files, you should increase
  113.   this. If you do not set FILES high enough, you can get strange errors, and
  114.   shell commands may cause a crash!
  115. - The Dos32 version can work with long file names.  When doing file name
  116.   completion, matches for the short file name will also be found.  But this
  117.   will result in the corresponding long file name.  For example, if you have
  118.   the long file name "this_is_a_test" with the short file name "this_i~1", the
  119.   command ":e *1" will start editing "this_is_a_test".
  120. - When using the Dos32 version and you run into problems with DPMI support,
  121.   check if there is a program in your config.sys that eats resources.  One
  122.   program known to cause this problem is "netx", which says "NetWare v. 3.26
  123.   Workstation shell".  Replace it with version 3.32 to fix the problem.
  124.  
  125. ==============================================================================
  126. 3. Long file names                    *msdos-longfname*
  127.  
  128. If the Dos32 version is run on Windows 95, it can use long file names.  It
  129. will work by default.  If you want to disable this, use this setting:
  130.     set LFN=N
  131. You can put this in your autoexec.bat file.
  132.  
  133. Note: If you have installed DJGPP on your machine, you probably have a
  134. "djgpp.env" file, which contains "LFN=n".  You need to use "LFN=Y" to switch
  135. on using long file names then.
  136.  
  137. ==============================================================================
  138. 4. Termcap codes                    *msdos-termcap*
  139.  
  140. If you want to use another output method (e.g., when using a terminal on a COM
  141. port), set the terminal name to "pcansi".  You can change the termcap options
  142. when needed (see |terminal-options|).  Note that the
  143. normal IBM ansi.sys does not support all the codes of the builtin pcansi
  144. terminal.  If you use ansi.sys, you will need to delete the termcap entries
  145. t_al and t_dl with
  146. >  :set t_al= t_dl=
  147. Otherwise, the screen will not be updated correctly.  It is better to use
  148. nansi.sys, nnansi.sys, or the like instead of ansi.sys.
  149.  
  150. If you want to use Vim on a terminal connected to a COM: port, reset the
  151. 'bioskey' option.  Otherwise the commands will be read from the PC keyboard.
  152. CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
  153.  
  154. ==============================================================================
  155. 5. Shifted arrow keys                    *msdos-arrows*
  156.  
  157. Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and
  158. SHIFT-arrow-right.  The arrow-up and arrow-down cannot be used with SHIFT or
  159. CTRL.
  160.  
  161. ==============================================================================
  162. 6. Filename extensions                *msdos-fname-extensions*
  163.  
  164. MS-DOS allows for only one file name extension.  Therefore, when appending an
  165. extension, the '.' in the original file name is replaced with a '_', the name
  166. is truncated to 8 characters, and the new extension (e.g., ".swp") is
  167. appended.  Two examples: "test.c" becomes "test_c.bak", "thisisat.est"
  168. becomes "thisisat.bak".  To reduce these problems, the default for
  169. 'backupext' is "~" instead of ".bak".  The backup file for "thisisat.est"
  170. then becomes "thisisat.es~".  The 'shortname' option is not available,
  171. because it would always be set.
  172.  
  173. ==============================================================================
  174. 7. Memory usage and limitations            *msdos-limitations*
  175.  
  176. A swap file is used to store most of the text.  You should be able to edit
  177. very large files.  However, memory is used for undo and other things.  If you
  178. delete a lot of text, you can still run out of memory in the Dos16 version.
  179.  
  180. If Vim gives an "Out of memory" warning, you should stop editing.  The result
  181. of further editing actions is unpredictable.  Setting 'undolevels' to 0 saves
  182. some memory.  Running the maze macros on a big maze is guaranteed to run out
  183. of memory, because each change is remembered for undo.  In this case set
  184. 'undolevels' to a negative number.  This will switch off undo completely.
  185.  
  186. In the Dos32 version, extended memory is used to avoid these problems.
  187.  
  188. In the Dos16 version the line length is limited to about 32000 characters.
  189. When reading a file the lines are automatically split.  But editing a line
  190. in such a way that it becomes too long may give unexpected results.
  191.  
  192. ==============================================================================
  193. 8. Symbolically linked files            *msdos-linked-files*
  194.  
  195. When using Vim to edit a symbolically linked file on a unix NFS file server,
  196. you may run into problems.
  197. When writing the file, Vim does not "write through" the symlink.  Instead, it
  198. deletes the symbolic link and creates a new file in its place.
  199.    On Unix, Vim is prepared for links (symbolic or hard).  A backup copy of
  200. the original file is made and then the original file is overwritten.  This
  201. assures that all properties of the file remain the same.  On non-Unix systems,
  202. the original file is renamed and a new file is written.  Only the protection
  203. bits are set like the original file.  However, this doesn't work properly when
  204. working on an NFS-mounted file system where links and other things exist.  The
  205. only way to fix this in the current version is not making a backup file, by
  206. ":set nobackup nowritebackup"    |'writebackup'|
  207.  
  208. ==============================================================================
  209. 9. Copy/paste in a dos box            *msdos-copy-paste*
  210.  
  211. (posted to comp.editors by John Velman <velman@igate1.hac.com>)
  212.  
  213. How to copy/paste text from/to vim in a dos box:
  214.  
  215. 1) to get VIM to run in a window, instead of full screen, press alt+enter.
  216.    This toggles back and forth between full screen and a dos window.
  217.    NOTE: In Windows 95 you must have the property "Fast Pasting" unchecked!
  218.    In the properties dialog box for the MS-DOS window, go to "MS-DOS
  219.    Prompt/Misc/Fast pasting" and make sure that it is NOT checked.
  220.    To make this permanent, change the properties for
  221.    "\windows\system\conagent.exe" (from Philip Nelson, unverified).
  222.  
  223. 2) To paste something _into_ Vim, put Vim in insert mode.
  224.  
  225. 3) put the text you want to paste on the windows clipboard.
  226.  
  227. 4) Click the control box in the upper left of the Vim window. (This looks
  228.    like a big minus sign). If you don't want to use the mouse, you can get
  229.    this with alt+spacebar.
  230. 5) on the resulting dropdown menu choose "Edit"
  231. 6) on the child dropdown menu choose "Paste"
  232.  
  233. To copy something from the Vim window to the clipboard,
  234.  
  235. 1) select the control box to get the control drop down menu.
  236. 2) select "Edit".
  237. 3) select "Mark"
  238. 4) using either the the keys or the mouse, select the part of the Vim window
  239.    that you want to copy. To use the keys, use the arrow keys, and hold down
  240.    shift to extend the selection.
  241. 5) when you've completed your selection, press 'enter.' The selection
  242.    is now in the windows clipboard. By the way, this can be any
  243.    rectangular selection, for example columns 4-25 in rows 7-10. It can
  244.    include anything in the VIM window: the output of a :!dir, for
  245.    example.
  246.  
  247.  vim:ts=8:sw=8:tw=78:
  248.