1 *os_vms.txt* For Vim version 5.8 Last change: 2001 May 18
8 This file contains the particularities for the VMS version of Vim.
9 You can reach this information file by typing :help VMS in Vim command
12 1. Getting started |vms-started|
13 2. Download files |vms-download|
14 3. Compiling |vms-compiling|
15 4. Problems |vms-problems|
16 5. Deploy |vms-deploy|
17 6. Practical usage |vms-usage|
18 7. GUI mode questions |vms-gui|
19 8. Useful notes |vms-notes|
20 9. Changes |vms-changes|
21 10. Authors |vms-authors|
23 ==============================================================================
25 1. Getting started *vms-started*
27 Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every
28 operating system known to humanity. Now use Vim on OpenVMS too, in character
29 or X/Motif environment. It is fully featured and absolutely compatible with
30 Vim on other operating systems.
32 ==============================================================================
34 2. Download files *vms-download*
36 You can download the Vim source code by ftp from the official Vim site:
37 ftp://ftp.vim.org/pub/vim/
38 Or use one of the mirrors:
39 ftp://ftp.vim.org/pub/vim/MIRRORS
41 You will need both the Unix and Extra archives to build vim.exe for VMS.
42 For using Vim's full power you will need the runtime files as well.
44 You can download precompiled executables from:
45 http://www.polarfox.com/vim/
47 ==============================================================================
49 3. Compiling *vms-compiling*
51 Unpack the Unix and Extra archives together into one directory. In the <.SRC>
52 subdirectory you should find the make file OS_VMS.MMS. By editing this file
53 you may choose between building the character, GUI and debug version. There
54 are also additional options for Perl, Python and Tcl support.
56 You will need either the DECSET mms utility or the freely available clone of
57 it called mmk (VMS has no make utility in the standard distribution). You can
58 download mmk from http://www.openvms.digital.com/freeware/MMK/
60 If you have MSS on your system, the command
62 > mms /descrip=os_vms.mms
64 will start building your own customised version of Vim.
65 The adequate command for mmk is:
67 > mmk /descrip=os_vms.mms
69 ==============================================================================
71 4. Problems *vms-problems*
73 The code has been tested under Open VMS 6.2 - 7.1 on Alpha and VAX platforms
74 with the DECC compiler. It should work without bigger problems.
75 If it happened that your system does not have some include libraries you can
76 tune up in OS_VMS_CONF.H or GUI_VMS_CONF.H files.
78 If you decided to build Vim with +perl, +python, etc. options, first you need
79 to download OpenVMS distributions of Perl and Python. Build and deploy the
80 libraries and change adequate lines in OS_VMS.MMS file. There should not be
81 problem from Vim side.
83 Note: Under VAX it should work with DEC C compiler without problem, but the
84 code is not compilable with the old VAX C compiler.
86 MMS_VIM.EXE is building together with VIM.EXE, but for CTAGS.EXE and XXD.EXE
87 you should change to subdirectory <.CTAGS> or <.XXD> and build them
88 separately. You have to be prepared that the CTAGS and XXD make files are not
91 Advanced users may try some acrobatics in FEATURE.H file also.
93 It is possible to compile with +xfontset +xim options too, but then you have
94 to set up GUI fonts etc. correctly. See. :help xim from Vim command prompt.
96 ==============================================================================
98 5. Deploy *vms-deploy*
100 Vim uses a special directory structure to hold the document and runtime files:
110 vimrc (system rc files)
115 > define/nolog device:[leading-path-here.vim] vim
116 > define/nolog device:[leading-path-here.vim.vim56] vimruntime
117 > define/nolog device:[leading-path-here.tmp] tmp
119 to get vim.exe to find its document, filetype, and syntax files, and to
120 specify a directory where temporary files will be located. Copy the "runtime"
121 subdirectory of the vim distribution to vimruntime.
123 Note: Logicals $VIMRUNTIME and $TMP are optional. Read more at :help runtime
125 ==============================================================================
127 6. Practical usage *vms-usage*
129 Usually you want to run just one version of Vim on your system, therefore
130 it is enough to dedicate one directory for Vim.
131 Copy all Vim runtime directory structure to the deployment position.
132 Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
133 Set up logical $VIM as:
135 > $ define VIM device:<path>
139 > $ ! vi starts Vim in chr. mode.
140 > $ vi*m :== mcr device:<path>VIM.EXE
142 > $ !gvi starts Vim in GUI mode.
143 > $ gv*im :== spawn/nowait mcr device:<path>VIM.EXE -g
145 Create .vimrc and .gvimrc files in your home directory (SYS$LOGIN).
147 The easiest way is just rename example files. You may leave the menu file
148 (MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
149 be default setup for all users, and for users is enough just to have their
150 own additions or resetting in home directory in files .vimrc and .gvimrc.
151 It should work without problems.
153 Note: Remember, system rc files (default for all users) does not have leading
154 "." So, system rc files are:
160 and user's customised rc files are:
165 You can check that everything is on the right place with the :version command.
169 > $ define/nolog VIM RF10:[UTIL.VIM]
170 > $ vi*m :== mcr VIM:VIM.EXE
171 > $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
172 > $ set disp/create/node=192.168.5.223/trans=tcpip
174 Note: This set-up should be enough, if you are working on standalone server or
175 clustered environment, but if you want to use Vim as internode editor, it
176 will satiate you as well. You just have to define the "whole" path:
178 > $ define VIM "<server_name>[""user password""]::device:<path>"
179 > $ vi*m :== "mcr VIM:VIM.EXE"
183 > $ define VIM "PLUTO::RF10:[UTIL.VIM]"
184 > $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
186 You can also use $VIMRUNTIME logical to point to proper version of Vim if you
187 have installed more versions in the same time. If $VIMRUNTIME is not defined
188 Vim will borrow value from $VIM logical. You can find more information about
189 $VIMRUNTIME logical by typing :help runtime as a Vim command.
191 ==============================================================================
193 7. GUI mode questions *vms-gui*
195 VMS is not a native X window environment, so you can not start Vim in GUI mode
196 "just like that". But anyhow it is not too complicate to get a running Vim.
198 1) If you are working on the VMS X console:
199 Start Vim with the command:
201 > $ mc device:<path>VIM.EXE -g
203 or type :gui as a command to the Vim command prompt. For more info :help gui
205 2) If you are working on other X window environment as Unix or some remote X
206 VMS console. Set up display to your host with:
208 > $ set disp/create/node=<your IP address>/trans=<transport-name>
210 and start Vim as in point 1. You can find more help in VMS documentation or
211 type: help set disp in VMS prompt.
214 > $ set disp/create/node=192.168.5.159 ! default trans is DECnet
215 > $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
216 > $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
218 Note: you should define just one of these.
219 For more information type $help set disp in VMS prompt.
221 3) If you are working on MS Windows or other non X window environment
222 You need to set up one X server and run Vim as in point 2.
223 For MS Windows there are available free X servers as MIX , Omni X etc.
225 ==============================================================================
227 8. Useful notes *vms-notes*
229 8.1 backspace/delete.
231 There are backspace/delete key inconsistencies with VMS.
232 :fixdel doesn't do the trick, but the solution is:
234 > inoremap ^? ^H " for terminal mode
235 > inoremap <Del> ^H " for gui mode
237 Read more in ch: 8.6 (Terminal problems).
238 (Bruce Hunsaker <BNHunsaker@chq.byu.edu> Vim 5.3)
242 Vim supports filters; ie. if you have a sort program that can handle
243 input/output redirection like Unix (<infile >outfile), you could use
245 > map \s 0!'aqsort<CR>
247 (Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> Vim 5.4)
249 8.3 VMS file version numbers.
251 Vim is saving files into a new file with the next higher file version
252 number, try these settings.
254 > set nobackup " does not create *.*_ backup files
255 > set nowritebackup " does not have any purpose on VMS. It's default.
257 Recovery is working perfect as well from the default swap file.
258 Read more with :help swapfile
260 (Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
263 8.4 Directory conversion.
265 Vim will internally convert any unix-style paths and even mixed unix/VMS
266 paths into VMS style paths. Some typical conversions resemble:
268 /abc/def/ghi -> abc:[def]ghi.
269 /abc/def/ghi.j -> abc:[def]ghi.j
270 /abc/def/ghi.j;2 -> abc:[def]ghi.j;2
271 /abc/def/ghi/jkl/mno -> abc:[def.ghi.jkl]mno.
272 abc:[def.ghi]jkl/mno -> abc:[def.ghi.jkl]mno.
273 ./ -> current directoty
274 ../ -> relative parent directory
275 [.def.ghi] -> relative child directory
276 ./def/ghi -> relative child directory
278 Note: You may use <,> brackets as well (device:<path>file.ext;version) as
279 rf10:<user.zay.work>test.c;1
281 (David Elins <delins@foliage.com>, Jerome Lauret
282 <JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
284 8.5 Remote host invocation
286 It is possible to use Vim as an internode editor.
287 1. Edit some file from remote node:
289 > vi "<server>""username passwd""::<device>:<path><filename>;<version>"
292 > vi "pluto""zay passwd""::RF10:<USER.ZAY.WORK>TEST.C;1"
294 Note: syntax is very important, otherwise VMS will recognise more parameters
295 instead of one (resulting with: file not found)
297 2. Set up Vim as your internode editor. If Vim is not installed on your host,
298 just set up your IP address, full Vim path including the server name and run
299 the command procedure below:
301 > $ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
302 > $ set disp/create/node=<your_IP_here>/trans=tcpip
303 > $ define "VIM "<vim_server>""''p1' ''p2'""::<device>:<vim_path>"
304 > $ vi*m :== "mcr VIM:VIM.EXE"
305 > $ gv*im :== "spawn/nowait mcr VIM:VIM.EXE -g"
308 > $ write sys$output " Please enter username and password as a parameter."
309 > $ write sys$output " Example: @SETVIM.COM username passwd"
312 Note: Never use it in clustered environment (you do not need it), and load could
313 be very-very slow, but even faster then a local Emacs. :-)
315 8.6 Terminal problems
317 If your terminal name is not known to Vim and it is trying to find the default
318 one you will get the following message during start-up:
320 Terminal entry not found in termcap
321 'unknown-terminal' not known. Available built-in terminals are:
327 defaulting to 'vt320'
329 The solution is to define default terminal name:
331 > $ ! unknown terminal name. let us use vt320 or ansi instead.
332 > $ ! Note: it's case sensitive
333 > $ define term "vt320"
335 Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
336 keyboard mappings. They should work perfect as they are, including arrows,
337 Ins, Del buttons etc. Except Backspace in GUI mode. To solve it, add to
340 > inoremap <Del> <BS>
342 Vim will also recognise that they are fast terminals.
344 If you have some annoying line jumping on the screen between windows add to
347 > set ttyfast " set fast terminal
349 Note: if you're using Vim on remote host or through very slow connection, it's
350 recommended to avoid fast terminal option with:
355 8.7 Hex-editing and other external tools
357 A very important difference between OpenVMS and other systems is that VMS uses
358 special commands to execute executables:
361 > MCR <path>filename <parameters>
363 OpenVMS users always have to be aware that the Vim command :! "just" drop them
364 to DCL prompt. This feature is possible to use without any problem with all
365 DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
366 we're running into trouble if we following the Vim documentation (see: help
369 Solution: Execute with the MC command and add the full path to the executable.
370 Example: Instead of :%!xxd command use:
375 > :!mc <path>filename <parameters>
377 (Zoltan Arpadffy, <arpadffy@altavista.net> Vim 5.6-70)
379 ==============================================================================
381 9. Changes *vms-changes*
383 Version 5.6 patches 46-70 (2000 May 5)
384 - VMS filename related changes:
385 - version handling (open everything, save to new version)
386 - correct file extension matching for syntax (version problem)
387 - handle <,> characters and passwords in directory definition
388 - handle internode/remote invocation and editing with passwords
389 - OpenVMS files will be treated case insensitive from now
390 - corrected response of expand("%:.") etc path related functions
391 (in one word: VMS directory handling internally)
393 - corrected (+,-) information data
394 - added compiler and OS version
395 - added user and host information
396 - resolving $VIM and $VIMRUNTIME logicals
397 - VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2.
398 - enabled farsi, rightleft etc. features
399 - undo level raised up to 1000
400 - Updated OS_VMS.MMS file.
401 - maximum features ON is default
402 - Vim is compilable with +perl, +python and +tcl features.
403 - improved MMK compatibility
404 - Created MAKEFILE_VMS.MMS, makefile for testing Vim during development.
405 - Defined DEC terminal VT320
406 - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals
407 backwards, but not VT340 and newer with colour capability.
408 - VT320 is default terminal for OpenVMS
409 - these new terminals are also fast ttys (default for OpenVMS).
410 - allowed dec_mouse ttym
411 - Updated files vimrc and gvimrc with VMS specific suggestions.
412 - OS_VMS.TXT updated with new features.
414 Version 5.6 (2000 Jan 17)
415 - Popup menu line crash corrected.
416 - Handle full file names with version numbers.
417 - Directory handling (CD command etc.)
418 - Corrected file name conversion VMS to Unix and v.v.
419 - Correct response of expand wildcards
420 - Recovery is working from this version under VMS as well.
421 - Improved terminal and signal handing.
422 - Improved OS_VMS.TXT
424 Version 5.5 (1999 Dec 3)
425 - Cut & paste mismatch corrected.
426 - Motif directories during open and save are corrected.
428 Version 5.4 (1999 Sep 9)
429 - Minor changes in the code
430 - Standard distribution with +GUI option
432 Version 5.3 (1998 Oct 12)
433 - Syntax and DEC C changes in the code
434 - Fixing problems with the /doc subdirectory
437 Version 5.1 (1998 Apr 21)
439 Version 4.5 (1996 Dec 16)
440 - First VMS port by Henk Elbers <henk@xs4all.nl>
442 ==============================================================================
444 10. Authors *vms-authors*
446 In alphabetical order:
447 Zoltan Arpadffy <arpadffy@altavista.net>
448 Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
449 Bruce Hunsaker <BNHunsaker@chq.byu.edu>
450 Sandor Kopanyi <sandor.kopanyi@altavista.net>