os_msdos.txt - html version
os_msdos.txt - html version
*os_msdos.txt* For Vim version 5.3. Last modification: 1998 Jun 03
VIM REFERENCE MANUAL by Bram Moolenaar
*msdos* *ms-dos*
This file contains the particularities for the MS-DOS version of Vim.
1. Two versions for MS-DOS |msdos-versions|
2. Known problems |msdos-problems|
3. Long file names |msdos-longfname|
4. Termcap codes |msdos-termcap|
5. Shifted arrow keys |msdos-arrows|
6. Filename extensions |msdos-fname-extensions|
7. Memory usage and limitations |msdos-limitations|
8. Symbolically linked files |msdos-linked-files|
9. Copy/paste in a dos box |msdos-copy-paste|
Additionally, there are a number of common Win32 and DOS items:
File locations |dos-locations|
Using backslashes |dos-backslash|
Standard mappings |dos-standard-mappings|
Screen output and colors |dos-colors|
File formats |dos-file-formats|
:cd command |dos-:cd|
Interrupting |dos-CTRL-Break|
Temp files |dos-temp-files|
Shell option default |dos-shell|
For compiling Vim see src/INSTALL.pc. *msdos-compiling*
1. Two versions for MS-DOS *msdos-versions*
There are two versions of Vim that can be used with MS-DOS machines:
*dos16*
Dos16 version Can be used on any MS-DOS system, only uses up to 640 Kbyte of
memory. Also runs on OS/2, Windows 95, and NT. Excludes some
Vim-specific features (autocommands, syntax highlighting,
etc.). Recommended for use on pre-386 machines.
*dos32*
Dos32 version Requires 386 processor and a |DPMI| driver, uses all
available memory. Supports long file names, but NOT on
Windows NT. Recommended for MS-DOS, Windows 3.1 and Windows
95.
There are also two versions that run under Windows:
Win32 version Requires Windows 95 or Windows NT, uses all available
memory, supports long file names, etc. Has some problems on
Windows 95. Recommended for Windows NT. See |os_win32.txt|
Win32 GUI Requirements like the Win32 version, but runs in its own
window, instead of a console. Has scrollbars, menu, etc.
Recommended for Windows 95 and Windows NT. See |gui-w32|.
It is recommended to use the Dos32 or Win32 version. Although the Dos16
version is able to edit very big files, it quickly runs out of memory when
making big changes. Disabling undo helps: ":set ul=-1". The screen updating
of the Dos16 version is the fastest of the three on DOS or Windows 95; on
Windows NT, the Win32 version is just as fast.
*DPMI*
For the Dos32 version, you may need a DPMI driver when running in MS-DOS. If
you are running Windows or installed a clever memory manager, it will probably
work already. If you get the message "No DPMI", you need to install a DPMI
driver. Such a driver is included with the executable in CSDPMI4B.ZIP. Run
"cwsdpmi" just before starting Vim each time. Or you might want to include
"cwsdpmi -p" in your autoexec.bat to make it resident. The latest version of
"CSDPMI*.ZIP" can be obtained from: "ftp.neosoft.com:pub/users/s/sandmann".
The 16 bit DOS version has been compiled with minimal functions. These are
missing:
|+autocmd| autocommands
|+cindent| 'cindent'
|+digraphs| digraph support
|+eval| expression evaluation, including ":if", ":while", ":let"
|+ex_extra| Ex commands ":retab", ":right", ":left", ":center", ":normal"
|+file_in_path| searching for a file in 'path': "gf", <cfile>
|+find_in_path| commands that search in included files, such as "[I",
":ilist", ":checkpath"
|+insert_expand| Insert mode expansion, such as CTRL-N, CTRL-X CTRL-F
|+lispindent| 'lispindent'
|+quickfix| Quickfix commands ":make", ":cnext", "-q" command-line option
|+showcmd| 'showcmd' option
|+smartindent| 'smartindent'
|+syntax| syntax highlighting
|+textobjects| text objects, such as "as", "iw"
You can include (some of) these by editing feature.h and recompiling.
2. Known problems *msdos-problems*
- When using smartdrive (MS-DOS 6.x) with write-behind caching, it is possible
that Vim will try to create a swap file on a read-only file system (e.g.
write protected floppy). You will then be given the message
"A serious disk error has occurred .., Retry (r)? " There is nothing
you can do but unprotect the floppy or switch off the computer. Even
CTRL-ALT-DEL will not get you out of this. This is really a problem of
smartdrive, not Vim. Smartdrive works fine otherwise. If this bothers you,
don't use the write-behind caching.
- Vim can't read swap files that have been opened already, unless the "share"
command has been used. If you see stray warnings for existing swap files,
include the "share" command in your config.sys or autoexec.bat (see your
MSDOS documentation).
- The Dos16 version can only have about 10 files open (in a window or hidden)
at one time. With more files you will get error messages when trying to
read or write a file, and for filter commands. Or Vim runs out of memory,
and random problems may result.
- The Dos32 version cannot have an unlimited number of files open at any one
time. The limit depends on the setting of FILES in your CONFIG.SYS. This
defaults to 15; if you need to edit a lot of files, you should increase
this. If you do not set FILES high enough, you can get strange errors, and
shell commands may cause a crash!
- The Dos32 version can work with long file names. When doing file name
completion, matches for the short file name will also be found. But this
will result in the corresponding long file name. For example, if you have
the long file name "this_is_a_test" with the short file name "this_i~1", the
command ":e *1" will start editing "this_is_a_test".
- When using the Dos32 version and you run into problems with DPMI support,
check if there is a program in your config.sys that eats resources. One
program known to cause this problem is "netx", which says "NetWare v. 3.26
Workstation shell". Replace it with version 3.32 to fix the problem.
3. Long file names *msdos-longfname*
If the Dos32 version is run on Windows 95, it can use long file names. It
will work by default. If you want to disable this, use this setting:
set LFN=N
You can put this in your autoexec.bat file.
Note: If you have installed DJGPP on your machine, you probably have a
"djgpp.env" file, which contains "LFN=n". You need to use "LFN=Y" to switch
on using long file names then.
4. Termcap codes *msdos-termcap*
If you want to use another output method (e.g., when using a terminal on a COM
port), set the terminal name to "pcansi". You can change the termcap options
when needed (see |terminal-options|). Note that the
normal IBM ansi.sys does not support all the codes of the builtin pcansi
terminal. If you use ansi.sys, you will need to delete the termcap entries
t_al and t_dl with
:set t_al= t_dl=
Otherwise, the screen will not be updated correctly. It is better to use
nansi.sys, nnansi.sys, or the like instead of ansi.sys.
If you want to use Vim on a terminal connected to a COM: port, reset the
'bioskey' option. Otherwise the commands will be read from the PC keyboard.
CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
5. Shifted arrow keys *msdos-arrows*
Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and
SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or
CTRL.
6. Filename extensions *msdos-fname-extensions*
MS-DOS allows for only one file name extension. Therefore, when appending an
extension, the '.' in the original file name is replaced with a '_', the name
is truncated to 8 characters, and the new extension (e.g., ".swp") is
appended. Two examples: "test.c" becomes "test_c.bak", "thisisat.est"
becomes "thisisat.bak". To reduce these problems, the default for
'backupext' is "~" instead of ".bak". The backup file for "thisisat.est"
then becomes "thisisat.es~". The 'shortname' option is not available,
because it would always be set.
7. Memory usage and limitations *msdos-limitations*
A swap file is used to store most of the text. You should be able to edit
very large files. However, memory is used for undo and other things. If you
delete a lot of text, you can still run out of memory in the Dos16 version.
If Vim gives an "Out of memory" warning, you should stop editing. The result
of further editing actions is unpredictable. Setting 'undolevels' to 0 saves
some memory. Running the maze macros on a big maze is guaranteed to run out
of memory, because each change is remembered for undo. In this case set
'undolevels' to a negative number. This will switch off undo completely.
In the Dos32 version, extended memory is used to avoid these problems.
In the Dos16 version the line length is limited to about 32000 characters.
When reading a file the lines are automatically split. But editing a line
in such a way that it becomes too long may give unexpected results.
8. Symbolically linked files *msdos-linked-files*
When using Vim to edit a symbolically linked file on a unix NFS file server,
you may run into problems.
When writing the file, Vim does not "write through" the symlink. Instead, it
deletes the symbolic link and creates a new file in its place.
On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
the original file is made and then the original file is overwritten. This
assures that all properties of the file remain the same. On non-Unix systems,
the original file is renamed and a new file is written. Only the protection
bits are set like the original file. However, this doesn't work properly when
working on an NFS-mounted file system where links and other things exist. The
only way to fix this in the current version is not making a backup file, by
":set nobackup nowritebackup" |'writebackup'|
9. Copy/paste in a dos box *msdos-copy-paste*
(posted to comp.editors by John Velman <velman@igate1.hac.com>)
How to copy/paste text from/to vim in a dos box:
1) to get VIM to run in a window, instead of full screen, press alt+enter.
This toggles back and forth between full screen and a dos window.
NOTE: In Windows 95 you must have the property "Fast Pasting" unchecked!
In the properties dialog box for the MS-DOS window, go to "MS-DOS
Prompt/Misc/Fast pasting" and make sure that it is NOT checked.
To make this permanent, change the properties for
"\windows\system\conagent.exe" (from Philip Nelson, unverified).
2) To paste something _into_ Vim, put Vim in insert mode.
3) put the text you want to paste on the windows clipboard.
4) Click the control box in the upper left of the Vim window. (This looks
like a big minus sign). If you don't want to use the mouse, you can get
this with alt+spacebar.
5) on the resulting dropdown menu choose "Edit"
6) on the child dropdown menu choose "Paste"
To copy something from the Vim window to the clipboard,
1) select the control box to get the control drop down menu.
2) select "Edit".
3) select "Mark"
4) using either the the keys or the mouse, select the part of the Vim window
that you want to copy. To use the keys, use the arrow keys, and hold down
shift to extend the selection.
5) when you've completed your selection, press 'enter.' The selection
is now in the windows clipboard. By the way, this can be any
rectangular selection, for example columns 4-25 in rows 7-10. It can
include anything in the VIM window: the output of a :!dir, for
example.
top - back to help