summaryrefslogtreecommitdiff
path: root/usr.bin/vim/doc/vim_os2.txt
blob: 6a6c11226b939021034554221444efc64dcb8b40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
*vim_os2.txt*   For Vim version 4.4.  Last modification: 1996 July 20

This file contains the particularities for the OS/2 version of Vim.


NOTE

This OS/2 port works well for me and a couple of other OS/2 users; however,
since I haven't had much feedback, that either means no (OS/2-specific) bugs
exist (besides the one mentioned below), or no one has yet created a situation
in which any bugs are apparent.  Report any problems or other comments to
paul@wau.mis.ah.nl (email valid up to at least September 1996, after that try
paul@wurtel.hobby.nl, paul@murphy.nl, or paulS@toecompst.nl).
Textmode/notextmode, binary mode, and FAT handling all seem to work well,
which would seem to be the most likely places for trouble.

A known problem is that files opened by Vim are inherited by other programs
that are started via a shell escape from within Vim.  This specifically means
that Vim won't be able to remove the swap file(s) associated with buffers open
at the time the other program was started, until the other program is stopped.
At that time, the swap file may be removed, but if Vim could not do that the
first time, it won't be removed at all. You'll get warnings that some other
Vim session may be editing the file when you start Vim up again on that file.
This can be reproduced with ":!start epm". Now quit Vim, and start Vim again
with the file that was in the buffer at the time epm was started.  I'm working
on this!


PREREQUISITES

To run Vim, you need the emx runtime environment (at least rev. 0.9b).  This
is generally available as (ask Archie about it):

    emxrt.zip     emx runtime package

I've included a copy of emx.dll, which should be copied to one of the
directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is
not (read COPYING.EMX to find out what that means to you).

This emx.dll is from the emxfix04.zip package, which unfortunately has a bug
in select().  Versions of Vim before 3.27 will appear to hang when starting
(actually, while processing vimrc). Hit return a couple of times until Vim
starts working if this happens.  Next, get an up to date version of Vim!


HELP AND VIMRC FILE

The VIM environment variable is used to find the location of the help files
and the system .vimrc. Place an entry such as this in CONFIG.SYS:

SET VIM=c:/local/lib/vim

and copy all the vim_*.txt files and .vimrc to that directory. Vim will then
be able to find them.

Note: .vimrc may also be called _vimrc to accommodate those who have chosen to
install OS/2 on a FAT file system. Vim first tries to find .vimrc and if that
fails, looks for _vimrc in the same place.

If you're using network drives with OS/2, then you can install Vim on a
network drive (including .vimrc; this is then called the "system" vimrc file),
and then use a personal copy of .vimrc (the "user" vimrc file). This should be
located in a directory indicated by the HOME environment variable.


ENVIRONMENT VARIABLES IN FILE NAMES

This HOME environment variable is also used when using ~ in file names, so
":e ~/textfile" will edit the file "textfile" in the directory referred to by
HOME.  Additionally you can use other environment variables in file names, as
as ":n $SRC/*.c".

The HOME environment variable is also used to locate the .viminfo file
(see |viminfo_file|).  There is no support yet for .viminfo on FAT file
systems yet, sorry.  You could try the -i startup flag (as in "vim -i
$HOME/_viminfo") however.

If the HOME environment variable is not set, the value "C:/" is used as a
default.


BACKSLASHES

Using slashes ('/') and backslashes ('\') can be a bit of a problem (see
vim_dos.txt for more explanation), but in almost all cases Vim does "The Right
Thing".  Vim itself uses backslashes in file names, but will happily accept
forward slashes if they are entered (in fact, often that works better!).


TEMP FILES

Temporary files (for filtering) are put in the first directory in the next
list that exists and where a file can be created:
	$TMP
	$TEMP
	C:\TMP
	C:\TEMP
	current directory


TERMINAL SETTING

Use "os2ansi" as the TERM environment variable (or don't set it at all, as the
default is the correct value). You can set term to os2ansi in the .vimrc, in
case you need TERM to be a different value for other applications.  The
problem is that OS/2 ANSI emulation is quite limited (it doesn't have insert /
delete line, for example).

If you want to use a different value for TERM (because of other programs, for
example), make sure that the termcap entry for that TERM value has the
appropriate key mappings. The termcap.dat distributed with emx does not always
have them.  Here are some suitable values to add to the termcap entry of your
choice; these allow the cursor keys and the named function keys (such as
pagedown) to work.

	:ku=\316H:kd=\316P:kl=\316K:kr=\316M:%i=\316t:#4=\316s:\
	:kD=\316S:kI=\316R:kN=\316Q:kP=\316I:kh=\316G:@7=\316O:\
	:k1=\316;:k2=\316<:k3=\316=:k4=\316>:k5=\316?:k6=\316@:\
	:k7=\316A:k8=\316B:k9=\316C:k;=\316D:


Paul Slootman

vim:ts=8:tw=78: