vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

os_vms.txt (33876B)


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