blob: 8bb1b1c37d6e3d4c56b53ce2b2216ef5e32d2ae3 [file] [log] [blame]
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00001*os_vms.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
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
50 vim-XX-exe-alpha-gui.zip Alpha GUI/Motif executables
51 vim-XX-exe-alpha-gtk.zip Alpha GUI/GTK executables
52 vim-XX-exe-alpha-term.zip Alpha console executables
53 vim-XX-exe-vax-gui.zip VAX GUI executables
54 vim-XX-exe-vax-term.zip VAX console executables
55
56and of course
57 vim-XX-runtime.zip runtime files
58
59The binary archives contain: vim.exe, ctags.exe, xxd.exe, mms_vim.exe files.
60
61==============================================================================
62
633. Compiling *vms-compiling*
64
65See the file [.SRC]INSTALLVMS.TXT.
66
67==============================================================================
68
694. Problems *vms-problems*
70
71The code has been tested under Open VMS 6.2 - 7.3 on Alpha and VAX platforms
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000072with the DEC C compiler. It should work without bigger problems.
73If your system does not have some include libraries you can tune up in
74OS_VMS_CONF.H file.
Bram Moolenaar071d4272004-06-13 20:20:40 +000075
76If you decided to build Vim with +perl, +python, etc. options, first you need
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000077to download OpenVMS distributions of Perl and Python. Build and deploy the
78libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
79a problem from Vim side.
Bram Moolenaar071d4272004-06-13 20:20:40 +000080
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000081Note: Under VAX it should work with the DEC C compiler without problems. The
82VAX C compiler is not fully ANSI C compatible in pre-processor directives
83semantics, therefore you have to use a converter program what will do the lion
84part of the job. For detailed instructions read file INSTALLvms.txt
Bram Moolenaar071d4272004-06-13 20:20:40 +000085
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000086MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
Bram Moolenaar071d4272004-06-13 20:20:40 +000087change to subdirectory and build it separately.
88
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000089CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
90specific source might contain CTAGS source files as described above.
Bram Moolenaar071d4272004-06-13 20:20:40 +000091You can find more information about CTAGS on VMS at
92http://www.polarhome.com/ctags/
93
94Advanced users may try some acrobatics in FEATURE.H file also.
95
96It is possible to compile with +xfontset +xim options too, but then you have
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000097to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
Bram Moolenaar071d4272004-06-13 20:20:40 +000098
99You may want to use GUI with GTK icons, then you have to download and install
100GTK for OpenVMS or at least runtime shareable images - LIBGTK from
101polarhome.com
102
103For more advanced questions, please send your problem to Vim on VMS mailing
104list <vim-vms@polarhome.com>
105More about the vim-vms list can be found at:
106http://www.polarhome.com/mailman/listinfo/vim-vms
107
108==============================================================================
109
1105. Deploy *vms-deploy*
111
112Vim uses a special directory structure to hold the document and runtime files:
113
114 vim (or wherever)
115 |- tmp
116 |- vim57
117 |----- doc
118 |----- syntax
119 |- vim60
120 |----- doc
121 |----- syntax
122 |- vim61
123 |----- doc
124 |----- syntax
125 vimrc (system rc files)
126 gvimrc
127
128Use: >
129
130 define/nolog VIM device:[path.vim]
131 define/nolog VIMRUNTIME device:[path.vim.vim60]
132 define/nolog TMP device:[path.tmp]
133
134to get vim.exe to find its document, filetype, and syntax files, and to
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000135specify a directory where temporary files will be located. Copy the "runtime"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136subdirectory of the vim distribution to vimruntime.
137
138Logicals $VIMRUNTIME and $TMP are optional.
139
140If $VIMRUNTIME is not set, Vim will guess and try to set up automatically.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000141Read more about it at :help runtime
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142
143If $TMP is not set, you will not be able to use some functions as CTAGS,
144XXD, printing etc. that use temporary directory for normal operation.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000145The $TMP directory should be readable and writable by the user(s).
146The easiest way to set up $TMP is to define a logical: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000147
148 define/nolog TMP SYS$SCRATCH
149or as: >
150 define/nolog TMP SYS$LOGIN
151
152==============================================================================
153
1546. Practical usage *vms-usage*
155
156Usually, you want to run just one version of Vim on your system, therefore
157it is enough to dedicate one directory for Vim.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000158Copy the whole Vim runtime directory structure to the deployment position.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000160Set up the logical $VIM as: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000161
162 $ define VIM device:<path>
163
164Set up some symbols: >
165
166 $ ! vi starts Vim in chr. mode.
167 $ vi*m :== mcr VIM:VIM.EXE
168
169 $ !gvi starts Vim in GUI mode.
170 $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
171
172Please, check the notes for customization and configuration of symbols.
173
174You may want to create .vimrc and .gvimrc files in your home directory
175(SYS$LOGIN) to overwrite default settings.
176
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000177The easiest way is just rename example files. You may leave the menu file
178(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
179be default setup for all users, and for users it is enough just to have their
180own additions or resetting in their home directory in files .vimrc and .gvimrc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181It should work without problems.
182
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000183Note: Remember, system rc files (default for all users) don't have a leading
184".". So, system rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000185
186 $VIM:vimrc
187 $VIM:gvimrc
188 $VIM:menu.vim
189
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000190and user customized rc files are: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191
192 sys$login:.vimrc
193 sys$login:.gvimrc
194
195You can check that everything is on the right place with the :version command.
196
197Example LOGIN.COM: >
198
199 $ define/nolog VIM RF10:[UTIL.VIM]
200 $ vi*m :== mcr VIM:VIM.EXE
201 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
202 $ set disp/create/node=192.168.5.223/trans=tcpip
203
204Note: This set-up should be enough, if you are working on standalone server or
205clustered environment, but if you want to use Vim as internode editor in
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000206DECNET environment, it will satisfy as well.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000207You just have to define the "whole" path: >
208
209 $ define VIM "<server_name>[""user password""]::device:<path>"
210 $ vi*m :== "mcr VIM:VIM.EXE"
211
212as for example: >
213
214 $ define VIM "PLUTO::RF10:[UTIL.VIM]"
215 $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
216
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000217You can also use the $VIMRUNTIME logical to point to the proper version of Vim
218if you have installed more versions at the same time. If $VIMRUNTIME is not
219defined Vim will borrow its value from the $VIM logical. You can find more
220information about the $VIMRUNTIME logical by typing :help runtime as a Vim
221command.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222
223System administrators might want to set up a system wide Vim installation,
224then add to the SYS$STARTUP:SYLOGICALS.COM >
225
226 $ define/nolog/sys VIM device:<path>
227 $ define/nolog/sys TMP SYS$SCRATCH
228
229and to the SYS$STARTUP:SYLOGIN.COM >
230
231 $ vi*m :== mcr VIM:VIM.EXE
232 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
233
234
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000235It will set up a normal Vim work environment for every user on the system.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000236
237==============================================================================
238
2397. GUI mode questions *vms-gui*
240
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000241OpenVMS is a real mainframe OS, therefore even if it has a GUI console, most
242of the users do not use a native X/Window environment during normal operation.
243It is not possible to start Vim in GUI mode "just like that". But anyhow it
244is not too complicated either.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000245
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000246First of all: you will need an executable that is built with the GUI enabled.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247
248Second: you need to have installed DECW/Motif on your VMS server, otherwise
249you will get errors that some shareable libraries are missing.
250
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000251Third: If you choose to run Vim with extra features such as GUI/GTK then you
252need a GTK installation too or at least a GTK runtime environment (LIBGTK
253etc.).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254
2551) If you are working on the VMS X/Motif console:
256 Start Vim with the command: >
257
258 $ mc device:<path>VIM.EXE -g
259<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000260 or type :gui as a command to the Vim command prompt. For more info :help
261 gui
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00002632) If you are working on some other X/Window environment like Unix or a remote
264 X VMS console. Set up display to your host with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000265
266 $ set disp/create/node=<your IP address>/trans=<transport-name>
267<
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000268 and start Vim as in point 1. You can find more help in VMS documentation or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269 type: help set disp in VMS prompt.
270 Examples: >
271
272 $ set disp/create/node=192.168.5.159 ! default trans is DECnet
273 $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
274 $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
275
276Note: you should define just one of these.
277For more information type $help set disp in VMS prompt.
278
2793) Another elegant solution is XDM if you have installed on OpenVMS box.
280 It is possible to work from XDM client as from GUI console.
281
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00002824) If you are working on MS-Windows or some other non X/Window environment
283 you need to set up one X server and run Vim as in point 2.
284 For MS-Windows there are available free X servers as MIX , Omni X etc.,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000285 as well as excellent commercial products as eXcursion or ReflectionX with
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000286 built-in DEC support.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000287
288Please note, that executables without GUI are slightly faster during startup
289then with enabled GUI in character mode. Therefore, if you do not use GUI
290features, it is worth to choose non GUI executables.
291
292==============================================================================
293
2948. Useful notes *vms-notes*
295
2968.1 backspace/delete
2978.2 Filters
2988.3 VMS file version numbers
2998.4 Directory conversion
3008.5 Remote host invocation
3018.6 Terminal problems
3028.7 Hex-editing and other external tools
3038.8 Sourcing vimrc and gvimrc
3048.9 Printing from Vim
3058.10 Setting up the symbols
3068.11 diff and other GNU programs
3078.12 diff-mode
3088.13 Allow '$' in C keywords
3098.14 VIMTUTOR for beginners
310
3118.1 backspace/delete
312
313There are backspace/delete key inconsistencies with VMS.
314:fixdel doesn't do the trick, but the solution is: >
315
316 :inoremap ^? ^H " for terminal mode
317 :inoremap <Del> ^H " for gui mode
318
319Read more in ch: 8.6 (Terminal problems).
320(Bruce Hunsaker <BNHunsaker@chq.byu.edu> Vim 5.3)
321
322
3238.2 Filters
324
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000325Vim supports filters, i.e., if you have a sort program that can handle
Bram Moolenaar071d4272004-06-13 20:20:40 +0000326input/output redirection like Unix (<infile >outfile), you could use >
327
328 :map \s 0!'aqsort<CR>
329
330(Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> Vim 5.4)
331
332
3338.3 VMS file version numbers
334
335Vim is saving files into a new file with the next higher file version
336number, try these settings. >
337
338 :set nobackup " does not create *.*_ backup files
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000339 :set nowritebackup " does not have any purpose on VMS. It's the
340 " default.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341
342Recovery is working perfect as well from the default swap file.
343Read more with :help swapfile
344
345(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000346Vim 5.6)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000347
348
3498.4 Directory conversion
350
351Vim will internally convert any unix-style paths and even mixed unix/VMS
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000352paths into VMS style paths. Some typical conversions resemble:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353
354 /abc/def/ghi -> abc:[def]ghi.
355 /abc/def/ghi.j -> abc:[def]ghi.j
356 /abc/def/ghi.j;2 -> abc:[def]ghi.j;2
357 /abc/def/ghi/jkl/mno -> abc:[def.ghi.jkl]mno.
358 abc:[def.ghi]jkl/mno -> abc:[def.ghi.jkl]mno.
359 ./ -> current directory
360 ../ -> relative parent directory
361 [.def.ghi] -> relative child directory
362 ./def/ghi -> relative child directory
363
364Note: You may use <,> brackets as well (device:<path>file.ext;version) as
365rf10:<user.zay.work>test.c;1
366
367(David Elins <delins@foliage.com>, Jerome Lauret
368<JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
369
370
3718.5 Remote host invocation
372
373It is possible to use Vim as an internode editor.
3741. Edit some file from remote node: >
375
376 vi "<server>""username passwd""::<device>:<path><filename>;<version>"
377
378example: >
379 vi "pluto""zay passwd""::RF10:<USER.ZAY.WORK>TEST.C;1"
380
381Note: syntax is very important, otherwise VMS will recognize more parameters
382instead of one (resulting with: file not found)
383
Bram Moolenaar402d2fe2005-04-15 21:00:38 +00003842. Set up Vim as your internode editor. If Vim is not installed on your
385host, just set up your IP address, the full Vim path including the server name
386and run the command procedure below: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000387
388 $ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
389 $ set disp/create/node=<your_IP_here>/trans=tcpip
390 $ define "VIM "<vim_server>""''p1' ''p2'""::<device>:<vim_path>"
391 $ vi*m :== "mcr VIM:VIM.EXE"
392 $ gv*im :== "spawn/nowait mcr VIM:VIM.EXE -g"
393 $ goto end
394 $ usage:
395 $ write sys$output " Please enter username and password as a parameter."
396 $ write sys$output " Example: @SETVIM.COM username passwd"
397 $ end:
398
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000399Note: Never use it in a clustered environment (you do not need it), loading
400could be very-very slow, but even faster then a local Emacs. :-)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401
402(Zoltan Arpadffy, Vim 5.6)
403
404
4058.6 Terminal problems
406
407If your terminal name is not known to Vim and it is trying to find the default
408one you will get the following message during start-up:
409---
410Terminal entry not found in termcap
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000411'unknown-terminal' not known. Available built-in terminals are:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000412 builtin_gui
413 builtin_riscos
414 builtin_amiga
415 builtin_beos-ansi
416 builtin_ansi
417 builtin_vt320
418 builtin_vt52
419 builtin_pcansi
420 builtin_win32
421 builtin_xterm
422 builtin_iris-ansi
423 builtin_debug
424 builtin_dumb
425defaulting to 'vt320'
426---
427The solution is to define default terminal name: >
428
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000429 $ ! unknown terminal name. Let us use vt320 or ansi instead.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000430 $ ! Note: it's case sensitive
431 $ define term "vt320"
432
433Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000434keyboard mappings. They should work perfect as they are, including arrows,
435Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000436.gvimrc: >
437
438 inoremap <Del> <BS>
439
440Vim will also recognize that they are fast terminals.
441
442If you have some annoying line jumping on the screen between windows add to
443your .vimrc file: >
444
445 set ttyfast " set fast terminal
446
447Note: if you're using Vim on remote host or through very slow connection, it's
448recommended to avoid fast terminal option with: >
449
450 set nottyfast " set terminal to slow mode
451
452(Zoltan Arpadffy, Vim 5.6)
453
454
4558.7 Hex-editing and other external tools
456
457A very important difference between OpenVMS and other systems is that VMS uses
458special commands to execute executables: >
459
460 RUN <path>filename
461 MCR <path>filename <parameters>
462
463OpenVMS users always have to be aware that the Vim command :! "just" drop them
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000464to DCL prompt. This feature is possible to use without any problem with all
Bram Moolenaar071d4272004-06-13 20:20:40 +0000465DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000466we're running into trouble if we follow the Vim documentation (see: help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467xxd).
468
469Solution: Execute with the MC command and add the full path to the executable.
470Example: Instead of :%!xxd command use: >
471
472 :%!mc vim:xxd
473
474... or in general: >
475 :!mc <path>filename <parameters>
476
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000477Note: You can use XXD and CTAGS from GUI menu.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000478
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000479To customize ctags it is possible to define the logical $CTAGS with standard
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480parameters as: >
481
482 define/nolog CTAGS "--totals -o sys$login:tags"
483
484For additional information, please read :help tagsearch and CTAGS
485documentation at http://ctags.sourceforge.net/ctags.html.
486
487(Zoltan Arpadffy, Vim 5.6-70)
488
489
4908.8 Sourcing vimrc and gvimrc
491
492If you want to use your .vimrc and .gvimrc from other platforms (e.g. Windows)
493you can get in trouble if you ftp that file(s): VMS has different end-of-line
494indication.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000495The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496>
497 :so sys$login:.vimrc
498
499One trick is to compress (e.g. zip) the files on the other platform and
500uncompress it on VMS; if you have the same symptom, try to create the files
501with copy-paste (for this you need both op. systems reachable from one
502machine, e.g. an Xterm on Windows or telnet to Windows from VMS).
503
504(Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> Vim 6.0a)
505
506
5078.9 Printing from Vim
508
509To be able to print from Vim (running in GUI mode) under VMS you have to set
510up $TMP logical which should point to some temporary directory and logical
511SYS$PRINT to your default print queue.
512Example: >
513
514 $define SYS$PRINT HP5ANSI
515
516You can print out whole buffer or just the marked area.
517More info under :help hardcopy
518
519(Zoltan Arpadffy, Vim 6.0c)
520
521
5228.10 Setting up the symbols
523
524When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits.
525I now use a different symbol that seems to work OK and fixes the problem.
526I suggest this instead: >
527
528 $ GV*IM:==SPAWN/NOWAIT/INPUT=NLA0: MCR VIM:VIM.EXE -G -GEOMETRY 80X40
529
530The /INPUT=NLA0: separates the standard input of the gvim process from the
531parent terminal, to block signals from the parent window.
532Without the -GEOMETRY, the GVIM window size will be minimal and the menu
533will be confused after a window-resize.
534
535(Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac)
536
537
5388.11 diff and other GNU programs
539
540From 6.0 diff functionality has been implemented, but OpenVMS does not use
541GNU/Unix like diff therefore built in diff does not work.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000542There is a simple solution to solve this anomaly. Install a Unix like diff
543and Vim will work perfect in diff mode too. You just have to redefine your
Bram Moolenaar071d4272004-06-13 20:20:40 +0000544diff program as: >
545
546 define /nolog diff <GNU_PATH>diff.exe
547
548Another, more sophisticated solution is described below (8.12 diff-mode)
549There are some other programs as patch, make etc that may cause same problems.
550At www.polarhome.com is possible to download an GNU package for Alpha and VAX
551boxes that is meant to solve GNU problems on OpenVMS.
552( Zoltan Arpadffy, Vim 6.1)
553
554
5558.12 diff-mode
556
557Vim 6.0 and higher supports vim diff-mode (See |new-diff-mode|, |diff-mode|
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000558and |08.7|). This uses the external program 'diff' and expects a Unix-like
559output format from diff. The standard VMS diff has a different output
560format. To use vim on VMS in diff-mode, you need to:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561 1 Install a Unix-like diff program, e.g. GNU diff
562 2 Tell vim to use the Unix-like diff for diff-mode.
563
564You can download GNU diff from the VIM-VMS website, it is one of the GNU
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000565tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566unpack it in a separate directory "GNU" and create a logical GNU: that
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000567points to that directory, e.g: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000568
569 DEFINE GNU <DISK>:[<DIRECTORY>.BIN.GNU]
570
571You may also want to define a symbol GDIFF, to use the GNU diff from the DCL
572prompt: >
573
574 GDIFF :== $GNU:DIFF.EXE
575
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000576Now you need to tell vim to use the new diff program. Take the example
Bram Moolenaar071d4272004-06-13 20:20:40 +0000577settings from |diff-diffexpr| and change the call to the external diff
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000578program to the new diff on VMS. Add this to your .vimrc file: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000579
580 " Set up vimdiff options
581 if v:version >= 600
582 " Use GNU diff on VMS
583 set diffexpr=MyDiff()
584 function MyDiff()
585 let opt = ""
586 if &diffopt =~ "icase"
587 let opt = opt . "-i "
588 endif
589 if &diffopt =~ "iwhite"
590 let opt = opt . "-b "
591 endif
592 silent execute "!mc GNU:diff.exe -a " . opt . v:fname_in . " " . v:fname_new .
593 \ " > " . v:fname_out
594 endfunction
595 endif
596
597You can now use vim in diff-mode, e.g. to compare two files in read-only
598mode: >
599
600 $ VIM -D/R <FILE1> <FILE2>
601
602You can also define new symbols for vimdiff, e.g.: >
603
604 $ VIMDIFF :== 'VIM' -D/R
605 $ GVIMDIFF :== 'GVIM' -D/R
606
607You can now compare files in 4 ways: >
608
609 1. VMS diff: $ DIFF <FILE1> <FILE2>
610 2. GNU diff: $ GDIFF <FILE1> <FILE2>
611 3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
612 4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
613
614( Coen Engelbarts, Vim 6.1)
615
616
6178.13 Allow '$' in C keywords
618
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000619DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
620and vim recognises the '$' as the end of the identifier. You can change this
Bram Moolenaar071d4272004-06-13 20:20:40 +0000621with the |iskeyword|command.
622Add this command to your .vimrc file: >
623
624 autocmd FileType c,cpp,cs set iskeyword+=$
625
626You can also create the file(s) $VIM/FTPLUGIN/C.VIM (and/or CPP.VIM and
627CS.VIM) and add this command: >
628
629 set iskeyword+=$
630
631Now word-based commands, e.g. the '*'-search-command and the CTRL-]
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000632tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
Bram Moolenaar071d4272004-06-13 20:20:40 +0000633C keywords since ctags version 5.1.)
634
635( Coen Engelbarts, Vim 6.1)
636
6378.14 VIMTUTOR for beginners
638
639It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000640first steps with Vim on OpenVMS. Depending of binary distribution you may
641start it with: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000642
643 @vim:vimtutor
644
645(Thomas.R.Wyant III, Vim 6.1)
646
647==============================================================================
648
6499. VMS related changes *vms-changes*
650
651Version 6.3 (2004 May 10)
652- Improved vms_read function
653- CTAGS v5.5.4 included
654- Documentation corrected and updated
655
656Version 6.2 (2003 May 7)
657- Corrected VMS system call results
658- Low level character input is rewritten
659- Correction in tag and quickfix handling
660- First GTK build
661- Make file changes
662 - GTK feature added
663 - Define for OLD_VMS
664 - OpenVMS version 6.2 or older
665- Documentation updated with GTK features
666- CTAGS v5.5 included
667- VMS VIM tutor created
668
669Version 6.1 (2002 Mar 25)
670- TCL init_tcl() problem fixed
671- CTAGS v5.4 included
672- GNU tools binaries for OpenVMS
673- Make file changes
674 - PERL, PYTHON and TCL support improved
675 - InstallVMS.txt has a detailed description HOWTO build
676- VMS/Unix file handling rewritten
677- Minor casting and bug fixes
678
679Version 6.0 (2001 Sep 28)
680- Unix and VMS code has been merged
681 - separated "really" VMS related code
682 - included all possible Unix functionality
683 - simplified or deleted the configuration files
684 - makefile MAKE_VMS.MMS reviewed
685- menu changes (fixed printing, CTAGS and XXD usage)
686- fixed variable RMS record format handling anomaly
687- corrected syntax, ftplugin etc files load
688- changed expand_wildcards and expandpath functions to work more general
689- created OS_VMS_FILTER.COM - DECC->VAXC pre-processor directive convert
690 script.
691- Improved code's VAXC and new DECC compilers compatibility
692- changed quickfix parameters:
693 - errormessage format to suite DECC
694 - search, make and other commands to suite VMS system
695- updated and renamed MMS make files for Vim and CTAGS.
696- CTAGS has been removed from source distribution of Vim but it will remain
697 in OpenVMS binary distributions.
698- simplified build/configuration procedure
699- created INSTALLvms.txt - detailed compiling instructions under VMS.
700- updated test scripts.
701
702Version 5.8 (2001 Jun 1)
703- OS_VMS.TXT updated with new features.
704- other minor fixes.
705- documentation updated
706- this version had been tested much more than any other OpenVMS version
707 earlier
708
709Version 5.7 (2000 Jun 24)
710- New CTAGS v5.0 in distribution
711- Documentation updated
712
713Version 5.6 (2000 Jan 17)
714- VMS filename related changes:
715 - version handling (open everything, save to new version)
716 - correct file extension matching for syntax (version problem)
717 - handle <,> characters and passwords in directory definition
718 - handle internode/remote invocation and editing with passwords
719 - OpenVMS files will be treated case insensitive from now
720 - corrected response of expand("%:.") etc path related functions
721 (in one word: VMS directory handling internally)
722- version command
723 - corrected (+,-) information data
724 - added compiler and OS version
725 - added user and host information
726 - resolving $VIM and $VIMRUNTIME logicals
727- VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2.
728 - enabled farsi, rightleft etc. features
729 - undo level raised up to 1000
730- Updated OS_VMS.MMS file.
731 - maximum features ON is default
732 - Vim is compilable with +perl, +python and +tcl features.
733 - improved MMK compatibility
734- Created MAKEFILE_VMS.MMS, makefile for testing Vim during development.
735- Defined DEC terminal VT320
736 - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals
737 backwards, but not VT340 and newer with colour capability.
738 - VT320 is default terminal for OpenVMS
739 - these new terminals are also fast ttys (default for OpenVMS).
740 - allowed dec_mouse ttym
741- Updated files vimrc and gvimrc with VMS specific suggestions.
742- OS_VMS.TXT updated with new features.
743
744Version 5.5 (1999 Dec 3)
745- Popup menu line crash corrected.
746- Handle full file names with version numbers.
747- Directory handling (CD command etc.)
748- Corrected file name conversion VMS to Unix and v.v.
749- Correct response of expand wildcards
750- Recovery is working from this version under VMS as well.
751- Improved terminal and signal handing.
752- Improved OS_VMS.TXT
753
754Version 5.4 (1999 Sep 9)
755- Cut and paste mismatch corrected.
756- Motif directories during open and save are corrected.
757
758Version 5.3 (1998 Oct 12)
759- Minor changes in the code
760- Standard distribution with +GUI option
761
762Version 5.1 (1998 Apr 21)
763- Syntax and DEC C changes in the code
764- Fixing problems with the /doc subdirectory
765- Improve OS_VMS.MMS
766
767Version 4.5 (1996 Dec 16)
768- First VMS port by Henk Elbers <henk@xs4all.nl>
769
770==============================================================================
771
77210. Authors *vms-authors*
773
774OpenVMS documentation and executables are maintained by:
775Zoltan Arpadffy <arpadffy@polarhome.com>
776
777This document uses parts and remarks from earlier authors and contributors
778of OS_VMS.TXT:
779 Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
780 Bruce Hunsaker <BNHunsaker@chq.byu.edu>
781 Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
782
783 vim:tw=78:ts=8:ft=help:norl: