blob: 2fd6d8b4ac888784a8f0b7e9b06346ff95ee2186 [file] [log] [blame]
Bram Moolenaar5eba4c22005-07-12 22:40:29 +00001*os_vms.txt* For Vim version 7.0aa. Last change: 2005 Jul 12
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
53 vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
54 vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
55 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
59and of course
60 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
64==============================================================================
65
663. Compiling *vms-compiling*
67
68See the file [.SRC]INSTALLVMS.TXT.
69
70==============================================================================
71
724. Problems *vms-problems*
73
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000074The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
75platforms with the DEC C compiler. It should work without bigger problems.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000076If your system does not have some include libraries you can tune up in
77OS_VMS_CONF.H file.
Bram Moolenaar071d4272004-06-13 20:20:40 +000078
79If you decided to build Vim with +perl, +python, etc. options, first you need
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000080to download OpenVMS distributions of Perl and Python. Build and deploy the
81libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
82a problem from Vim side.
Bram Moolenaar071d4272004-06-13 20:20:40 +000083
Bram Moolenaar5eba4c22005-07-12 22:40:29 +000084Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
85
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000086Note: Under VAX it should work with the DEC C compiler without problems. The
87VAX C compiler is not fully ANSI C compatible in pre-processor directives
88semantics, therefore you have to use a converter program what will do the lion
89part of the job. For detailed instructions read file INSTALLvms.txt
Bram Moolenaar071d4272004-06-13 20:20:40 +000090
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000091MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
Bram Moolenaar071d4272004-06-13 20:20:40 +000092change to subdirectory and build it separately.
93
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000094CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
95specific source might contain CTAGS source files as described above.
Bram Moolenaar071d4272004-06-13 20:20:40 +000096You can find more information about CTAGS on VMS at
97http://www.polarhome.com/ctags/
98
99Advanced users may try some acrobatics in FEATURE.H file also.
100
101It is possible to compile with +xfontset +xim options too, but then you have
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000102to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103
104You may want to use GUI with GTK icons, then you have to download and install
105GTK for OpenVMS or at least runtime shareable images - LIBGTK from
106polarhome.com
107
108For more advanced questions, please send your problem to Vim on VMS mailing
109list <vim-vms@polarhome.com>
110More about the vim-vms list can be found at:
111http://www.polarhome.com/mailman/listinfo/vim-vms
112
113==============================================================================
114
1155. Deploy *vms-deploy*
116
117Vim uses a special directory structure to hold the document and runtime files:
118
119 vim (or wherever)
120 |- tmp
121 |- vim57
122 |----- doc
123 |----- syntax
124 |- vim60
125 |----- doc
126 |----- syntax
127 |- vim61
128 |----- doc
129 |----- syntax
130 vimrc (system rc files)
131 gvimrc
132
133Use: >
134
135 define/nolog VIM device:[path.vim]
136 define/nolog VIMRUNTIME device:[path.vim.vim60]
137 define/nolog TMP device:[path.tmp]
138
139to get vim.exe to find its document, filetype, and syntax files, and to
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000140specify a directory where temporary files will be located. Copy the "runtime"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141subdirectory of the vim distribution to vimruntime.
142
143Logicals $VIMRUNTIME and $TMP are optional.
144
145If $VIMRUNTIME is not set, Vim will guess and try to set up automatically.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000146Read more about it at :help runtime
Bram Moolenaar071d4272004-06-13 20:20:40 +0000147
148If $TMP is not set, you will not be able to use some functions as CTAGS,
149XXD, printing etc. that use temporary directory for normal operation.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000150The $TMP directory should be readable and writable by the user(s).
151The easiest way to set up $TMP is to define a logical: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152
153 define/nolog TMP SYS$SCRATCH
154or as: >
155 define/nolog TMP SYS$LOGIN
156
157==============================================================================
158
1596. Practical usage *vms-usage*
160
161Usually, you want to run just one version of Vim on your system, therefore
162it is enough to dedicate one directory for Vim.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000163Copy the whole Vim runtime directory structure to the deployment position.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000165Set up the logical $VIM as: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000166
167 $ define VIM device:<path>
168
169Set up some symbols: >
170
171 $ ! vi starts Vim in chr. mode.
172 $ vi*m :== mcr VIM:VIM.EXE
173
174 $ !gvi starts Vim in GUI mode.
175 $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
176
177Please, check the notes for customization and configuration of symbols.
178
179You may want to create .vimrc and .gvimrc files in your home directory
180(SYS$LOGIN) to overwrite default settings.
181
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000182The easiest way is just rename example files. You may leave the menu file
183(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
184be default setup for all users, and for users it is enough just to have their
185own additions or resetting in their home directory in files .vimrc and .gvimrc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000186It should work without problems.
187
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000188Note: Remember, system rc files (default for all users) don't have a leading
189".". So, system rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190
191 $VIM:vimrc
192 $VIM:gvimrc
193 $VIM:menu.vim
194
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000195and user customized rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000196
197 sys$login:.vimrc
198 sys$login:.gvimrc
199
200You can check that everything is on the right place with the :version command.
201
202Example LOGIN.COM: >
203
204 $ define/nolog VIM RF10:[UTIL.VIM]
205 $ vi*m :== mcr VIM:VIM.EXE
206 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
207 $ set disp/create/node=192.168.5.223/trans=tcpip
208
209Note: This set-up should be enough, if you are working on standalone server or
210clustered environment, but if you want to use Vim as internode editor in
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000211DECNET environment, it will satisfy as well.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212You just have to define the "whole" path: >
213
214 $ define VIM "<server_name>[""user password""]::device:<path>"
215 $ vi*m :== "mcr VIM:VIM.EXE"
216
217as for example: >
218
219 $ define VIM "PLUTO::RF10:[UTIL.VIM]"
220 $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
221
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000222You can also use the $VIMRUNTIME logical to point to the proper version of Vim
223if you have installed more versions at the same time. If $VIMRUNTIME is not
224defined Vim will borrow its value from the $VIM logical. You can find more
225information about the $VIMRUNTIME logical by typing :help runtime as a Vim
226command.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227
228System administrators might want to set up a system wide Vim installation,
229then add to the SYS$STARTUP:SYLOGICALS.COM >
230
231 $ define/nolog/sys VIM device:<path>
232 $ define/nolog/sys TMP SYS$SCRATCH
233
234and to the SYS$STARTUP:SYLOGIN.COM >
235
236 $ vi*m :== mcr VIM:VIM.EXE
237 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
238
239
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000240It will set up a normal Vim work environment for every user on the system.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000241
242==============================================================================
243
2447. GUI mode questions *vms-gui*
245
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000246OpenVMS is a real mainframe OS, therefore even if it has a GUI console, most
247of the users do not use a native X/Window environment during normal operation.
248It is not possible to start Vim in GUI mode "just like that". But anyhow it
249is not too complicated either.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000251First of all: you will need an executable that is built with the GUI enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000252
253Second: you need to have installed DECW/Motif on your VMS server, otherwise
254you will get errors that some shareable libraries are missing.
255
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000256Third: If you choose to run Vim with extra features such as GUI/GTK then you
257need a GTK installation too or at least a GTK runtime environment (LIBGTK
Bram Moolenaar5eba4c22005-07-12 22:40:29 +0000258can be downloaded from http://www.polarhome.com/vim/).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000259
2601) If you are working on the VMS X/Motif console:
261 Start Vim with the command: >
262
263 $ mc device:<path>VIM.EXE -g
264<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000265 or type :gui as a command to the Vim command prompt. For more info :help
266 gui
Bram Moolenaar071d4272004-06-13 20:20:40 +0000267
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00002682) If you are working on some other X/Window environment like Unix or a remote
269 X VMS console. Set up display to your host with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270
271 $ set disp/create/node=<your IP address>/trans=<transport-name>
272<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000273 and start Vim as in point 1. You can find more help in VMS documentation or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274 type: help set disp in VMS prompt.
275 Examples: >
276
277 $ set disp/create/node=192.168.5.159 ! default trans is DECnet
278 $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
279 $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
280
281Note: you should define just one of these.
282For more information type $help set disp in VMS prompt.
283
2843) Another elegant solution is XDM if you have installed on OpenVMS box.
285 It is possible to work from XDM client as from GUI console.
286
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00002874) If you are working on MS-Windows or some other non X/Window environment
288 you need to set up one X server and run Vim as in point 2.
289 For MS-Windows there are available free X servers as MIX , Omni X etc.,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290 as well as excellent commercial products as eXcursion or ReflectionX with
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000291 built-in DEC support.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292
293Please note, that executables without GUI are slightly faster during startup
294then with enabled GUI in character mode. Therefore, if you do not use GUI
295features, it is worth to choose non GUI executables.
296
297==============================================================================
298
2998. Useful notes *vms-notes*
300
3018.1 backspace/delete
3028.2 Filters
3038.3 VMS file version numbers
3048.4 Directory conversion
3058.5 Remote host invocation
3068.6 Terminal problems
3078.7 Hex-editing and other external tools
3088.8 Sourcing vimrc and gvimrc
3098.9 Printing from Vim
3108.10 Setting up the symbols
3118.11 diff and other GNU programs
3128.12 diff-mode
3138.13 Allow '$' in C keywords
3148.14 VIMTUTOR for beginners
315
3168.1 backspace/delete
317
318There are backspace/delete key inconsistencies with VMS.
319:fixdel doesn't do the trick, but the solution is: >
320
321 :inoremap ^? ^H " for terminal mode
322 :inoremap <Del> ^H " for gui mode
323
324Read more in ch: 8.6 (Terminal problems).
325(Bruce Hunsaker <BNHunsaker@chq.byu.edu> Vim 5.3)
326
327
3288.2 Filters
329
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000330Vim supports filters, i.e., if you have a sort program that can handle
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331input/output redirection like Unix (<infile >outfile), you could use >
332
333 :map \s 0!'aqsort<CR>
334
335(Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> Vim 5.4)
336
337
3388.3 VMS file version numbers
339
340Vim is saving files into a new file with the next higher file version
341number, try these settings. >
342
343 :set nobackup " does not create *.*_ backup files
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000344 :set nowritebackup " does not have any purpose on VMS. It's the
345 " default.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346
347Recovery is working perfect as well from the default swap file.
348Read more with :help swapfile
349
350(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000351Vim 5.6)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352
353
3548.4 Directory conversion
355
356Vim will internally convert any unix-style paths and even mixed unix/VMS
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000357paths into VMS style paths. Some typical conversions resemble:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358
359 /abc/def/ghi -> abc:[def]ghi.
360 /abc/def/ghi.j -> abc:[def]ghi.j
361 /abc/def/ghi.j;2 -> abc:[def]ghi.j;2
362 /abc/def/ghi/jkl/mno -> abc:[def.ghi.jkl]mno.
363 abc:[def.ghi]jkl/mno -> abc:[def.ghi.jkl]mno.
364 ./ -> current directory
365 ../ -> relative parent directory
366 [.def.ghi] -> relative child directory
367 ./def/ghi -> relative child directory
368
369Note: You may use <,> brackets as well (device:<path>file.ext;version) as
370rf10:<user.zay.work>test.c;1
371
372(David Elins <delins@foliage.com>, Jerome Lauret
373<JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
374
375
3768.5 Remote host invocation
377
378It is possible to use Vim as an internode editor.
3791. Edit some file from remote node: >
380
381 vi "<server>""username passwd""::<device>:<path><filename>;<version>"
382
383example: >
384 vi "pluto""zay passwd""::RF10:<USER.ZAY.WORK>TEST.C;1"
385
386Note: syntax is very important, otherwise VMS will recognize more parameters
387instead of one (resulting with: file not found)
388
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00003892. Set up Vim as your internode editor. If Vim is not installed on your
390host, just set up your IP address, the full Vim path including the server name
391and run the command procedure below: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392
393 $ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
394 $ set disp/create/node=<your_IP_here>/trans=tcpip
395 $ define "VIM "<vim_server>""''p1' ''p2'""::<device>:<vim_path>"
396 $ vi*m :== "mcr VIM:VIM.EXE"
397 $ gv*im :== "spawn/nowait mcr VIM:VIM.EXE -g"
398 $ goto end
399 $ usage:
400 $ write sys$output " Please enter username and password as a parameter."
401 $ write sys$output " Example: @SETVIM.COM username passwd"
402 $ end:
403
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000404Note: Never use it in a clustered environment (you do not need it), loading
405could be very-very slow, but even faster then a local Emacs. :-)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000406
407(Zoltan Arpadffy, Vim 5.6)
408
409
4108.6 Terminal problems
411
412If your terminal name is not known to Vim and it is trying to find the default
413one you will get the following message during start-up:
414---
415Terminal entry not found in termcap
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000416'unknown-terminal' not known. Available built-in terminals are:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000417 builtin_gui
418 builtin_riscos
419 builtin_amiga
420 builtin_beos-ansi
421 builtin_ansi
422 builtin_vt320
423 builtin_vt52
424 builtin_pcansi
425 builtin_win32
426 builtin_xterm
427 builtin_iris-ansi
428 builtin_debug
429 builtin_dumb
430defaulting to 'vt320'
431---
432The solution is to define default terminal name: >
433
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000434 $ ! unknown terminal name. Let us use vt320 or ansi instead.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000435 $ ! Note: it's case sensitive
436 $ define term "vt320"
437
438Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000439keyboard mappings. They should work perfect as they are, including arrows,
440Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441.gvimrc: >
442
443 inoremap <Del> <BS>
444
445Vim will also recognize that they are fast terminals.
446
447If you have some annoying line jumping on the screen between windows add to
448your .vimrc file: >
449
450 set ttyfast " set fast terminal
451
452Note: if you're using Vim on remote host or through very slow connection, it's
453recommended to avoid fast terminal option with: >
454
455 set nottyfast " set terminal to slow mode
456
457(Zoltan Arpadffy, Vim 5.6)
458
459
4608.7 Hex-editing and other external tools
461
462A very important difference between OpenVMS and other systems is that VMS uses
463special commands to execute executables: >
464
465 RUN <path>filename
466 MCR <path>filename <parameters>
467
468OpenVMS users always have to be aware that the Vim command :! "just" drop them
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000469to DCL prompt. This feature is possible to use without any problem with all
Bram Moolenaar071d4272004-06-13 20:20:40 +0000470DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000471we're running into trouble if we follow the Vim documentation (see: help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000472xxd).
473
474Solution: Execute with the MC command and add the full path to the executable.
475Example: Instead of :%!xxd command use: >
476
477 :%!mc vim:xxd
478
479... or in general: >
480 :!mc <path>filename <parameters>
481
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000482Note: You can use XXD and CTAGS from GUI menu.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000484To customize ctags it is possible to define the logical $CTAGS with standard
Bram Moolenaar071d4272004-06-13 20:20:40 +0000485parameters as: >
486
487 define/nolog CTAGS "--totals -o sys$login:tags"
488
489For additional information, please read :help tagsearch and CTAGS
490documentation at http://ctags.sourceforge.net/ctags.html.
491
492(Zoltan Arpadffy, Vim 5.6-70)
493
494
4958.8 Sourcing vimrc and gvimrc
496
497If you want to use your .vimrc and .gvimrc from other platforms (e.g. Windows)
498you can get in trouble if you ftp that file(s): VMS has different end-of-line
499indication.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000500The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501>
502 :so sys$login:.vimrc
503
504One trick is to compress (e.g. zip) the files on the other platform and
505uncompress it on VMS; if you have the same symptom, try to create the files
506with copy-paste (for this you need both op. systems reachable from one
507machine, e.g. an Xterm on Windows or telnet to Windows from VMS).
508
509(Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> Vim 6.0a)
510
511
5128.9 Printing from Vim
513
514To be able to print from Vim (running in GUI mode) under VMS you have to set
515up $TMP logical which should point to some temporary directory and logical
516SYS$PRINT to your default print queue.
517Example: >
518
519 $define SYS$PRINT HP5ANSI
520
521You can print out whole buffer or just the marked area.
522More info under :help hardcopy
523
524(Zoltan Arpadffy, Vim 6.0c)
525
526
5278.10 Setting up the symbols
528
529When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits.
530I now use a different symbol that seems to work OK and fixes the problem.
531I suggest this instead: >
532
533 $ GV*IM:==SPAWN/NOWAIT/INPUT=NLA0: MCR VIM:VIM.EXE -G -GEOMETRY 80X40
534
535The /INPUT=NLA0: separates the standard input of the gvim process from the
536parent terminal, to block signals from the parent window.
537Without the -GEOMETRY, the GVIM window size will be minimal and the menu
538will be confused after a window-resize.
539
540(Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac)
541
542
5438.11 diff and other GNU programs
544
545From 6.0 diff functionality has been implemented, but OpenVMS does not use
546GNU/Unix like diff therefore built in diff does not work.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000547There is a simple solution to solve this anomaly. Install a Unix like diff
548and Vim will work perfect in diff mode too. You just have to redefine your
Bram Moolenaar071d4272004-06-13 20:20:40 +0000549diff program as: >
550
551 define /nolog diff <GNU_PATH>diff.exe
552
553Another, more sophisticated solution is described below (8.12 diff-mode)
554There are some other programs as patch, make etc that may cause same problems.
555At www.polarhome.com is possible to download an GNU package for Alpha and VAX
556boxes that is meant to solve GNU problems on OpenVMS.
557( Zoltan Arpadffy, Vim 6.1)
558
559
5608.12 diff-mode
561
562Vim 6.0 and higher supports vim diff-mode (See |new-diff-mode|, |diff-mode|
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000563and |08.7|). This uses the external program 'diff' and expects a Unix-like
564output format from diff. The standard VMS diff has a different output
565format. To use vim on VMS in diff-mode, you need to:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566 1 Install a Unix-like diff program, e.g. GNU diff
567 2 Tell vim to use the Unix-like diff for diff-mode.
568
569You can download GNU diff from the VIM-VMS website, it is one of the GNU
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000570tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000571unpack it in a separate directory "GNU" and create a logical GNU: that
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000572points to that directory, e.g: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573
574 DEFINE GNU <DISK>:[<DIRECTORY>.BIN.GNU]
575
576You may also want to define a symbol GDIFF, to use the GNU diff from the DCL
577prompt: >
578
579 GDIFF :== $GNU:DIFF.EXE
580
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000581Now you need to tell vim to use the new diff program. Take the example
Bram Moolenaar071d4272004-06-13 20:20:40 +0000582settings from |diff-diffexpr| and change the call to the external diff
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000583program to the new diff on VMS. Add this to your .vimrc file: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000584
585 " Set up vimdiff options
586 if v:version >= 600
587 " Use GNU diff on VMS
588 set diffexpr=MyDiff()
589 function MyDiff()
590 let opt = ""
591 if &diffopt =~ "icase"
592 let opt = opt . "-i "
593 endif
594 if &diffopt =~ "iwhite"
595 let opt = opt . "-b "
596 endif
597 silent execute "!mc GNU:diff.exe -a " . opt . v:fname_in . " " . v:fname_new .
598 \ " > " . v:fname_out
599 endfunction
600 endif
601
602You can now use vim in diff-mode, e.g. to compare two files in read-only
603mode: >
604
605 $ VIM -D/R <FILE1> <FILE2>
606
607You can also define new symbols for vimdiff, e.g.: >
608
609 $ VIMDIFF :== 'VIM' -D/R
610 $ GVIMDIFF :== 'GVIM' -D/R
611
612You can now compare files in 4 ways: >
613
614 1. VMS diff: $ DIFF <FILE1> <FILE2>
615 2. GNU diff: $ GDIFF <FILE1> <FILE2>
616 3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
617 4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
618
619( Coen Engelbarts, Vim 6.1)
620
621
6228.13 Allow '$' in C keywords
623
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000624DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
625and vim recognises the '$' as the end of the identifier. You can change this
Bram Moolenaar071d4272004-06-13 20:20:40 +0000626with the |iskeyword|command.
627Add this command to your .vimrc file: >
628
629 autocmd FileType c,cpp,cs set iskeyword+=$
630
631You can also create the file(s) $VIM/FTPLUGIN/C.VIM (and/or CPP.VIM and
632CS.VIM) and add this command: >
633
634 set iskeyword+=$
635
636Now word-based commands, e.g. the '*'-search-command and the CTRL-]
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000637tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
Bram Moolenaar071d4272004-06-13 20:20:40 +0000638C keywords since ctags version 5.1.)
639
640( Coen Engelbarts, Vim 6.1)
641
6428.14 VIMTUTOR for beginners
643
644It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000645first steps with Vim on OpenVMS. Depending of binary distribution you may
646start it with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000647
648 @vim:vimtutor
649
650(Thomas.R.Wyant III, Vim 6.1)
651
652==============================================================================
653
6549. VMS related changes *vms-changes*
655
Bram Moolenaar5eba4c22005-07-12 22:40:29 +0000656Version 7.0
657- GTKLIB and Vim build on IA64
658- colors in terminal mode
659- syntax highlighting in terminal mode
660- write problem fixed (extra CR)
661- ESC and ESC sequence recognition in terminal mode
662- make file changed to support new MMS version
663- env variable expansion in path corrected
664- printing problems corrected
665- help text added for case insensitive arguments
666
Bram Moolenaar071d4272004-06-13 20:20:40 +0000667Version 6.3 (2004 May 10)
668- Improved vms_read function
669- CTAGS v5.5.4 included
670- Documentation corrected and updated
671
672Version 6.2 (2003 May 7)
673- Corrected VMS system call results
674- Low level character input is rewritten
675- Correction in tag and quickfix handling
676- First GTK build
677- Make file changes
678 - GTK feature added
679 - Define for OLD_VMS
680 - OpenVMS version 6.2 or older
681- Documentation updated with GTK features
682- CTAGS v5.5 included
683- VMS VIM tutor created
684
685Version 6.1 (2002 Mar 25)
686- TCL init_tcl() problem fixed
687- CTAGS v5.4 included
688- GNU tools binaries for OpenVMS
689- Make file changes
690 - PERL, PYTHON and TCL support improved
691 - InstallVMS.txt has a detailed description HOWTO build
692- VMS/Unix file handling rewritten
693- Minor casting and bug fixes
694
695Version 6.0 (2001 Sep 28)
696- Unix and VMS code has been merged
697 - separated "really" VMS related code
698 - included all possible Unix functionality
699 - simplified or deleted the configuration files
700 - makefile MAKE_VMS.MMS reviewed
701- menu changes (fixed printing, CTAGS and XXD usage)
702- fixed variable RMS record format handling anomaly
703- corrected syntax, ftplugin etc files load
704- changed expand_wildcards and expandpath functions to work more general
705- created OS_VMS_FILTER.COM - DECC->VAXC pre-processor directive convert
706 script.
707- Improved code's VAXC and new DECC compilers compatibility
708- changed quickfix parameters:
709 - errormessage format to suite DECC
710 - search, make and other commands to suite VMS system
711- updated and renamed MMS make files for Vim and CTAGS.
712- CTAGS has been removed from source distribution of Vim but it will remain
713 in OpenVMS binary distributions.
714- simplified build/configuration procedure
715- created INSTALLvms.txt - detailed compiling instructions under VMS.
716- updated test scripts.
717
718Version 5.8 (2001 Jun 1)
719- OS_VMS.TXT updated with new features.
720- other minor fixes.
721- documentation updated
722- this version had been tested much more than any other OpenVMS version
723 earlier
724
725Version 5.7 (2000 Jun 24)
726- New CTAGS v5.0 in distribution
727- Documentation updated
728
729Version 5.6 (2000 Jan 17)
730- VMS filename related changes:
731 - version handling (open everything, save to new version)
732 - correct file extension matching for syntax (version problem)
733 - handle <,> characters and passwords in directory definition
734 - handle internode/remote invocation and editing with passwords
735 - OpenVMS files will be treated case insensitive from now
736 - corrected response of expand("%:.") etc path related functions
737 (in one word: VMS directory handling internally)
738- version command
739 - corrected (+,-) information data
740 - added compiler and OS version
741 - added user and host information
742 - resolving $VIM and $VIMRUNTIME logicals
743- VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2.
744 - enabled farsi, rightleft etc. features
745 - undo level raised up to 1000
746- Updated OS_VMS.MMS file.
747 - maximum features ON is default
748 - Vim is compilable with +perl, +python and +tcl features.
749 - improved MMK compatibility
750- Created MAKEFILE_VMS.MMS, makefile for testing Vim during development.
751- Defined DEC terminal VT320
752 - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals
753 backwards, but not VT340 and newer with colour capability.
754 - VT320 is default terminal for OpenVMS
755 - these new terminals are also fast ttys (default for OpenVMS).
756 - allowed dec_mouse ttym
757- Updated files vimrc and gvimrc with VMS specific suggestions.
758- OS_VMS.TXT updated with new features.
759
760Version 5.5 (1999 Dec 3)
761- Popup menu line crash corrected.
762- Handle full file names with version numbers.
763- Directory handling (CD command etc.)
764- Corrected file name conversion VMS to Unix and v.v.
765- Correct response of expand wildcards
766- Recovery is working from this version under VMS as well.
767- Improved terminal and signal handing.
768- Improved OS_VMS.TXT
769
770Version 5.4 (1999 Sep 9)
771- Cut and paste mismatch corrected.
772- Motif directories during open and save are corrected.
773
774Version 5.3 (1998 Oct 12)
775- Minor changes in the code
776- Standard distribution with +GUI option
777
778Version 5.1 (1998 Apr 21)
779- Syntax and DEC C changes in the code
780- Fixing problems with the /doc subdirectory
781- Improve OS_VMS.MMS
782
783Version 4.5 (1996 Dec 16)
784- First VMS port by Henk Elbers <henk@xs4all.nl>
785
786==============================================================================
787
78810. Authors *vms-authors*
789
790OpenVMS documentation and executables are maintained by:
791Zoltan Arpadffy <arpadffy@polarhome.com>
792
793This document uses parts and remarks from earlier authors and contributors
794of OS_VMS.TXT:
795 Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
796 Bruce Hunsaker <BNHunsaker@chq.byu.edu>
797 Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
798
799 vim:tw=78:ts=8:ft=help:norl: