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

  1. *os_os2.txt*    For Vim version 5.3.  Last modification: 1998 Apr 13
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Paul Slootman
  5.  
  6.  
  7. This file contains the particularities for the OS/2 version of Vim.
  8.  
  9. At present there is no native PM version of the GUI version of vim: The OS/2
  10. version is a console application.  However, there is now a Win32s-compatible
  11. GUI version, which should be usable by owners of Warp 4 (which supports
  12. Win32s) in a Win-OS/2 session.  The notes in this file refer to the native
  13. console version.
  14.  
  15.  
  16. NOTE
  17.  
  18. This OS/2 port works well for me and a couple of other OS/2 users; however,
  19. since I haven't had much feedback, that either means no (OS/2-specific) bugs
  20. exist (besides the ones mentioned below), or no one has yet created a
  21. situation in which any bugs are apparent.  Report any problems or other
  22. comments to <paul@murphy.nl> or <paulS@toecompst.nl>.  File I/O in Dos and
  23. Unix mode, binary mode, and FAT handling all seem to work well, which would
  24. seem to be the most likely places for trouble.
  25.  
  26. A known problem is that files opened by Vim are inherited by other programs
  27. that are started via a shell escape from within Vim.  This specifically means
  28. that Vim won't be able to remove the swap file(s) associated with buffers open
  29. at the time the other program was started, until the other program is stopped.
  30. At that time, the swap file may be removed, but if Vim could not do that the
  31. first time, it won't be removed at all. You'll get warnings that some other
  32. Vim session may be editing the file when you start Vim up again on that file.
  33. This can be reproduced with ":!start epm". Now quit Vim, and start Vim again
  34. with the file that was in the buffer at the time epm was started.  I'm working
  35. on this!
  36.  
  37. A second problem is that Vim doesn't understand the situation when using it
  38. when accessing the OS/2 system via the network, e.g. using telnet from a Unix
  39. system, and then starting Vim. The problem seems to be that OS/2 =sometimes=
  40. recognizes function / cursor keys, and tries to convert those to the
  41. corresponding OS/2 codes generated by the "normal" PC keyboard. I've been
  42. testing a workaround (mapping the OS/2 codes to the correct functions), but so
  43. far I can't say anything conclusive (this is on Warp 3, by the way). In the
  44. meantime any help will be appreciated.
  45.  
  46.  
  47. PREREQUISITES
  48.  
  49. To run Vim, you need the emx runtime environment (at least rev. 0.9b).  This
  50. is generally available as (ask Archie about it):
  51.  
  52.     emxrt.zip     emx runtime package
  53.  
  54. I've included a copy of emx.dll, which should be copied to one of the
  55. directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is
  56. not (read COPYING.EMX to find out what that means to you).
  57.  
  58. This emx.dll is from the emxfix04.zip package, which unfortunately has a bug,
  59. eh, I mean a POSIX feature, in select().  Versions of Vim before 3.27 will
  60. appear to hang when starting (actually, while processing vimrc). Hit return a
  61. couple of times until Vim starts working if this happens.  Next, get an up to
  62. date version of Vim!
  63.  
  64.  
  65. HELP AND VIMRC FILE
  66.  
  67. The VIM environment variable is used to find the location of the help files
  68. and the system .vimrc. Place an entry such as this in CONFIG.SYS:
  69.  
  70. > SET VIM=c:/local/lib/vim
  71.  
  72. and copy all the vim_*.txt files and .vimrc to that directory. Vim will then
  73. be able to find them.
  74.  
  75. Note: .vimrc may also be called _vimrc to accommodate those who have chosen to
  76. install OS/2 on a FAT file system. Vim first tries to find .vimrc and if that
  77. fails, looks for _vimrc in the same place.  The existance of a .vimrc or
  78. _vimrc file influences the 'compatible' options, which can have unexpeced side
  79. effects.  See |'compatible'|.
  80.  
  81. If you're using network drives with OS/2, then you can install Vim on a
  82. network drive (including .vimrc; this is then called the "system" vimrc file),
  83. and then use a personal copy of .vimrc (the "user" vimrc file). This should be
  84. located in a directory indicated by the HOME environment variable.
  85.  
  86.  
  87. ENVIRONMENT VARIABLES IN FILE NAMES
  88.  
  89. This HOME environment variable is also used when using ~ in file names, so
  90. ":e ~/textfile" will edit the file "textfile" in the directory referred to by
  91. HOME.  Additionally you can use other environment variables in file names, as
  92. as ":n $SRC/*.c".
  93.  
  94. The HOME environment variable is also used to locate the .viminfo file
  95. (see |viminfo-file|).  There is no support yet for .viminfo on FAT file
  96. systems yet, sorry.  You could try the -i startup flag (as in "vim -i
  97. $HOME/_viminfo") however.
  98.  
  99. If the HOME environment variable is not set, the value "C:/" is used as a
  100. default.
  101.  
  102.  
  103. BACKSLASHES
  104.  
  105. Using slashes ('/') and backslashes ('\') can be a bit of a problem (see
  106. |dos-backslash| for more explanation), but in almost all cases Vim does "The
  107. Right Thing".  Vim itself uses backslashes in file names, but will happily
  108. accept forward slashes if they are entered (in fact, sometimes that works
  109. better!).
  110.  
  111.  
  112. TEMP FILES
  113.  
  114. Temporary files (for filtering) are put in the first directory in the next
  115. list that exists and where a file can be created:
  116.     $TMP
  117.     $TEMP
  118.     C:\TMP
  119.     C:\TEMP
  120.     current directory
  121.  
  122.  
  123. TERMINAL SETTING
  124.  
  125.                             *os2ansi*
  126. Use "os2ansi" as the TERM environment variable (or don't set it at all, as the
  127. default is the correct value). You can set term to os2ansi in the .vimrc, in
  128. case you need TERM to be a different value for other applications.  The
  129. problem is that OS/2 ANSI emulation is quite limited (it doesn't have insert /
  130. delete line, for example).
  131.  
  132. If you want to use a different value for TERM (because of other programs, for
  133. example), make sure that the termcap entry for that TERM value has the
  134. appropriate key mappings. The termcap.dat distributed with emx does not always
  135. have them.  Here are some suitable values to add to the termcap entry of your
  136. choice; these allow the cursor keys and the named function keys (such as
  137. pagedown) to work.
  138.  
  139.     :ku=\316H:kd=\316P:kl=\316K:kr=\316M:%i=\316t:#4=\316s:\
  140.     :kD=\316S:kI=\316R:kN=\316Q:kP=\316I:kh=\316G:@7=\316O:\
  141.     :k1=\316;:k2=\316<:k3=\316=:k4=\316>:k5=\316?:k6=\316@:\
  142.     :k7=\316A:k8=\316B:k9=\316C:k;=\316D:
  143.  
  144.  
  145. Paul Slootman
  146.  
  147.  vim:ts=8:sw=8:tw=78:
  148.