blob: a31ac154163832f74f0cd9f4e7b3c1a04ac61d90 [file] [log] [blame]
Bram Moolenaarfff2bee2010-05-15 13:56:02 +02001*os_vms.txt* For Vim version 7.3a. Last change: 2009 Oct 28
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL
5
6
7 *VMS* *vms*
8This file contains the particularities for the VMS version of Vim.
9You can reach this information file by typing :help VMS in Vim command
10prompt.
11
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. VMS related changes |vms-changes|
2110. Authors |vms-authors|
22
23==============================================================================
24
251. Getting started *vms-started*
26
27Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every
28operating system known to humanity. Now use Vim on OpenVMS too, in character
29or X/Motif environment. It is fully featured and absolutely compatible with
30Vim on other operating systems.
31
32==============================================================================
33
342. Download files *vms-download*
35
36You can download the Vim source code by ftp from the official Vim site:
37 ftp://ftp.vim.org/pub/vim/
38Or use one of the mirrors:
39 ftp://ftp.vim.org/pub/vim/MIRRORS
40
41You will need both the Unix and Extra archives to build vim.exe for VMS.
42For using Vim's full power you will need the runtime files as well.
43
44You can download precompiled executables from:
45 http://www.polarhome.com/vim/
46 ftp://ftp.polarhome.com/pub/vim/
47
48To use the precompiled binary version, you need one of these archives:
49
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000050 vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
51 vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
52 vim-XX-exe-ia64-term.zip IA64 console executables
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000053 vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
54 vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000055 vim-XX-exe-axp-term.zip Alpha console executables
Bram Moolenaar071d4272004-06-13 20:20:40 +000056 vim-XX-exe-vax-gui.zip VAX GUI executables
57 vim-XX-exe-vax-term.zip VAX console executables
58
Bram Moolenaarb475fb92006-03-02 22:40:52 +000059and of course (optional)
Bram Moolenaar071d4272004-06-13 20:20:40 +000060 vim-XX-runtime.zip runtime files
61
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000062The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
Bram Moolenaar071d4272004-06-13 20:20:40 +000063
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000064For GTK executables you will need GTKLIB that is available for
Bram Moolenaarb475fb92006-03-02 22:40:52 +000065Alpha and IA64 platform.
66
Bram Moolenaar071d4272004-06-13 20:20:40 +000067==============================================================================
68
693. Compiling *vms-compiling*
70
71See the file [.SRC]INSTALLVMS.TXT.
72
73==============================================================================
74
754. Problems *vms-problems*
76
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000077The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
78platforms with the DEC C compiler. It should work without bigger problems.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000079If your system does not have some include libraries you can tune up in
80OS_VMS_CONF.H file.
Bram Moolenaar071d4272004-06-13 20:20:40 +000081
82If you decided to build Vim with +perl, +python, etc. options, first you need
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000083to download OpenVMS distributions of Perl and Python. Build and deploy the
84libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
85a problem from Vim side.
Bram Moolenaar071d4272004-06-13 20:20:40 +000086
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000087Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
88
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000089Note: Under VAX it should work with the DEC C compiler without problems. The
90VAX C compiler is not fully ANSI C compatible in pre-processor directives
91semantics, therefore you have to use a converter program what will do the lion
92part of the job. For detailed instructions read file INSTALLvms.txt
Bram Moolenaar071d4272004-06-13 20:20:40 +000093
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000094MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
Bram Moolenaar071d4272004-06-13 20:20:40 +000095change to subdirectory and build it separately.
96
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000097CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
98specific source might contain CTAGS source files as described above.
Bram Moolenaar071d4272004-06-13 20:20:40 +000099You can find more information about CTAGS on VMS at
100http://www.polarhome.com/ctags/
101
102Advanced users may try some acrobatics in FEATURE.H file also.
103
104It is possible to compile with +xfontset +xim options too, but then you have
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000105to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106
107You may want to use GUI with GTK icons, then you have to download and install
108GTK for OpenVMS or at least runtime shareable images - LIBGTK from
109polarhome.com
110
111For more advanced questions, please send your problem to Vim on VMS mailing
112list <vim-vms@polarhome.com>
113More about the vim-vms list can be found at:
114http://www.polarhome.com/mailman/listinfo/vim-vms
115
116==============================================================================
117
1185. Deploy *vms-deploy*
119
120Vim uses a special directory structure to hold the document and runtime files:
121
122 vim (or wherever)
123 |- tmp
124 |- vim57
125 |----- doc
126 |----- syntax
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000127 |- vim62
Bram Moolenaar071d4272004-06-13 20:20:40 +0000128 |----- doc
129 |----- syntax
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000130 |- vim64
Bram Moolenaar071d4272004-06-13 20:20:40 +0000131 |----- doc
132 |----- syntax
133 vimrc (system rc files)
134 gvimrc
135
136Use: >
137
138 define/nolog VIM device:[path.vim]
139 define/nolog VIMRUNTIME device:[path.vim.vim60]
140 define/nolog TMP device:[path.tmp]
141
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100142To get vim.exe to find its document, filetype, and syntax files, and to
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000143specify a directory where temporary files will be located. Copy the "runtime"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100144subdirectory of the Vim distribution to vimruntime.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000145
146Logicals $VIMRUNTIME and $TMP are optional.
147
148If $VIMRUNTIME is not set, Vim will guess and try to set up automatically.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000149Read more about it at :help runtime
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150
151If $TMP is not set, you will not be able to use some functions as CTAGS,
152XXD, printing etc. that use temporary directory for normal operation.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000153The $TMP directory should be readable and writable by the user(s).
154The easiest way to set up $TMP is to define a logical: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000155
156 define/nolog TMP SYS$SCRATCH
157or as: >
158 define/nolog TMP SYS$LOGIN
159
160==============================================================================
161
1626. Practical usage *vms-usage*
163
164Usually, you want to run just one version of Vim on your system, therefore
165it is enough to dedicate one directory for Vim.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000166Copy the whole Vim runtime directory structure to the deployment position.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000167Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000168Set up the logical $VIM as: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169
170 $ define VIM device:<path>
171
172Set up some symbols: >
173
174 $ ! vi starts Vim in chr. mode.
175 $ vi*m :== mcr VIM:VIM.EXE
176
177 $ !gvi starts Vim in GUI mode.
178 $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
179
180Please, check the notes for customization and configuration of symbols.
181
182You may want to create .vimrc and .gvimrc files in your home directory
183(SYS$LOGIN) to overwrite default settings.
184
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000185The easiest way is just rename example files. You may leave the menu file
186(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
187be default setup for all users, and for users it is enough just to have their
188own additions or resetting in their home directory in files .vimrc and .gvimrc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000189It should work without problems.
190
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000191Note: Remember, system rc files (default for all users) don't have a leading
192".". So, system rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193
194 $VIM:vimrc
195 $VIM:gvimrc
196 $VIM:menu.vim
197
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000198and user customized rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000199
200 sys$login:.vimrc
201 sys$login:.gvimrc
202
203You can check that everything is on the right place with the :version command.
204
205Example LOGIN.COM: >
206
207 $ define/nolog VIM RF10:[UTIL.VIM]
208 $ vi*m :== mcr VIM:VIM.EXE
209 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
210 $ set disp/create/node=192.168.5.223/trans=tcpip
211
212Note: This set-up should be enough, if you are working on standalone server or
213clustered environment, but if you want to use Vim as internode editor in
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000214DECNET environment, it will satisfy as well.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215You just have to define the "whole" path: >
216
217 $ define VIM "<server_name>[""user password""]::device:<path>"
218 $ vi*m :== "mcr VIM:VIM.EXE"
219
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100220As for example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221
222 $ define VIM "PLUTO::RF10:[UTIL.VIM]"
223 $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
224
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000225You can also use the $VIMRUNTIME logical to point to the proper version of Vim
226if you have installed more versions at the same time. If $VIMRUNTIME is not
227defined Vim will borrow its value from the $VIM logical. You can find more
228information about the $VIMRUNTIME logical by typing :help runtime as a Vim
229command.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000230
231System administrators might want to set up a system wide Vim installation,
232then add to the SYS$STARTUP:SYLOGICALS.COM >
233
234 $ define/nolog/sys VIM device:<path>
235 $ define/nolog/sys TMP SYS$SCRATCH
236
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100237And to the SYS$STARTUP:SYLOGIN.COM >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000238
239 $ vi*m :== mcr VIM:VIM.EXE
240 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
241
242
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000243It will set up a normal Vim work environment for every user on the system.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000245IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line
Bram Moolenaard5ab34b2007-05-05 17:15:44 +0000246parameters are assumed to be lowercase. In order to indicate that a command
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000247line parameter is uppercase "/" sign must be used.
248
249Examples:
250 >
251 vim -R filename ! means: -r List swap files and exit
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000252 vim -/r filename ! means: -R Readonly mode (like "view")
253 vim -u <vimrc> ! means: -u Use <vimrc> instead of any .vimrc
254 vim -/u <gvimrc> ! means: -U Use <gvimrc> instead of any .gvimrc
255
Bram Moolenaar071d4272004-06-13 20:20:40 +0000256==============================================================================
257
2587. GUI mode questions *vms-gui*
259
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000260OpenVMS is a real mainframe OS, therefore even if it has a GUI console, most
261of the users do not use a native X/Window environment during normal operation.
262It is not possible to start Vim in GUI mode "just like that". But anyhow it
263is not too complicated either.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000265First of all: you will need an executable that is built with the GUI enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266
267Second: you need to have installed DECW/Motif on your VMS server, otherwise
268you will get errors that some shareable libraries are missing.
269
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000270Third: If you choose to run Vim with extra features such as GUI/GTK then you
271need a GTK installation too or at least a GTK runtime environment (LIBGTK
Bram Moolenaar5eba4c22005-07-12 22:40:29 +0000272can be downloaded from http://www.polarhome.com/vim/).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273
2741) If you are working on the VMS X/Motif console:
275 Start Vim with the command: >
276
277 $ mc device:<path>VIM.EXE -g
278<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000279 or type :gui as a command to the Vim command prompt. For more info :help
280 gui
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00002822) If you are working on some other X/Window environment like Unix or a remote
283 X VMS console. Set up display to your host with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284
285 $ set disp/create/node=<your IP address>/trans=<transport-name>
286<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000287 and start Vim as in point 1. You can find more help in VMS documentation or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000288 type: help set disp in VMS prompt.
289 Examples: >
290
291 $ set disp/create/node=192.168.5.159 ! default trans is DECnet
292 $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
293 $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
294
295Note: you should define just one of these.
296For more information type $help set disp in VMS prompt.
297
2983) Another elegant solution is XDM if you have installed on OpenVMS box.
299 It is possible to work from XDM client as from GUI console.
300
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00003014) If you are working on MS-Windows or some other non X/Window environment
302 you need to set up one X server and run Vim as in point 2.
303 For MS-Windows there are available free X servers as MIX , Omni X etc.,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 as well as excellent commercial products as eXcursion or ReflectionX with
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000305 built-in DEC support.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000306
307Please note, that executables without GUI are slightly faster during startup
308then with enabled GUI in character mode. Therefore, if you do not use GUI
309features, it is worth to choose non GUI executables.
310
311==============================================================================
312
3138. Useful notes *vms-notes*
314
Bram Moolenaarac98e5d2008-09-01 14:51:37 +00003158.1 Backspace/delete
Bram Moolenaar071d4272004-06-13 20:20:40 +00003168.2 Filters
3178.3 VMS file version numbers
3188.4 Directory conversion
3198.5 Remote host invocation
3208.6 Terminal problems
3218.7 Hex-editing and other external tools
3228.8 Sourcing vimrc and gvimrc
3238.9 Printing from Vim
3248.10 Setting up the symbols
3258.11 diff and other GNU programs
3268.12 diff-mode
3278.13 Allow '$' in C keywords
3288.14 VIMTUTOR for beginners
Bram Moolenaarac98e5d2008-09-01 14:51:37 +00003298.15 Slow start in console mode issue
3308.16 Common VIM directory - different architectures
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331
Bram Moolenaarac98e5d2008-09-01 14:51:37 +00003328.1 Backspace/delete
Bram Moolenaar071d4272004-06-13 20:20:40 +0000333
334There are backspace/delete key inconsistencies with VMS.
335:fixdel doesn't do the trick, but the solution is: >
336
337 :inoremap ^? ^H " for terminal mode
338 :inoremap <Del> ^H " for gui mode
339
340Read more in ch: 8.6 (Terminal problems).
341(Bruce Hunsaker <BNHunsaker@chq.byu.edu> Vim 5.3)
342
343
3448.2 Filters
345
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000346Vim supports filters, i.e., if you have a sort program that can handle
Bram Moolenaar071d4272004-06-13 20:20:40 +0000347input/output redirection like Unix (<infile >outfile), you could use >
348
349 :map \s 0!'aqsort<CR>
350
351(Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> Vim 5.4)
352
353
3548.3 VMS file version numbers
355
356Vim is saving files into a new file with the next higher file version
357number, try these settings. >
358
359 :set nobackup " does not create *.*_ backup files
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000360 :set nowritebackup " does not have any purpose on VMS. It's the
Bram Moolenaarc9b4b052006-04-30 18:54:39 +0000361 " default.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362
363Recovery is working perfect as well from the default swap file.
364Read more with :help swapfile
365
366(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000367Vim 5.6)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000368
369
3708.4 Directory conversion
371
372Vim will internally convert any unix-style paths and even mixed unix/VMS
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000373paths into VMS style paths. Some typical conversions resemble:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000374
375 /abc/def/ghi -> abc:[def]ghi.
376 /abc/def/ghi.j -> abc:[def]ghi.j
377 /abc/def/ghi.j;2 -> abc:[def]ghi.j;2
378 /abc/def/ghi/jkl/mno -> abc:[def.ghi.jkl]mno.
379 abc:[def.ghi]jkl/mno -> abc:[def.ghi.jkl]mno.
380 ./ -> current directory
381 ../ -> relative parent directory
382 [.def.ghi] -> relative child directory
383 ./def/ghi -> relative child directory
384
385Note: You may use <,> brackets as well (device:<path>file.ext;version) as
386rf10:<user.zay.work>test.c;1
387
388(David Elins <delins@foliage.com>, Jerome Lauret
389<JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
390
391
3928.5 Remote host invocation
393
394It is possible to use Vim as an internode editor.
3951. Edit some file from remote node: >
396
397 vi "<server>""username passwd""::<device>:<path><filename>;<version>"
398
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100399Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000400 vi "pluto""zay passwd""::RF10:<USER.ZAY.WORK>TEST.C;1"
401
402Note: syntax is very important, otherwise VMS will recognize more parameters
403instead of one (resulting with: file not found)
404
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00004052. Set up Vim as your internode editor. If Vim is not installed on your
406host, just set up your IP address, the full Vim path including the server name
407and run the command procedure below: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000408
409 $ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
410 $ set disp/create/node=<your_IP_here>/trans=tcpip
411 $ define "VIM "<vim_server>""''p1' ''p2'""::<device>:<vim_path>"
412 $ vi*m :== "mcr VIM:VIM.EXE"
413 $ gv*im :== "spawn/nowait mcr VIM:VIM.EXE -g"
414 $ goto end
415 $ usage:
416 $ write sys$output " Please enter username and password as a parameter."
417 $ write sys$output " Example: @SETVIM.COM username passwd"
418 $ end:
419
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000420Note: Never use it in a clustered environment (you do not need it), loading
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100421could be very-very slow, but even faster than a local Emacs. :-)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422
423(Zoltan Arpadffy, Vim 5.6)
424
425
4268.6 Terminal problems
427
428If your terminal name is not known to Vim and it is trying to find the default
429one you will get the following message during start-up:
430---
431Terminal entry not found in termcap
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000432'unknown-terminal' not known. Available built-in terminals are:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000433 builtin_gui
434 builtin_riscos
435 builtin_amiga
436 builtin_beos-ansi
437 builtin_ansi
438 builtin_vt320
439 builtin_vt52
440 builtin_pcansi
441 builtin_win32
442 builtin_xterm
443 builtin_iris-ansi
444 builtin_debug
445 builtin_dumb
446defaulting to 'vt320'
447---
448The solution is to define default terminal name: >
449
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000450 $ ! unknown terminal name. Let us use vt320 or ansi instead.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451 $ ! Note: it's case sensitive
452 $ define term "vt320"
453
454Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000455keyboard mappings. They should work perfect as they are, including arrows,
456Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457.gvimrc: >
458
459 inoremap <Del> <BS>
460
461Vim will also recognize that they are fast terminals.
462
463If you have some annoying line jumping on the screen between windows add to
464your .vimrc file: >
465
466 set ttyfast " set fast terminal
467
468Note: if you're using Vim on remote host or through very slow connection, it's
469recommended to avoid fast terminal option with: >
470
471 set nottyfast " set terminal to slow mode
472
473(Zoltan Arpadffy, Vim 5.6)
474
475
4768.7 Hex-editing and other external tools
477
478A very important difference between OpenVMS and other systems is that VMS uses
479special commands to execute executables: >
480
481 RUN <path>filename
482 MCR <path>filename <parameters>
483
484OpenVMS users always have to be aware that the Vim command :! "just" drop them
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000485to DCL prompt. This feature is possible to use without any problem with all
Bram Moolenaar071d4272004-06-13 20:20:40 +0000486DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000487we're running into trouble if we follow the Vim documentation (see: help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000488xxd).
489
490Solution: Execute with the MC command and add the full path to the executable.
491Example: Instead of :%!xxd command use: >
492
493 :%!mc vim:xxd
494
495... or in general: >
496 :!mc <path>filename <parameters>
497
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000498Note: You can use XXD and CTAGS from GUI menu.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000499
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000500To customize ctags it is possible to define the logical $CTAGS with standard
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501parameters as: >
502
503 define/nolog CTAGS "--totals -o sys$login:tags"
504
505For additional information, please read :help tagsearch and CTAGS
506documentation at http://ctags.sourceforge.net/ctags.html.
507
508(Zoltan Arpadffy, Vim 5.6-70)
509
510
5118.8 Sourcing vimrc and gvimrc
512
513If you want to use your .vimrc and .gvimrc from other platforms (e.g. Windows)
514you can get in trouble if you ftp that file(s): VMS has different end-of-line
515indication.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000516The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000517>
518 :so sys$login:.vimrc
519
520One trick is to compress (e.g. zip) the files on the other platform and
521uncompress it on VMS; if you have the same symptom, try to create the files
522with copy-paste (for this you need both op. systems reachable from one
523machine, e.g. an Xterm on Windows or telnet to Windows from VMS).
524
525(Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> Vim 6.0a)
526
527
5288.9 Printing from Vim
529
530To be able to print from Vim (running in GUI mode) under VMS you have to set
531up $TMP logical which should point to some temporary directory and logical
532SYS$PRINT to your default print queue.
533Example: >
534
535 $define SYS$PRINT HP5ANSI
536
537You can print out whole buffer or just the marked area.
538More info under :help hardcopy
539
540(Zoltan Arpadffy, Vim 6.0c)
541
542
5438.10 Setting up the symbols
544
545When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits.
546I now use a different symbol that seems to work OK and fixes the problem.
547I suggest this instead: >
548
549 $ GV*IM:==SPAWN/NOWAIT/INPUT=NLA0: MCR VIM:VIM.EXE -G -GEOMETRY 80X40
550
551The /INPUT=NLA0: separates the standard input of the gvim process from the
552parent terminal, to block signals from the parent window.
553Without the -GEOMETRY, the GVIM window size will be minimal and the menu
554will be confused after a window-resize.
555
556(Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac)
557
558
5598.11 diff and other GNU programs
560
561From 6.0 diff functionality has been implemented, but OpenVMS does not use
562GNU/Unix like diff therefore built in diff does not work.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000563There is a simple solution to solve this anomaly. Install a Unix like diff
564and Vim will work perfect in diff mode too. You just have to redefine your
Bram Moolenaar071d4272004-06-13 20:20:40 +0000565diff program as: >
566
567 define /nolog diff <GNU_PATH>diff.exe
568
569Another, more sophisticated solution is described below (8.12 diff-mode)
570There are some other programs as patch, make etc that may cause same problems.
571At www.polarhome.com is possible to download an GNU package for Alpha and VAX
572boxes that is meant to solve GNU problems on OpenVMS.
573( Zoltan Arpadffy, Vim 6.1)
574
575
5768.12 diff-mode
577
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100578Vim 6.0 and higher supports Vim diff-mode (See |new-diff-mode|, |diff-mode|
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000579and |08.7|). This uses the external program 'diff' and expects a Unix-like
580output format from diff. The standard VMS diff has a different output
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100581format. To use Vim on VMS in diff-mode, you need to:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000582 1 Install a Unix-like diff program, e.g. GNU diff
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100583 2 Tell Vim to use the Unix-like diff for diff-mode.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000584
585You can download GNU diff from the VIM-VMS website, it is one of the GNU
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000586tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587unpack it in a separate directory "GNU" and create a logical GNU: that
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000588points to that directory, e.g: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000589
590 DEFINE GNU <DISK>:[<DIRECTORY>.BIN.GNU]
591
592You may also want to define a symbol GDIFF, to use the GNU diff from the DCL
593prompt: >
594
595 GDIFF :== $GNU:DIFF.EXE
596
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100597Now you need to tell Vim to use the new diff program. Take the example
Bram Moolenaar071d4272004-06-13 20:20:40 +0000598settings from |diff-diffexpr| and change the call to the external diff
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000599program to the new diff on VMS. Add this to your .vimrc file: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000600
601 " Set up vimdiff options
602 if v:version >= 600
603 " Use GNU diff on VMS
604 set diffexpr=MyDiff()
605 function MyDiff()
606 let opt = ""
607 if &diffopt =~ "icase"
608 let opt = opt . "-i "
609 endif
610 if &diffopt =~ "iwhite"
611 let opt = opt . "-b "
612 endif
613 silent execute "!mc GNU:diff.exe -a " . opt . v:fname_in . " " . v:fname_new .
614 \ " > " . v:fname_out
615 endfunction
616 endif
617
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100618You can now use Vim in diff-mode, e.g. to compare two files in read-only
Bram Moolenaar071d4272004-06-13 20:20:40 +0000619mode: >
620
621 $ VIM -D/R <FILE1> <FILE2>
622
623You can also define new symbols for vimdiff, e.g.: >
624
625 $ VIMDIFF :== 'VIM' -D/R
626 $ GVIMDIFF :== 'GVIM' -D/R
627
628You can now compare files in 4 ways: >
629
630 1. VMS diff: $ DIFF <FILE1> <FILE2>
631 2. GNU diff: $ GDIFF <FILE1> <FILE2>
632 3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
633 4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
634
635( Coen Engelbarts, Vim 6.1)
636
637
6388.13 Allow '$' in C keywords
639
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000640DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100641and Vim recognises the '$' as the end of the identifier. You can change this
Bram Moolenaar071d4272004-06-13 20:20:40 +0000642with the |iskeyword|command.
643Add this command to your .vimrc file: >
644
645 autocmd FileType c,cpp,cs set iskeyword+=$
646
647You can also create the file(s) $VIM/FTPLUGIN/C.VIM (and/or CPP.VIM and
648CS.VIM) and add this command: >
649
650 set iskeyword+=$
651
652Now word-based commands, e.g. the '*'-search-command and the CTRL-]
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000653tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
Bram Moolenaar071d4272004-06-13 20:20:40 +0000654C keywords since ctags version 5.1.)
655
656( Coen Engelbarts, Vim 6.1)
657
6588.14 VIMTUTOR for beginners
659
660It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000661first steps with Vim on OpenVMS. Depending of binary distribution you may
662start it with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000663
664 @vim:vimtutor
665
666(Thomas.R.Wyant III, Vim 6.1)
667
Bram Moolenaarac98e5d2008-09-01 14:51:37 +00006688.14 Slow start in console mode issue
669
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100670As GUI/GTK Vim works equally well in console mode, many administrators
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000671deploy those executables system wide.
672Unfortunately, on a remote slow connections GUI/GTK executables behave rather
673slow when user wants to run Vim just in the console mode - because of X environment detection timeout.
674
675Luckily, there is a simple solution for that. Administrators need to deploy
676both GUI/GTK build and just console build executables, like below: >
677
678 |- vim72
679 |----- doc
680 |----- syntax
681 vimrc (system rc files)
682 gvimrc
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100683 gvim.exe (the renamed GUI or GTK built vim.exe)
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000684 vim.exe (the console only executable)
685
686Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
687
688 $ define/nolog VIM RF10:[UTIL.VIM72] ! where you VIM directory is
689 $ vi*m :== mcr VIM:VIM.EXE
690 $ gvi*m :== mcr VIM:GVIM.EXE
691 $ ! or you can try to spawn with
692 $ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40
693
694
695Like this, users that do not have X environment and want to use Vim just in
696console mode can avoid performance problems.
697
698(Zoltan Arpadffy, Vim 7.2)
699
7008.15 Common VIM directory - different architectures
701
702In a cluster that contains nodes with different architectures like below:
703
704$show cluster
705View of Cluster from system ID 11655 node: TOR 18-AUG-2008 11:58:31
706+---------------------------------+
707¦ SYSTEMS ¦ MEMBERS ¦
708+-----------------------+---------¦
709¦ NODE ¦ SOFTWARE ¦ STATUS ¦
710+--------+--------------+---------¦
711¦ TOR ¦ VMS V7.3-2 ¦ MEMBER ¦
712¦ TITAN2 ¦ VMS V8.3 ¦ MEMBER ¦
713¦ ODIN ¦ VMS V7.3-2 ¦ MEMBER ¦
714+---------------------------------+
715
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100716It is convenient to have a common VIM directory but execute different
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000717executables.
718There are more solutions for this problem:
719
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100720Solution 1. All executables in the same directory with different names
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000721This is easily done with the following script that can be added
722to the login.com or sylogin.com: >
723
724 $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
725 $ then
726 $ say "VAX platform"
727 $ vi*m:== mcr vim:VIM.EXE_VAX
728 $ endif
729 $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
730 $ then
731 $ say "ALPHA platform"
732 $ vi*m :== mcr vim:VIM.EXE_AXP
733 $ endif
734 $ if f$getsyi("ARCH_NAME") .eqs. "IA64"
735 $ then
736 $ say "IA64 platform"
737 $ vi*m :== mcr vim:VIM.EXE_IA64
738 $ endif
739
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100740Solution 2. Different directories: >
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000741
742 $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
743 $ then
744 $ say "VAX platform"
745 $ define/nolog VIM RF10:[UTIL.VAX_EXE] ! VAX executables
746 $ endif
747 $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
748 $ then
749 $ say "ALPHA platform"
750 $ define/nolog VIM RF10:[UTIL.AXP_EXE] ! AXP executables
751 $ endif
752 $ if f$getsyi("ARCH_NAME") .eqs. "IA64"
753 $ then
754 $ say "IA64 platform"
755 $ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables
756 $ endif
757 $! VIMRUNTIME must be defined in order to find runtime files
758 $ define/nolog VIMRUNTIME RF10:[UTIL.VIM72]
759
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100760A good example for this approach is the [GNU]gnu_tools.com script from
761GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000762
763(Zoltan Arpadffy, Vim 7.2)
764
Bram Moolenaar071d4272004-06-13 20:20:40 +0000765==============================================================================
766
7679. VMS related changes *vms-changes*
768
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000769Recent changes
770- The following plugins are included into VMS runtime:
771 genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3,
772 bufexplorer 7.1.7, taglist 4.5
773- minor changes in vimrc (just in VMS runtime)
774- make_vms.mms - HUGE model is the default
775- [TESTDIR]make_vms.mms include as many tests possible
776- modify test30 and test54 for VMS
777- enable FLOAT feature in VMS port
778- os_vms.txt updated
779
780Version 7.2 (2008 Aug 9)
781- VCF files write corrected
782- CTAGS 5.7 included
783- corrected make_vms.mms (on VAX gave syntax error)
784
785Version 7.1 (2007 Jun 15)
786- create TAGS file from menu
787
788Version 7 (2006 May 8)
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000789- Improved low level char input (affects just console mode)
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000790- Fixed plugin bug
791- CTAGS 5.6 included
Bram Moolenaarb475fb92006-03-02 22:40:52 +0000792
793Version 6.4 (2005 Oct 15)
Bram Moolenaar5eba4c22005-07-12 22:40:29 +0000794- GTKLIB and Vim build on IA64
795- colors in terminal mode
796- syntax highlighting in terminal mode
797- write problem fixed (extra CR)
798- ESC and ESC sequence recognition in terminal mode
799- make file changed to support new MMS version
800- env variable expansion in path corrected
801- printing problems corrected
802- help text added for case insensitive arguments
803
Bram Moolenaar071d4272004-06-13 20:20:40 +0000804Version 6.3 (2004 May 10)
805- Improved vms_read function
806- CTAGS v5.5.4 included
807- Documentation corrected and updated
808
809Version 6.2 (2003 May 7)
810- Corrected VMS system call results
811- Low level character input is rewritten
812- Correction in tag and quickfix handling
813- First GTK build
814- Make file changes
815 - GTK feature added
816 - Define for OLD_VMS
817 - OpenVMS version 6.2 or older
818- Documentation updated with GTK features
819- CTAGS v5.5 included
820- VMS VIM tutor created
821
822Version 6.1 (2002 Mar 25)
823- TCL init_tcl() problem fixed
824- CTAGS v5.4 included
825- GNU tools binaries for OpenVMS
826- Make file changes
827 - PERL, PYTHON and TCL support improved
828 - InstallVMS.txt has a detailed description HOWTO build
829- VMS/Unix file handling rewritten
830- Minor casting and bug fixes
831
832Version 6.0 (2001 Sep 28)
833- Unix and VMS code has been merged
834 - separated "really" VMS related code
835 - included all possible Unix functionality
836 - simplified or deleted the configuration files
837 - makefile MAKE_VMS.MMS reviewed
838- menu changes (fixed printing, CTAGS and XXD usage)
839- fixed variable RMS record format handling anomaly
840- corrected syntax, ftplugin etc files load
841- changed expand_wildcards and expandpath functions to work more general
842- created OS_VMS_FILTER.COM - DECC->VAXC pre-processor directive convert
843 script.
844- Improved code's VAXC and new DECC compilers compatibility
845- changed quickfix parameters:
846 - errormessage format to suite DECC
847 - search, make and other commands to suite VMS system
848- updated and renamed MMS make files for Vim and CTAGS.
849- CTAGS has been removed from source distribution of Vim but it will remain
850 in OpenVMS binary distributions.
851- simplified build/configuration procedure
852- created INSTALLvms.txt - detailed compiling instructions under VMS.
853- updated test scripts.
854
855Version 5.8 (2001 Jun 1)
856- OS_VMS.TXT updated with new features.
857- other minor fixes.
858- documentation updated
859- this version had been tested much more than any other OpenVMS version
860 earlier
861
862Version 5.7 (2000 Jun 24)
863- New CTAGS v5.0 in distribution
864- Documentation updated
865
866Version 5.6 (2000 Jan 17)
867- VMS filename related changes:
868 - version handling (open everything, save to new version)
869 - correct file extension matching for syntax (version problem)
870 - handle <,> characters and passwords in directory definition
871 - handle internode/remote invocation and editing with passwords
872 - OpenVMS files will be treated case insensitive from now
873 - corrected response of expand("%:.") etc path related functions
874 (in one word: VMS directory handling internally)
875- version command
876 - corrected (+,-) information data
877 - added compiler and OS version
878 - added user and host information
879 - resolving $VIM and $VIMRUNTIME logicals
880- VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2.
881 - enabled farsi, rightleft etc. features
882 - undo level raised up to 1000
883- Updated OS_VMS.MMS file.
884 - maximum features ON is default
885 - Vim is compilable with +perl, +python and +tcl features.
886 - improved MMK compatibility
887- Created MAKEFILE_VMS.MMS, makefile for testing Vim during development.
888- Defined DEC terminal VT320
889 - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals
890 backwards, but not VT340 and newer with colour capability.
891 - VT320 is default terminal for OpenVMS
892 - these new terminals are also fast ttys (default for OpenVMS).
893 - allowed dec_mouse ttym
894- Updated files vimrc and gvimrc with VMS specific suggestions.
895- OS_VMS.TXT updated with new features.
896
897Version 5.5 (1999 Dec 3)
898- Popup menu line crash corrected.
899- Handle full file names with version numbers.
900- Directory handling (CD command etc.)
901- Corrected file name conversion VMS to Unix and v.v.
902- Correct response of expand wildcards
903- Recovery is working from this version under VMS as well.
904- Improved terminal and signal handing.
905- Improved OS_VMS.TXT
906
907Version 5.4 (1999 Sep 9)
908- Cut and paste mismatch corrected.
909- Motif directories during open and save are corrected.
910
911Version 5.3 (1998 Oct 12)
912- Minor changes in the code
913- Standard distribution with +GUI option
914
915Version 5.1 (1998 Apr 21)
916- Syntax and DEC C changes in the code
917- Fixing problems with the /doc subdirectory
918- Improve OS_VMS.MMS
919
920Version 4.5 (1996 Dec 16)
921- First VMS port by Henk Elbers <henk@xs4all.nl>
922
923==============================================================================
924
92510. Authors *vms-authors*
926
927OpenVMS documentation and executables are maintained by:
928Zoltan Arpadffy <arpadffy@polarhome.com>
Bram Moolenaarac98e5d2008-09-01 14:51:37 +0000929OpenVMS Vim page: http://www.polarhome.com/vim/
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930
931This document uses parts and remarks from earlier authors and contributors
932of OS_VMS.TXT:
933 Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
934 Bruce Hunsaker <BNHunsaker@chq.byu.edu>
935 Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
936
937 vim:tw=78:ts=8:ft=help:norl: