*os_vms.txt*   For Vim version 5.4n.  Last change: 1999 Jun 10


		  VIM REFERENCE MANUAL    by Bruce Hunsaker and Sandor Kopanyi


							*VMS*
This file contains the particularities for the VMS version of Vim.

Here is some information about building VIM 5.3 for VMS.
My experience is on DEC Alpha's running VMS 7.1.

1) You will need VMS version of unzip to unpack the
   distribution.  Trying to copy an already unpacked source tree
   to VMS did not work well for me (via FTP).  Binaries for these
   2 utilities are readily available on the WWW.

2) You will need either the DECSET mms utility or the freely available
   clone of it called mmk.  (VMS has no make utility in the standard
   distribution.)  I found a binary of 'mmk' which worked well.

3) I suggest unpacking the distribution to the location that will be
   used at run-time.  This will avoid problems trying to decide
   what to move to the final 'install' directory, since there is no
   'install' target in the makefile.

3) Once unpacked, change to the vim/src directory and do:
		mmk/descrip=os_vms_x.mms
   This builds a version of VIM with Terminal and X-windows support.

   To build just a character mode VIM do:
		mmk/descrip=os_vms.mms
   (or use 'mms' instead of 'mmk' if you have it)

4) Copy the executable (vim.exe) to a common location. (I set up
   a [usr.bin] directory for this.

5) To run, I added the following lines in my LOGIN.COM:

		$ vi*m :== $lib_disk:[usr.bin]vim.exe
		$ define tmp tmp_disk:[tmp]
		$ define vim "/lib_disk/usr/lib/vim-5_1/"
		$ define vim_hlp lib_disk:[usr.lib.vim-5_1.doc]

	Your names for devices and directories will need to be changed
	to match your system.

	After the setup is complete I run VIM with either 'vi' or 'vi -g'.
	Note: 'vi -g' will not start in the background.  In order to do
	      that I have to resort to: 'pipe vi -g &' WARNING, this
		  breaks ':sh', but you can do ':!create/term/detach' to
		  spawn a sub-shell.

6) Create .vimrc and .gvimrc files in your home directory.  I suggest
   copying the supplied example files in the distribution, and using
   them as a starting point.

7) There are backspace/delete key inconsistencies with VMS.
	:fixdel dosen't do the trick. I had to add:

		" for terminal mode
		inoremap ^? ^H

		" for gui mode
		inoremap <Del> ^H
For compiling Vim on alpha running VMS, just invoke
	mms /descrip=os_vms.mms

I've worked (and compiled) only the console version, not the GUI. It's OK.
The arrow keys didn't work, I've mapped them:
	:map <^V + Left-arrow> <Left>
and so on.

Bruce Hunsaker

Some and changes from Sandor Kopanyi:

- Use $VIM_DOC instead of $VIM/doc to specify where the documentation is
  (because VMS doesn't handles "/" in the file name).

- In fileio.c there was a VMS specific section regarding creation of temporary
  files ("mktemp not working..." etc., "use tempnam() instead...").  Well,
  tempnam didn't work (for me, at least), mktemp seems to work, so I removed
  that section.  It is still possible to use the "original" version, defining
  VMS_TEMPNAM; then tempnam() will be used (if only VMS is defined, then
  mktemp() will be compiled).

And a problem (nothing is perfect :-): I run ViM in an X-emulator; when I
paste a lot of long rows (more than ~7 rows), Vim becomes "confused", and only
some parts of the rows appears, but even that ones "mixed". There is no
problem with short rows (less then ~25 chars).

 vim:ts=8:sw=8:tw=78:
