48
|
1 *os_vms.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
0
|
2
|
|
3
|
|
4 VIM REFERENCE MANUAL
|
|
5
|
|
6
|
|
7 *VMS* *vms*
|
|
8 This file contains the particularities for the VMS version of Vim.
|
|
9 You can reach this information file by typing :help VMS in Vim command
|
|
10 prompt.
|
|
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|
|
|
21 10. Authors |vms-authors|
|
|
22
|
|
23 ==============================================================================
|
|
24
|
|
25 1. Getting started *vms-started*
|
|
26
|
|
27 Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every
|
|
28 operating system known to humanity. Now use Vim on OpenVMS too, in character
|
|
29 or X/Motif environment. It is fully featured and absolutely compatible with
|
|
30 Vim on other operating systems.
|
|
31
|
|
32 ==============================================================================
|
|
33
|
|
34 2. Download files *vms-download*
|
|
35
|
|
36 You can download the Vim source code by ftp from the official Vim site:
|
|
37 ftp://ftp.vim.org/pub/vim/
|
|
38 Or use one of the mirrors:
|
|
39 ftp://ftp.vim.org/pub/vim/MIRRORS
|
|
40
|
|
41 You can download precompiled executables from:
|
|
42 http://www.polarhome.com/vim/
|
|
43 ftp://ftp.polarhome.com/pub/vim/
|
|
44
|
|
45 To use the precompiled binary version, you need one of these archives:
|
|
46
|
|
47 vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
|
|
48 vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
|
|
49 vim-XX-exe-ia64-term.zip IA64 console executables
|
|
50 vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
|
|
51 vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
|
|
52 vim-XX-exe-axp-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
|
|
56 and of course (optional)
|
|
57 vim-XX-runtime.zip runtime files
|
|
58
|
|
59 The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
|
|
60
|
|
61 For GTK executables you will need GTKLIB that is available for
|
|
62 Alpha and IA64 platform.
|
|
63
|
|
64 ==============================================================================
|
|
65
|
|
66 3. Compiling *vms-compiling*
|
|
67
|
|
68 See the file [.SRC]INSTALLVMS.TXT.
|
|
69
|
|
70 ==============================================================================
|
|
71
|
|
72 4. Problems *vms-problems*
|
|
73
|
|
74 The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
|
48
|
75 platforms with the DEC C compiler. It should work without big problems.
|
0
|
76 If your system does not have some include libraries you can tune up in
|
|
77 OS_VMS_CONF.H file.
|
|
78
|
|
79 If you decided to build Vim with +perl, +python, etc. options, first you need
|
|
80 to download OpenVMS distributions of Perl and Python. Build and deploy the
|
|
81 libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
|
|
82 a problem from Vim side.
|
|
83
|
|
84 Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
|
|
85
|
|
86 Note: Under VAX it should work with the DEC C compiler without problems. The
|
|
87 VAX C compiler is not fully ANSI C compatible in pre-processor directives
|
48
|
88 semantics, therefore you have to use a converter program that will do the lion
|
0
|
89 part of the job. For detailed instructions read file INSTALLvms.txt
|
|
90
|
48
|
91 MMS_VIM.EXE is build together with VIM.EXE, but for XXD.EXE you should
|
|
92 change to a subdirectory and build it separately.
|
0
|
93
|
|
94 CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
|
|
95 specific source might contain CTAGS source files as described above.
|
|
96 You can find more information about CTAGS on VMS at
|
|
97 http://www.polarhome.com/ctags/
|
|
98
|
39
|
99 Advanced users may try some acrobatics in FEATURE.H file as well.
|
0
|
100
|
|
101 It is possible to compile with +xfontset +xim options too, but then you have
|
|
102 to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
|
|
103
|
|
104 You may want to use GUI with GTK icons, then you have to download and install
|
|
105 GTK for OpenVMS or at least runtime shareable images - LIBGTK from
|
|
106 polarhome.com
|
|
107
|
|
108 For more advanced questions, please send your problem to Vim on VMS mailing
|
|
109 list <vim-vms@polarhome.com>
|
|
110 More about the vim-vms list can be found at:
|
|
111 http://www.polarhome.com/mailman/listinfo/vim-vms
|
|
112
|
|
113 ==============================================================================
|
|
114
|
|
115 5. Deploy *vms-deploy*
|
|
116
|
|
117 Vim 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 |- vim62
|
|
125 |----- doc
|
|
126 |----- syntax
|
|
127 |- vim64
|
|
128 |----- doc
|
|
129 |----- syntax
|
|
130 vimrc (system rc files)
|
|
131 gvimrc
|
|
132
|
|
133 Use: >
|
|
134
|
|
135 define/nolog VIM device:[path.vim]
|
|
136 define/nolog VIMRUNTIME device:[path.vim.vim60]
|
|
137 define/nolog TMP device:[path.tmp]
|
|
138
|
39
|
139 To get vim.exe to find its document, filetype, and syntax files, and to
|
0
|
140 specify a directory where temporary files will be located. Copy the "runtime"
|
39
|
141 subdirectory of the Vim distribution to vimruntime.
|
0
|
142
|
|
143 Logicals $VIMRUNTIME and $TMP are optional.
|
|
144
|
|
145 If $VIMRUNTIME is not set, Vim will guess and try to set up automatically.
|
|
146 Read more about it at :help runtime
|
|
147
|
|
148 If $TMP is not set, you will not be able to use some functions as CTAGS,
|
|
149 XXD, printing etc. that use temporary directory for normal operation.
|
|
150 The $TMP directory should be readable and writable by the user(s).
|
|
151 The easiest way to set up $TMP is to define a logical: >
|
|
152
|
|
153 define/nolog TMP SYS$SCRATCH
|
|
154 or as: >
|
|
155 define/nolog TMP SYS$LOGIN
|
|
156
|
|
157 ==============================================================================
|
|
158
|
|
159 6. Practical usage *vms-usage*
|
|
160
|
|
161 Usually, you want to run just one version of Vim on your system, therefore
|
|
162 it is enough to dedicate one directory for Vim.
|
|
163 Copy the whole Vim runtime directory structure to the deployment position.
|
|
164 Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
|
|
165 Set up the logical $VIM as: >
|
|
166
|
|
167 $ define VIM device:<path>
|
|
168
|
|
169 Set 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
|
|
177 Please, check the notes for customization and configuration of symbols.
|
|
178
|
|
179 You may want to create .vimrc and .gvimrc files in your home directory
|
|
180 (SYS$LOGIN) to overwrite default settings.
|
|
181
|
|
182 The 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
|
48
|
184 be the default setup for all users, and for users it is enough to just have
|
|
185 their own additions or resetting in their home directory in files .vimrc and
|
|
186 .gvimrc. It should work without problems.
|
0
|
187
|
|
188 Note: Remember, system rc files (default for all users) don't have a leading
|
|
189 ".". So, system rc files are: >
|
|
190
|
|
191 $VIM:vimrc
|
|
192 $VIM:gvimrc
|
|
193 $VIM:menu.vim
|
|
194
|
|
195 and user customized rc files are: >
|
|
196
|
|
197 sys$login:.vimrc
|
|
198 sys$login:.gvimrc
|
|
199
|
48
|
200 You can check that everything is at the right place with the :version command.
|
0
|
201
|
|
202 Example 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
|
48
|
209 Note: This set-up should be enough, if you are working on a standalone server or
|
|
210 clustered environment, but if you want to use Vim as an internode editor in
|
0
|
211 DECNET environment, it will satisfy as well.
|
|
212 You 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
|
48
|
217 For example: >
|
0
|
218
|
|
219 $ define VIM "PLUTO::RF10:[UTIL.VIM]"
|
|
220 $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
|
|
221
|
|
222 You can also use the $VIMRUNTIME logical to point to the proper version of Vim
|
|
223 if you have installed more versions at the same time. If $VIMRUNTIME is not
|
|
224 defined Vim will borrow its value from the $VIM logical. You can find more
|
|
225 information about the $VIMRUNTIME logical by typing :help runtime as a Vim
|
|
226 command.
|
|
227
|
|
228 System administrators might want to set up a system wide Vim installation,
|
|
229 then add to the SYS$STARTUP:SYLOGICALS.COM >
|
|
230
|
|
231 $ define/nolog/sys VIM device:<path>
|
|
232 $ define/nolog/sys TMP SYS$SCRATCH
|
|
233
|
39
|
234 And to the SYS$STARTUP:SYLOGIN.COM >
|
0
|
235
|
|
236 $ vi*m :== mcr VIM:VIM.EXE
|
|
237 $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
|
|
238
|
|
239
|
|
240 It will set up a normal Vim work environment for every user on the system.
|
|
241
|
|
242 IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line
|
|
243 parameters are assumed to be lowercase. In order to indicate that a command
|
|
244 line parameter is uppercase "/" sign must be used.
|
|
245
|
|
246 Examples:
|
|
247 >
|
|
248 vim -R filename ! means: -r List swap files and exit
|
|
249 vim -/r filename ! means: -R Readonly mode (like "view")
|
|
250 vim -u <vimrc> ! means: -u Use <vimrc> instead of any .vimrc
|
|
251 vim -/u <gvimrc> ! means: -U Use <gvimrc> instead of any .gvimrc
|
|
252
|
|
253 ==============================================================================
|
|
254
|
|
255 7. GUI mode questions *vms-gui*
|
|
256
|
|
257 OpenVMS is a real mainframe OS, therefore even if it has a GUI console, most
|
|
258 of the users do not use a native X/Window environment during normal operation.
|
|
259 It is not possible to start Vim in GUI mode "just like that". But anyhow it
|
|
260 is not too complicated either.
|
|
261
|
|
262 First of all: you will need an executable that is built with the GUI enabled.
|
|
263
|
|
264 Second: you need to have installed DECW/Motif on your VMS server, otherwise
|
|
265 you will get errors that some shareable libraries are missing.
|
|
266
|
|
267 Third: If you choose to run Vim with extra features such as GUI/GTK then you
|
|
268 need a GTK installation too or at least a GTK runtime environment (LIBGTK
|
|
269 can be downloaded from http://www.polarhome.com/vim/).
|
|
270
|
|
271 1) If you are working on the VMS X/Motif console:
|
|
272 Start Vim with the command: >
|
|
273
|
|
274 $ mc device:<path>VIM.EXE -g
|
|
275 <
|
|
276 or type :gui as a command to the Vim command prompt. For more info :help
|
|
277 gui
|
|
278
|
|
279 2) If you are working on some other X/Window environment like Unix or a remote
|
|
280 X VMS console. Set up display to your host with: >
|
|
281
|
|
282 $ set disp/create/node=<your IP address>/trans=<transport-name>
|
|
283 <
|
|
284 and start Vim as in point 1. You can find more help in VMS documentation or
|
|
285 type: help set disp in VMS prompt.
|
|
286 Examples: >
|
|
287
|
|
288 $ set disp/create/node=192.168.5.159 ! default trans is DECnet
|
|
289 $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
|
|
290 $ set disp/create/node=192.168.5.159/trans=local ! display on the same node
|
|
291
|
|
292 Note: you should define just one of these.
|
|
293 For more information type $help set disp in VMS prompt.
|
|
294
|
|
295 3) Another elegant solution is XDM if you have installed on OpenVMS box.
|
|
296 It is possible to work from XDM client as from GUI console.
|
|
297
|
|
298 4) If you are working on MS-Windows or some other non X/Window environment
|
|
299 you need to set up one X server and run Vim as in point 2.
|
48
|
300 For MS-Windows there are available free X servers as MIX, Omni X etc.,
|
0
|
301 as well as excellent commercial products as eXcursion or ReflectionX with
|
|
302 built-in DEC support.
|
|
303
|
|
304 Please note, that executables without GUI are slightly faster during startup
|
48
|
305 than with enabled GUI in character mode. Therefore, if you do not use GUI
|
0
|
306 features, it is worth to choose non GUI executables.
|
|
307
|
|
308 ==============================================================================
|
|
309
|
|
310 8. Useful notes *vms-notes*
|
|
311
|
39
|
312 8.1 Backspace/delete
|
0
|
313 8.2 Filters
|
|
314 8.3 VMS file version numbers
|
|
315 8.4 Directory conversion
|
|
316 8.5 Remote host invocation
|
|
317 8.6 Terminal problems
|
|
318 8.7 Hex-editing and other external tools
|
|
319 8.8 Sourcing vimrc and gvimrc
|
|
320 8.9 Printing from Vim
|
|
321 8.10 Setting up the symbols
|
|
322 8.11 diff and other GNU programs
|
|
323 8.12 diff-mode
|
|
324 8.13 Allow '$' in C keywords
|
|
325 8.14 VIMTUTOR for beginners
|
48
|
326 8.15 Slow start in console mode issue
|
|
327 8.16 Common VIM directory - different architectures
|
0
|
328
|
39
|
329 8.1 Backspace/delete
|
0
|
330
|
|
331 There are backspace/delete key inconsistencies with VMS.
|
|
332 :fixdel doesn't do the trick, but the solution is: >
|
|
333
|
|
334 :inoremap ^? ^H " for terminal mode
|
|
335 :inoremap <Del> ^H " for gui mode
|
|
336
|
|
337 Read more in ch: 8.6 (Terminal problems).
|
|
338 (Bruce Hunsaker <BNHunsaker@chq.byu.edu> Vim 5.3)
|
|
339
|
|
340
|
|
341 8.2 Filters
|
|
342
|
|
343 Vim supports filters, i.e., if you have a sort program that can handle
|
|
344 input/output redirection like Unix (<infile >outfile), you could use >
|
|
345
|
|
346 :map \s 0!'aqsort<CR>
|
|
347
|
|
348 (Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> Vim 5.4)
|
|
349
|
|
350
|
|
351 8.3 VMS file version numbers
|
|
352
|
|
353 Vim is saving files into a new file with the next higher file version
|
|
354 number, try these settings. >
|
|
355
|
|
356 :set nobackup " does not create *.*_ backup files
|
|
357 :set nowritebackup " does not have any purpose on VMS. It's the
|
|
358 " default.
|
|
359
|
48
|
360 Recovery is working perfectly as well from the default swap file.
|
0
|
361 Read more with :help swapfile
|
|
362
|
|
363 (Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
|
|
364 Vim 5.6)
|
|
365
|
|
366
|
|
367 8.4 Directory conversion
|
|
368
|
|
369 Vim will internally convert any unix-style paths and even mixed unix/VMS
|
|
370 paths into VMS style paths. Some typical conversions resemble:
|
|
371
|
|
372 /abc/def/ghi -> abc:[def]ghi.
|
|
373 /abc/def/ghi.j -> abc:[def]ghi.j
|
|
374 /abc/def/ghi.j;2 -> abc:[def]ghi.j;2
|
|
375 /abc/def/ghi/jkl/mno -> abc:[def.ghi.jkl]mno.
|
|
376 abc:[def.ghi]jkl/mno -> abc:[def.ghi.jkl]mno.
|
|
377 ./ -> current directory
|
|
378 ../ -> relative parent directory
|
|
379 [.def.ghi] -> relative child directory
|
|
380 ./def/ghi -> relative child directory
|
|
381
|
|
382 Note: You may use <,> brackets as well (device:<path>file.ext;version) as
|
|
383 rf10:<user.zay.work>test.c;1
|
|
384
|
|
385 (David Elins <delins@foliage.com>, Jerome Lauret
|
48
|
386 <JLAURET@mail.chem.sunysb.edu> Vim 5.6)
|
0
|
387
|
|
388
|
|
389 8.5 Remote host invocation
|
|
390
|
|
391 It is possible to use Vim as an internode editor.
|
|
392 1. Edit some file from remote node: >
|
|
393
|
|
394 vi "<server>""username passwd""::<device>:<path><filename>;<version>"
|
|
395
|
39
|
396 Example: >
|
0
|
397 vi "pluto""zay passwd""::RF10:<USER.ZAY.WORK>TEST.C;1"
|
|
398
|
|
399 Note: syntax is very important, otherwise VMS will recognize more parameters
|
|
400 instead of one (resulting with: file not found)
|
|
401
|
|
402 2. Set up Vim as your internode editor. If Vim is not installed on your
|
|
403 host, just set up your IP address, the full Vim path including the server name
|
|
404 and run the command procedure below: >
|
|
405
|
|
406 $ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
|
|
407 $ set disp/create/node=<your_IP_here>/trans=tcpip
|
|
408 $ define "VIM "<vim_server>""''p1' ''p2'""::<device>:<vim_path>"
|
|
409 $ vi*m :== "mcr VIM:VIM.EXE"
|
|
410 $ gv*im :== "spawn/nowait mcr VIM:VIM.EXE -g"
|
|
411 $ goto end
|
|
412 $ usage:
|
|
413 $ write sys$output " Please enter username and password as a parameter."
|
|
414 $ write sys$output " Example: @SETVIM.COM username passwd"
|
|
415 $ end:
|
|
416
|
|
417 Note: Never use it in a clustered environment (you do not need it), loading
|
39
|
418 could be very-very slow, but even faster than a local Emacs. :-)
|
0
|
419
|
|
420 (Zoltan Arpadffy, Vim 5.6)
|
|
421
|
|
422
|
|
423 8.6 Terminal problems
|
|
424
|
|
425 If your terminal name is not known to Vim and it is trying to find the default
|
|
426 one you will get the following message during start-up:
|
|
427 ---
|
|
428 Terminal entry not found in termcap
|
|
429 'unknown-terminal' not known. Available built-in terminals are:
|
|
430 builtin_gui
|
|
431 builtin_riscos
|
|
432 builtin_amiga
|
|
433 builtin_beos-ansi
|
|
434 builtin_ansi
|
|
435 builtin_vt320
|
|
436 builtin_vt52
|
|
437 builtin_pcansi
|
|
438 builtin_win32
|
|
439 builtin_xterm
|
|
440 builtin_iris-ansi
|
|
441 builtin_debug
|
|
442 builtin_dumb
|
|
443 defaulting to 'vt320'
|
|
444 ---
|
48
|
445 The solution is to define the default terminal name: >
|
0
|
446
|
|
447 $ ! unknown terminal name. Let us use vt320 or ansi instead.
|
|
448 $ ! Note: it's case sensitive
|
|
449 $ define term "vt320"
|
|
450
|
48
|
451 Terminals from VT100 to VT320 (as V300, VT220, VT200) do not need any extra
|
|
452 keyboard mappings. They should work perfectly as they are, including arrows,
|
0
|
453 Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
|
|
454 .gvimrc: >
|
|
455
|
|
456 inoremap <Del> <BS>
|
|
457
|
|
458 Vim will also recognize that they are fast terminals.
|
|
459
|
|
460 If you have some annoying line jumping on the screen between windows add to
|
|
461 your .vimrc file: >
|
|
462
|
|
463 set ttyfast " set fast terminal
|
|
464
|
48
|
465 Note: if you're using Vim on remote host or through a very slow connection, it's
|
|
466 recommended to avoid the fast terminal option with: >
|
0
|
467
|
|
468 set nottyfast " set terminal to slow mode
|
|
469
|
|
470 (Zoltan Arpadffy, Vim 5.6)
|
|
471
|
|
472
|
|
473 8.7 Hex-editing and other external tools
|
|
474
|
|
475 A very important difference between OpenVMS and other systems is that VMS uses
|
|
476 special commands to execute executables: >
|
|
477
|
|
478 RUN <path>filename
|
|
479 MCR <path>filename <parameters>
|
|
480
|
|
481 OpenVMS users always have to be aware that the Vim command :! "just" drop them
|
|
482 to DCL prompt. This feature is possible to use without any problem with all
|
48
|
483 DCL commands, but if we want to execute some programs such as XXD, CTAGS, JTAGS,
|
|
484 etc. we're running into trouble if we follow the Vim documentation (see: help
|
0
|
485 xxd).
|
|
486
|
|
487 Solution: Execute with the MC command and add the full path to the executable.
|
|
488 Example: Instead of :%!xxd command use: >
|
|
489
|
|
490 :%!mc vim:xxd
|
|
491
|
|
492 ... or in general: >
|
|
493 :!mc <path>filename <parameters>
|
|
494
|
|
495 Note: You can use XXD and CTAGS from GUI menu.
|
|
496
|
|
497 To customize ctags it is possible to define the logical $CTAGS with standard
|
|
498 parameters as: >
|
|
499
|
|
500 define/nolog CTAGS "--totals -o sys$login:tags"
|
|
501
|
|
502 For additional information, please read :help tagsearch and CTAGS
|
|
503 documentation at http://ctags.sourceforge.net/ctags.html.
|
|
504
|
|
505 (Zoltan Arpadffy, Vim 5.6-70)
|
|
506
|
|
507
|
|
508 8.8 Sourcing vimrc and gvimrc
|
|
509
|
|
510 If you want to use your .vimrc and .gvimrc from other platforms (e.g. Windows)
|
|
511 you can get in trouble if you ftp that file(s): VMS has different end-of-line
|
|
512 indication.
|
|
513 The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say:
|
|
514 >
|
|
515 :so sys$login:.vimrc
|
|
516
|
|
517 One trick is to compress (e.g. zip) the files on the other platform and
|
|
518 uncompress it on VMS; if you have the same symptom, try to create the files
|
|
519 with copy-paste (for this you need both op. systems reachable from one
|
|
520 machine, e.g. an Xterm on Windows or telnet to Windows from VMS).
|
|
521
|
|
522 (Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> Vim 6.0a)
|
|
523
|
|
524
|
|
525 8.9 Printing from Vim
|
|
526
|
|
527 To be able to print from Vim (running in GUI mode) under VMS you have to set
|
|
528 up $TMP logical which should point to some temporary directory and logical
|
|
529 SYS$PRINT to your default print queue.
|
|
530 Example: >
|
|
531
|
|
532 $define SYS$PRINT HP5ANSI
|
|
533
|
48
|
534 You can print out the whole buffer or just the marked area.
|
0
|
535 More info under :help hardcopy
|
|
536
|
|
537 (Zoltan Arpadffy, Vim 6.0c)
|
|
538
|
|
539
|
|
540 8.10 Setting up the symbols
|
|
541
|
|
542 When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits.
|
|
543 I now use a different symbol that seems to work OK and fixes the problem.
|
|
544 I suggest this instead: >
|
|
545
|
|
546 $ GV*IM:==SPAWN/NOWAIT/INPUT=NLA0: MCR VIM:VIM.EXE -G -GEOMETRY 80X40
|
|
547
|
|
548 The /INPUT=NLA0: separates the standard input of the gvim process from the
|
|
549 parent terminal, to block signals from the parent window.
|
|
550 Without the -GEOMETRY, the GVIM window size will be minimal and the menu
|
|
551 will be confused after a window-resize.
|
|
552
|
|
553 (Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac)
|
|
554
|
|
555
|
|
556 8.11 diff and other GNU programs
|
|
557
|
|
558 From 6.0 diff functionality has been implemented, but OpenVMS does not use
|
|
559 GNU/Unix like diff therefore built in diff does not work.
|
|
560 There is a simple solution to solve this anomaly. Install a Unix like diff
|
48
|
561 and Vim will work perfectly in diff mode too. You just have to redefine your
|
0
|
562 diff program as: >
|
|
563
|
|
564 define /nolog diff <GNU_PATH>diff.exe
|
|
565
|
|
566 Another, more sophisticated solution is described below (8.12 diff-mode)
|
48
|
567 There are other programs such as patch, make etc that may cause the same
|
|
568 problems. At www.polarhome.com is possible to download an GNU package for
|
|
569 Alpha and VAX boxes that is meant to solve GNU problems on OpenVMS.
|
|
570 (Zoltan Arpadffy, Vim 6.1)
|
0
|
571
|
|
572
|
|
573 8.12 diff-mode
|
|
574
|
39
|
575 Vim 6.0 and higher supports Vim diff-mode (See |new-diff-mode|, |diff-mode|
|
0
|
576 and |08.7|). This uses the external program 'diff' and expects a Unix-like
|
|
577 output format from diff. The standard VMS diff has a different output
|
39
|
578 format. To use Vim on VMS in diff-mode, you need to:
|
0
|
579 1 Install a Unix-like diff program, e.g. GNU diff
|
39
|
580 2 Tell Vim to use the Unix-like diff for diff-mode.
|
0
|
581
|
|
582 You can download GNU diff from the VIM-VMS website, it is one of the GNU
|
|
583 tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
|
|
584 unpack it in a separate directory "GNU" and create a logical GNU: that
|
|
585 points to that directory, e.g: >
|
|
586
|
|
587 DEFINE GNU <DISK>:[<DIRECTORY>.BIN.GNU]
|
|
588
|
|
589 You may also want to define a symbol GDIFF, to use the GNU diff from the DCL
|
|
590 prompt: >
|
|
591
|
|
592 GDIFF :== $GNU:DIFF.EXE
|
|
593
|
39
|
594 Now you need to tell Vim to use the new diff program. Take the example
|
0
|
595 settings from |diff-diffexpr| and change the call to the external diff
|
|
596 program to the new diff on VMS. Add this to your .vimrc file: >
|
|
597
|
|
598 " Set up vimdiff options
|
|
599 if v:version >= 600
|
|
600 " Use GNU diff on VMS
|
|
601 set diffexpr=MyDiff()
|
|
602 function MyDiff()
|
|
603 let opt = ""
|
|
604 if &diffopt =~ "icase"
|
|
605 let opt = opt . "-i "
|
|
606 endif
|
|
607 if &diffopt =~ "iwhite"
|
|
608 let opt = opt . "-b "
|
|
609 endif
|
|
610 silent execute "!mc GNU:diff.exe -a " . opt . v:fname_in . " " . v:fname_new .
|
|
611 \ " > " . v:fname_out
|
|
612 endfunction
|
|
613 endif
|
|
614
|
39
|
615 You can now use Vim in diff-mode, e.g. to compare two files in read-only
|
0
|
616 mode: >
|
|
617
|
|
618 $ VIM -D/R <FILE1> <FILE2>
|
|
619
|
|
620 You can also define new symbols for vimdiff, e.g.: >
|
|
621
|
|
622 $ VIMDIFF :== 'VIM' -D/R
|
|
623 $ GVIMDIFF :== 'GVIM' -D/R
|
|
624
|
|
625 You can now compare files in 4 ways: >
|
|
626
|
|
627 1. VMS diff: $ DIFF <FILE1> <FILE2>
|
|
628 2. GNU diff: $ GDIFF <FILE1> <FILE2>
|
|
629 3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
|
|
630 4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
|
|
631
|
48
|
632 (Coen Engelbarts, Vim 6.1)
|
0
|
633
|
|
634
|
|
635 8.13 Allow '$' in C keywords
|
|
636
|
|
637 DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
|
39
|
638 and Vim recognises the '$' as the end of the identifier. You can change this
|
|
639 with the 'iskeyword' option.
|
0
|
640 Add this command to your .vimrc file: >
|
|
641
|
|
642 autocmd FileType c,cpp,cs set iskeyword+=$
|
|
643
|
|
644 You can also create the file(s) $VIM/FTPLUGIN/C.VIM (and/or CPP.VIM and
|
|
645 CS.VIM) and add this command: >
|
|
646
|
|
647 set iskeyword+=$
|
|
648
|
|
649 Now word-based commands, e.g. the '*'-search-command and the CTRL-]
|
|
650 tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
|
|
651 C keywords since ctags version 5.1.)
|
|
652
|
48
|
653 (Coen Engelbarts, Vim 6.1)
|
0
|
654
|
|
655 8.14 VIMTUTOR for beginners
|
|
656
|
48
|
657 The VIMTUTOR.COM DCL script can help Vim beginners to learn/make their first
|
|
658 steps with Vim on OpenVMS. Depending of binary distribution you may start it
|
|
659 with: >
|
0
|
660
|
|
661 @vim:vimtutor
|
|
662
|
|
663 (Thomas.R.Wyant III, Vim 6.1)
|
|
664
|
48
|
665 8.16 Slow start in console mode issue
|
39
|
666
|
|
667 As GUI/GTK Vim works equally well in console mode, many administrators
|
|
668 deploy those executables system wide.
|
|
669 Unfortunately, on a remote slow connections GUI/GTK executables behave rather
|
48
|
670 slow when user wants to run Vim just in the console mode - because of X
|
|
671 environment detection timeout.
|
39
|
672
|
|
673 Luckily, there is a simple solution for that. Administrators need to deploy
|
|
674 both GUI/GTK build and just console build executables, like below: >
|
|
675
|
|
676 |- vim73
|
|
677 |----- doc
|
48
|
678 |----- syntax
|
39
|
679 vimrc (system rc files)
|
|
680 gvimrc
|
48
|
681 gvim.exe (the renamed GUI or GTK built vim.exe)
|
|
682 vim.exe (the console only executable)
|
39
|
683
|
|
684 Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
|
685
|
|
686 $ define/nolog VIM RF10:[UTIL.VIM73] ! where you VIM directory is
|
|
687 $ vi*m :== mcr VIM:VIM.EXE
|
|
688 $ gvi*m :== mcr VIM:GVIM.EXE
|
|
689 $ ! or you can try to spawn with
|
|
690 $ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40
|
|
691
|
|
692
|
48
|
693 Like this, users that do not have X environment and want to use Vim just in
|
39
|
694 console mode can avoid performance problems.
|
|
695
|
|
696 (Zoltan Arpadffy, Vim 7.2)
|
|
697
|
|
698 8.15 Common VIM directory - different architectures
|
|
699
|
|
700 In a cluster that contains nodes with different architectures like below:
|
|
701
|
|
702 $show cluster
|
|
703 View of Cluster from system ID 11655 node: TOR 18-AUG-2008 11:58:31
|
|
704 +---------------------------------+
|
|
705 ¦ SYSTEMS ¦ MEMBERS ¦
|
|
706 +-----------------------+---------¦
|
|
707 ¦ NODE ¦ SOFTWARE ¦ STATUS ¦
|
|
708 +--------+--------------+---------¦
|
|
709 ¦ TOR ¦ VMS V7.3-2 ¦ MEMBER ¦
|
|
710 ¦ TITAN2 ¦ VMS V8.3 ¦ MEMBER ¦
|
|
711 ¦ ODIN ¦ VMS V7.3-2 ¦ MEMBER ¦
|
|
712 +---------------------------------+
|
|
713
|
|
714 It is convenient to have a common VIM directory but execute different
|
48
|
715 executables.
|
|
716 There are several solutions for this problem:
|
39
|
717
|
|
718 Solution 1. All executables in the same directory with different names
|
|
719 This is easily done with the following script that can be added
|
|
720 to the login.com or sylogin.com: >
|
|
721
|
|
722 $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
|
|
723 $ then
|
|
724 $ say "VAX platform"
|
|
725 $ vi*m:== mcr vim:VIM.EXE_VAX
|
|
726 $ endif
|
|
727 $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
|
|
728 $ then
|
|
729 $ say "ALPHA platform"
|
|
730 $ vi*m :== mcr vim:VIM.EXE_AXP
|
|
731 $ endif
|
|
732 $ if f$getsyi("ARCH_NAME") .eqs. "IA64"
|
|
733 $ then
|
|
734 $ say "IA64 platform"
|
|
735 $ vi*m :== mcr vim:VIM.EXE_IA64
|
|
736 $ endif
|
|
737
|
|
738 Solution 2. Different directories: >
|
|
739
|
|
740 $ if f$getsyi("NODE_HWTYPE") .eqs. "VAX"
|
|
741 $ then
|
|
742 $ say "VAX platform"
|
|
743 $ define/nolog VIM RF10:[UTIL.VAX_EXE] ! VAX executables
|
|
744 $ endif
|
|
745 $ if f$getsyi("NODE_HWTYPE") .eqs. "ALPH"
|
|
746 $ then
|
|
747 $ say "ALPHA platform"
|
|
748 $ define/nolog VIM RF10:[UTIL.AXP_EXE] ! AXP executables
|
|
749 $ endif
|
|
750 $ if f$getsyi("ARCH_NAME") .eqs. "IA64"
|
|
751 $ then
|
|
752 $ say "IA64 platform"
|
|
753 $ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables
|
|
754 $ endif
|
|
755 $! VIMRUNTIME must be defined in order to find runtime files
|
|
756 $ define/nolog VIMRUNTIME RF10:[UTIL.VIM73]
|
|
757
|
|
758 A good example for this approach is the [GNU]gnu_tools.com script from
|
|
759 GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
|
760
|
|
761 (Zoltan Arpadffy, Vim 7.2)
|
|
762
|
0
|
763 ==============================================================================
|
|
764
|
|
765 9. VMS related changes *vms-changes*
|
|
766
|
39
|
767 Version 7.3
|
|
768 - CTAGS 5.8 included
|
|
769 - VMS compile warnings fixed - floating-point overflow warning corrected on VAX
|
48
|
770 - filepath completion corrected - too many chars were escaped in filename
|
39
|
771 and shell commands
|
|
772 - the following plugins are included into VMS runtime:
|
|
773 genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3,
|
|
774 bufexplorer 7.1.7, taglist 4.5
|
|
775 - minor changes in vimrc (just in VMS runtime)
|
|
776 - make_vms.mms - HUGE model is the default
|
|
777 - [TESTDIR]make_vms.mms include as many tests possible
|
|
778 - modify test30 and test54 for VMS
|
|
779 - enable FLOAT feature in VMS port
|
|
780 - os_vms.txt updated
|
|
781
|
|
782 Version 7.2 (2008 Aug 9)
|
|
783 - VCF files write corrected
|
|
784 - CTAGS 5.7 included
|
48
|
785 - corrected make_vms.mms (on VAX gave syntax error)
|
39
|
786
|
|
787 Version 7.1 (2007 Jun 15)
|
48
|
788 - create TAGS file from menu
|
39
|
789
|
|
790 Version 7 (2006 May 8)
|
0
|
791 - Improved low level char input (affects just console mode)
|
39
|
792 - Fixed plugin bug
|
|
793 - CTAGS 5.6 included
|
0
|
794
|
|
795 Version 6.4 (2005 Oct 15)
|
|
796 - GTKLIB and Vim build on IA64
|
|
797 - colors in terminal mode
|
|
798 - syntax highlighting in terminal mode
|
|
799 - write problem fixed (extra CR)
|
|
800 - ESC and ESC sequence recognition in terminal mode
|
|
801 - make file changed to support new MMS version
|
|
802 - env variable expansion in path corrected
|
|
803 - printing problems corrected
|
|
804 - help text added for case insensitive arguments
|
|
805
|
|
806 Version 6.3 (2004 May 10)
|
|
807 - Improved vms_read function
|
|
808 - CTAGS v5.5.4 included
|
|
809 - Documentation corrected and updated
|
|
810
|
|
811 Version 6.2 (2003 May 7)
|
|
812 - Corrected VMS system call results
|
|
813 - Low level character input is rewritten
|
|
814 - Correction in tag and quickfix handling
|
|
815 - First GTK build
|
|
816 - Make file changes
|
|
817 - GTK feature added
|
|
818 - Define for OLD_VMS
|
|
819 - OpenVMS version 6.2 or older
|
|
820 - Documentation updated with GTK features
|
|
821 - CTAGS v5.5 included
|
|
822 - VMS VIM tutor created
|
|
823
|
|
824 Version 6.1 (2002 Mar 25)
|
|
825 - TCL init_tcl() problem fixed
|
|
826 - CTAGS v5.4 included
|
|
827 - GNU tools binaries for OpenVMS
|
|
828 - Make file changes
|
|
829 - PERL, PYTHON and TCL support improved
|
|
830 - InstallVMS.txt has a detailed description HOWTO build
|
|
831 - VMS/Unix file handling rewritten
|
|
832 - Minor casting and bug fixes
|
|
833
|
|
834 Version 6.0 (2001 Sep 28)
|
|
835 - Unix and VMS code has been merged
|
|
836 - separated "really" VMS related code
|
|
837 - included all possible Unix functionality
|
|
838 - simplified or deleted the configuration files
|
|
839 - makefile MAKE_VMS.MMS reviewed
|
|
840 - menu changes (fixed printing, CTAGS and XXD usage)
|
|
841 - fixed variable RMS record format handling anomaly
|
|
842 - corrected syntax, ftplugin etc files load
|
|
843 - changed expand_wildcards and expandpath functions to work more general
|
|
844 - created OS_VMS_FILTER.COM - DECC->VAXC pre-processor directive convert
|
|
845 script.
|
|
846 - Improved code's VAXC and new DECC compilers compatibility
|
|
847 - changed quickfix parameters:
|
|
848 - errormessage format to suite DECC
|
|
849 - search, make and other commands to suite VMS system
|
|
850 - updated and renamed MMS make files for Vim and CTAGS.
|
|
851 - CTAGS has been removed from source distribution of Vim but it will remain
|
|
852 in OpenVMS binary distributions.
|
|
853 - simplified build/configuration procedure
|
|
854 - created INSTALLvms.txt - detailed compiling instructions under VMS.
|
|
855 - updated test scripts.
|
|
856
|
|
857 Version 5.8 (2001 Jun 1)
|
|
858 - OS_VMS.TXT updated with new features.
|
|
859 - other minor fixes.
|
|
860 - documentation updated
|
|
861 - this version had been tested much more than any other OpenVMS version
|
|
862 earlier
|
|
863
|
|
864 Version 5.7 (2000 Jun 24)
|
|
865 - New CTAGS v5.0 in distribution
|
|
866 - Documentation updated
|
|
867
|
|
868 Version 5.6 (2000 Jan 17)
|
|
869 - VMS filename related changes:
|
|
870 - version handling (open everything, save to new version)
|
|
871 - correct file extension matching for syntax (version problem)
|
|
872 - handle <,> characters and passwords in directory definition
|
|
873 - handle internode/remote invocation and editing with passwords
|
|
874 - OpenVMS files will be treated case insensitive from now
|
|
875 - corrected response of expand("%:.") etc path related functions
|
|
876 (in one word: VMS directory handling internally)
|
|
877 - version command
|
|
878 - corrected (+,-) information data
|
|
879 - added compiler and OS version
|
|
880 - added user and host information
|
|
881 - resolving $VIM and $VIMRUNTIME logicals
|
|
882 - VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2.
|
|
883 - enabled farsi, rightleft etc. features
|
|
884 - undo level raised up to 1000
|
|
885 - Updated OS_VMS.MMS file.
|
|
886 - maximum features ON is default
|
|
887 - Vim is compilable with +perl, +python and +tcl features.
|
|
888 - improved MMK compatibility
|
|
889 - Created MAKEFILE_VMS.MMS, makefile for testing Vim during development.
|
|
890 - Defined DEC terminal VT320
|
|
891 - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals
|
|
892 backwards, but not VT340 and newer with colour capability.
|
|
893 - VT320 is default terminal for OpenVMS
|
|
894 - these new terminals are also fast ttys (default for OpenVMS).
|
|
895 - allowed dec_mouse ttym
|
|
896 - Updated files vimrc and gvimrc with VMS specific suggestions.
|
|
897 - OS_VMS.TXT updated with new features.
|
|
898
|
|
899 Version 5.5 (1999 Dec 3)
|
|
900 - Popup menu line crash corrected.
|
|
901 - Handle full file names with version numbers.
|
|
902 - Directory handling (CD command etc.)
|
|
903 - Corrected file name conversion VMS to Unix and v.v.
|
|
904 - Correct response of expand wildcards
|
|
905 - Recovery is working from this version under VMS as well.
|
|
906 - Improved terminal and signal handing.
|
|
907 - Improved OS_VMS.TXT
|
|
908
|
|
909 Version 5.4 (1999 Sep 9)
|
|
910 - Cut and paste mismatch corrected.
|
|
911 - Motif directories during open and save are corrected.
|
|
912
|
|
913 Version 5.3 (1998 Oct 12)
|
|
914 - Minor changes in the code
|
|
915 - Standard distribution with +GUI option
|
|
916
|
|
917 Version 5.1 (1998 Apr 21)
|
|
918 - Syntax and DEC C changes in the code
|
|
919 - Fixing problems with the /doc subdirectory
|
|
920 - Improve OS_VMS.MMS
|
|
921
|
|
922 Version 4.5 (1996 Dec 16)
|
|
923 - First VMS port by Henk Elbers <henk@xs4all.nl>
|
|
924
|
|
925 ==============================================================================
|
|
926
|
|
927 10. Authors *vms-authors*
|
|
928
|
|
929 OpenVMS documentation and executables are maintained by:
|
|
930 Zoltan Arpadffy <arpadffy@polarhome.com>
|
39
|
931 OpenVMS Vim page: http://www.polarhome.com/vim/
|
0
|
932
|
|
933 This document uses parts and remarks from earlier authors and contributors
|
|
934 of OS_VMS.TXT:
|
|
935 Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov>
|
|
936 Bruce Hunsaker <BNHunsaker@chq.byu.edu>
|
|
937 Sandor Kopanyi <sandor.kopanyi@mailbox.hu>
|
|
938
|
|
939 vim:tw=78:ts=8:ft=help:norl:
|