Bram Moolenaar | b1c9198 | 2018-05-17 17:04:55 +0200 | [diff] [blame] | 1 | *os_vms.txt* For Vim version 8.1. Last change: 2018 May 06 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 7cba6c0 | 2013-09-05 22:13:31 +0200 | [diff] [blame] | 27 | Vim (Vi IMproved) is a Vi-compatible text editor that runs on nearly every |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 50 | vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables |
| 51 | vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 52 | vim-XX-exe-axp-term.zip Alpha console executables |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 53 | vim-XX-exe-vax-gui.zip VAX GUI executables |
| 54 | vim-XX-exe-vax-term.zip VAX console executables |
| 55 | |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 56 | and of course (optional) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 57 | vim-XX-runtime.zip runtime files |
| 58 | |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 59 | The binary archives contain: vim.exe, ctags.exe, xxd.exe files. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 60 | |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 61 | For GTK executables you will need GTKLIB that is available for |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 62 | Alpha and IA64 platform. |
| 63 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 64 | ============================================================================== |
| 65 | |
| 66 | 3. Compiling *vms-compiling* |
| 67 | |
| 68 | See the file [.SRC]INSTALLVMS.TXT. |
| 69 | |
| 70 | ============================================================================== |
| 71 | |
| 72 | 4. Problems *vms-problems* |
| 73 | |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 74 | The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64 |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 75 | platforms with the DEC C compiler. It should work without big problems. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 76 | If your system does not have some include libraries you can tune up in |
| 77 | OS_VMS_CONF.H file. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 78 | |
| 79 | If you decided to build Vim with +perl, +python, etc. options, first you need |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 83 | |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 84 | Also GTK, XPM library paths should be configured in MAKE_VMS.MMS |
| 85 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 88 | semantics, therefore you have to use a converter program that will do the lion |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 89 | part of the job. For detailed instructions read file INSTALLvms.txt |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 90 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 93 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 96 | You can find more information about CTAGS on VMS at |
| 97 | http://www.polarhome.com/ctags/ |
| 98 | |
Bram Moolenaar | 06b5d51 | 2010-05-22 15:37:44 +0200 | [diff] [blame] | 99 | Advanced users may try some acrobatics in FEATURE.H file as well. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 100 | |
| 101 | It is possible to compile with +xfontset +xim options too, but then you have |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 102 | to set up GUI fonts etc. correctly. See :help xim from Vim command prompt. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 124 | |- vim62 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 125 | |----- doc |
| 126 | |----- syntax |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 127 | |- vim64 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 139 | To get vim.exe to find its document, filetype, and syntax files, and to |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 140 | specify a directory where temporary files will be located. Copy the "runtime" |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 141 | subdirectory of the Vim distribution to vimruntime. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 142 | |
| 143 | Logicals $VIMRUNTIME and $TMP are optional. |
| 144 | |
| 145 | If $VIMRUNTIME is not set, Vim will guess and try to set up automatically. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 146 | Read more about it at :help runtime |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 163 | Copy the whole Vim runtime directory structure to the deployment position. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 164 | Add the following lines to your LOGIN.COM (in SYS$LOGIN directory). |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 165 | Set up the logical $VIM as: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 187 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 188 | Note: Remember, system rc files (default for all users) don't have a leading |
| 189 | ".". So, system rc files are: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 190 | |
| 191 | $VIM:vimrc |
| 192 | $VIM:gvimrc |
| 193 | $VIM:menu.vim |
| 194 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 195 | and user customized rc files are: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 196 | |
| 197 | sys$login:.vimrc |
| 198 | sys$login:.gvimrc |
| 199 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 200 | You can check that everything is at the right place with the :version command. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 211 | DECNET environment, it will satisfy as well. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 217 | For example: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 218 | |
| 219 | $ define VIM "PLUTO::RF10:[UTIL.VIM]" |
| 220 | $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required |
| 221 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 234 | And to the SYS$STARTUP:SYLOGIN.COM > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 235 | |
| 236 | $ vi*m :== mcr VIM:VIM.EXE |
| 237 | $ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40 |
| 238 | |
| 239 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 240 | It will set up a normal Vim work environment for every user on the system. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 241 | |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 242 | IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line |
Bram Moolenaar | d5ab34b | 2007-05-05 17:15:44 +0000 | [diff] [blame] | 243 | parameters are assumed to be lowercase. In order to indicate that a command |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 244 | line parameter is uppercase "/" sign must be used. |
| 245 | |
| 246 | Examples: |
| 247 | > |
| 248 | vim -R filename ! means: -r List swap files and exit |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 253 | ============================================================================== |
| 254 | |
| 255 | 7. GUI mode questions *vms-gui* |
| 256 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 261 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 262 | First of all: you will need an executable that is built with the GUI enabled. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 269 | can be downloaded from http://www.polarhome.com/vim/). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | < |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 276 | or type :gui as a command to the Vim command prompt. For more info :help |
| 277 | gui |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 278 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 281 | |
| 282 | $ set disp/create/node=<your IP address>/trans=<transport-name> |
| 283 | < |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 284 | and start Vim as in point 1. You can find more help in VMS documentation or |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 300 | For MS-Windows there are available free X servers as MIX, Omni X etc., |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 301 | as well as excellent commercial products as eXcursion or ReflectionX with |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 302 | built-in DEC support. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 303 | |
| 304 | Please note, that executables without GUI are slightly faster during startup |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 305 | than with enabled GUI in character mode. Therefore, if you do not use GUI |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 306 | features, it is worth to choose non GUI executables. |
| 307 | |
| 308 | ============================================================================== |
| 309 | |
| 310 | 8. Useful notes *vms-notes* |
| 311 | |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 312 | 8.1 Backspace/delete |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 326 | 8.15 Slow start in console mode issue |
| 327 | 8.16 Common VIM directory - different architectures |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 328 | |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 329 | 8.1 Backspace/delete |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 343 | Vim supports filters, i.e., if you have a sort program that can handle |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 357 | :set nowritebackup " does not have any purpose on VMS. It's the |
Bram Moolenaar | c9b4b05 | 2006-04-30 18:54:39 +0000 | [diff] [blame] | 358 | " default. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 359 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 360 | Recovery is working perfectly as well from the default swap file. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 361 | Read more with :help swapfile |
| 362 | |
| 363 | (Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 364 | Vim 5.6) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 365 | |
| 366 | |
| 367 | 8.4 Directory conversion |
| 368 | |
| 369 | Vim will internally convert any unix-style paths and even mixed unix/VMS |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 370 | paths into VMS style paths. Some typical conversions resemble: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 386 | <JLAURET@mail.chem.sunysb.edu> Vim 5.6) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 396 | Example: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 417 | Note: Never use it in a clustered environment (you do not need it), loading |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 418 | could be very-very slow, but even faster than a local Emacs. :-) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 429 | 'unknown-terminal' not known. Available built-in terminals are: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | --- |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 445 | The solution is to define the default terminal name: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 446 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 447 | $ ! unknown terminal name. Let us use vt320 or ansi instead. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 448 | $ ! Note: it's case sensitive |
| 449 | $ define term "vt320" |
| 450 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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, |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 453 | Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 482 | to DCL prompt. This feature is possible to use without any problem with all |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 495 | Note: You can use XXD and CTAGS from GUI menu. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 496 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 497 | To customize ctags it is possible to define the logical $CTAGS with standard |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 513 | The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 534 | You can print out the whole buffer or just the marked area. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 535 | More info under :help hardcopy |
| 536 | |
| 537 | (Zoltan Arpadffy, Vim 6.0c) |
| 538 | |
| 539 | |
| 540 | 8.10 Setting up the symbols |
| 541 | |
Bram Moolenaar | 6aa8cea | 2017-06-05 14:44:35 +0200 | [diff] [blame] | 542 | When I use gvim this way and press CTRL-Y in the parent terminal, gvim exits. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 6aa8cea | 2017-06-05 14:44:35 +0200 | [diff] [blame] | 550 | Without the -GEOMETRY, the gvim window size will be minimal and the menu |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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. |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 560 | There is a simple solution to solve this anomaly. Install a Unix like diff |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 561 | and Vim will work perfectly in diff mode too. You just have to redefine your |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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) |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 571 | |
| 572 | |
| 573 | 8.12 diff-mode |
| 574 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 575 | Vim 6.0 and higher supports Vim diff-mode (See |new-diff-mode|, |diff-mode| |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 578 | format. To use Vim on VMS in diff-mode, you need to: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 579 | 1 Install a Unix-like diff program, e.g. GNU diff |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 580 | 2 Tell Vim to use the Unix-like diff for diff-mode. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 581 | |
| 582 | You can download GNU diff from the VIM-VMS website, it is one of the GNU |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 583 | tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 584 | unpack it in a separate directory "GNU" and create a logical GNU: that |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 585 | points to that directory, e.g: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 594 | Now you need to tell Vim to use the new diff program. Take the example |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 595 | settings from |diff-diffexpr| and change the call to the external diff |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 596 | program to the new diff on VMS. Add this to your .vimrc file: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 615 | You can now use Vim in diff-mode, e.g. to compare two files in read-only |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 632 | (Coen Engelbarts, Vim 6.1) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 633 | |
| 634 | |
| 635 | 8.13 Allow '$' in C keywords |
| 636 | |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 637 | DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C, |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 638 | and Vim recognises the '$' as the end of the identifier. You can change this |
Bram Moolenaar | f91787c | 2010-07-17 12:47:16 +0200 | [diff] [blame] | 639 | with the 'iskeyword' option. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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-] |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 650 | tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 651 | C keywords since ctags version 5.1.) |
| 652 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 653 | (Coen Engelbarts, Vim 6.1) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 654 | |
| 655 | 8.14 VIMTUTOR for beginners |
| 656 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 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: > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 660 | |
| 661 | @vim:vimtutor |
| 662 | |
| 663 | (Thomas.R.Wyant III, Vim 6.1) |
| 664 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 665 | 8.16 Slow start in console mode issue |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 666 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 667 | As GUI/GTK Vim works equally well in console mode, many administrators |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 668 | deploy those executables system wide. |
| 669 | Unfortunately, on a remote slow connections GUI/GTK executables behave rather |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 670 | slow when user wants to run Vim just in the console mode - because of X |
| 671 | environment detection timeout. |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 676 | |- vim73 |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 677 | |----- doc |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 678 | |----- syntax |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 679 | vimrc (system rc files) |
| 680 | gvimrc |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 681 | gvim.exe (the renamed GUI or GTK built vim.exe) |
| 682 | vim.exe (the console only executable) |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 683 | |
| 684 | Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: > |
| 685 | |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 686 | $ define/nolog VIM RF10:[UTIL.VIM73] ! where you VIM directory is |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 693 | Like this, users that do not have X environment and want to use Vim just in |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 | +---------------------------------+ |
Bram Moolenaar | 85eee13 | 2018-05-06 17:57:30 +0200 | [diff] [blame] | 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 | |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 712 | +---------------------------------+ |
| 713 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 714 | It is convenient to have a common VIM directory but execute different |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 715 | executables. |
| 716 | There are several solutions for this problem: |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 717 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 718 | Solution 1. All executables in the same directory with different names |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 738 | Solution 2. Different directories: > |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 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 |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 756 | $ define/nolog VIMRUNTIME RF10:[UTIL.VIM73] |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 757 | |
Bram Moolenaar | 8f3f58f | 2010-01-06 20:52:26 +0100 | [diff] [blame] | 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/ |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 760 | |
| 761 | (Zoltan Arpadffy, Vim 7.2) |
| 762 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 763 | ============================================================================== |
| 764 | |
| 765 | 9. VMS related changes *vms-changes* |
| 766 | |
Bram Moolenaar | 6aa8cea | 2017-06-05 14:44:35 +0200 | [diff] [blame] | 767 | Version 7.4 |
| 768 | - Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name" |
Bram Moolenaar | 206f011 | 2014-03-12 16:51:55 +0100 | [diff] [blame] | 769 | add _un_ at the beginning to keep the extension |
| 770 | - correct swap file name wildcard handling |
| 771 | - handle iconv usage correctly |
| 772 | - do not optimize on vax - otherwise it hangs compiling crypto files |
| 773 | - fileio.c fix the comment |
Bram Moolenaar | 6aa8cea | 2017-06-05 14:44:35 +0200 | [diff] [blame] | 774 | - correct RealWaitForChar |
Bram Moolenaar | 206f011 | 2014-03-12 16:51:55 +0100 | [diff] [blame] | 775 | - after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have |
| 776 | G_FLOAT but IA64 uses IEEE float otherwise Vim crashes |
Bram Moolenaar | 34401cc | 2014-08-29 15:12:19 +0200 | [diff] [blame] | 777 | - guard against crashes that are caused by mixed filenames |
Bram Moolenaar | 206f011 | 2014-03-12 16:51:55 +0100 | [diff] [blame] | 778 | - [TESTDIR]make_vms.mms changed to see the output files |
| 779 | - Improve tests, update known issues |
| 780 | - minor compiler warnings fixed |
| 781 | - CTAGS 5.8 +regex included |
| 782 | |
Bram Moolenaar | 8e46927 | 2010-07-28 19:38:16 +0200 | [diff] [blame] | 783 | Version 7.3 |
| 784 | - CTAGS 5.8 included |
| 785 | - VMS compile warnings fixed - floating-point overflow warning corrected on VAX |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 786 | - filepath completion corrected - too many chars were escaped in filename |
Bram Moolenaar | 8e46927 | 2010-07-28 19:38:16 +0200 | [diff] [blame] | 787 | and shell commands |
| 788 | - the following plugins are included into VMS runtime: |
| 789 | genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3, |
| 790 | bufexplorer 7.1.7, taglist 4.5 |
| 791 | - minor changes in vimrc (just in VMS runtime) |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 792 | - make_vms.mms - HUGE model is the default |
| 793 | - [TESTDIR]make_vms.mms include as many tests possible |
| 794 | - modify test30 and test54 for VMS |
| 795 | - enable FLOAT feature in VMS port |
Bram Moolenaar | 8e46927 | 2010-07-28 19:38:16 +0200 | [diff] [blame] | 796 | - os_vms.txt updated |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 797 | |
| 798 | Version 7.2 (2008 Aug 9) |
| 799 | - VCF files write corrected |
| 800 | - CTAGS 5.7 included |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 801 | - corrected make_vms.mms (on VAX gave syntax error) |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 802 | |
| 803 | Version 7.1 (2007 Jun 15) |
Bram Moolenaar | 5302d9e | 2011-09-14 17:55:08 +0200 | [diff] [blame] | 804 | - create TAGS file from menu |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 805 | |
| 806 | Version 7 (2006 May 8) |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 807 | - Improved low level char input (affects just console mode) |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 808 | - Fixed plugin bug |
| 809 | - CTAGS 5.6 included |
Bram Moolenaar | b475fb9 | 2006-03-02 22:40:52 +0000 | [diff] [blame] | 810 | |
| 811 | Version 6.4 (2005 Oct 15) |
Bram Moolenaar | 5eba4c2 | 2005-07-12 22:40:29 +0000 | [diff] [blame] | 812 | - GTKLIB and Vim build on IA64 |
| 813 | - colors in terminal mode |
| 814 | - syntax highlighting in terminal mode |
| 815 | - write problem fixed (extra CR) |
| 816 | - ESC and ESC sequence recognition in terminal mode |
| 817 | - make file changed to support new MMS version |
| 818 | - env variable expansion in path corrected |
| 819 | - printing problems corrected |
| 820 | - help text added for case insensitive arguments |
| 821 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 822 | Version 6.3 (2004 May 10) |
| 823 | - Improved vms_read function |
| 824 | - CTAGS v5.5.4 included |
| 825 | - Documentation corrected and updated |
| 826 | |
| 827 | Version 6.2 (2003 May 7) |
| 828 | - Corrected VMS system call results |
| 829 | - Low level character input is rewritten |
| 830 | - Correction in tag and quickfix handling |
| 831 | - First GTK build |
| 832 | - Make file changes |
| 833 | - GTK feature added |
| 834 | - Define for OLD_VMS |
| 835 | - OpenVMS version 6.2 or older |
| 836 | - Documentation updated with GTK features |
| 837 | - CTAGS v5.5 included |
| 838 | - VMS VIM tutor created |
| 839 | |
| 840 | Version 6.1 (2002 Mar 25) |
| 841 | - TCL init_tcl() problem fixed |
| 842 | - CTAGS v5.4 included |
| 843 | - GNU tools binaries for OpenVMS |
| 844 | - Make file changes |
| 845 | - PERL, PYTHON and TCL support improved |
| 846 | - InstallVMS.txt has a detailed description HOWTO build |
| 847 | - VMS/Unix file handling rewritten |
| 848 | - Minor casting and bug fixes |
| 849 | |
| 850 | Version 6.0 (2001 Sep 28) |
| 851 | - Unix and VMS code has been merged |
| 852 | - separated "really" VMS related code |
| 853 | - included all possible Unix functionality |
| 854 | - simplified or deleted the configuration files |
| 855 | - makefile MAKE_VMS.MMS reviewed |
| 856 | - menu changes (fixed printing, CTAGS and XXD usage) |
| 857 | - fixed variable RMS record format handling anomaly |
| 858 | - corrected syntax, ftplugin etc files load |
| 859 | - changed expand_wildcards and expandpath functions to work more general |
| 860 | - created OS_VMS_FILTER.COM - DECC->VAXC pre-processor directive convert |
| 861 | script. |
| 862 | - Improved code's VAXC and new DECC compilers compatibility |
| 863 | - changed quickfix parameters: |
| 864 | - errormessage format to suite DECC |
| 865 | - search, make and other commands to suite VMS system |
| 866 | - updated and renamed MMS make files for Vim and CTAGS. |
| 867 | - CTAGS has been removed from source distribution of Vim but it will remain |
| 868 | in OpenVMS binary distributions. |
| 869 | - simplified build/configuration procedure |
| 870 | - created INSTALLvms.txt - detailed compiling instructions under VMS. |
| 871 | - updated test scripts. |
| 872 | |
| 873 | Version 5.8 (2001 Jun 1) |
| 874 | - OS_VMS.TXT updated with new features. |
| 875 | - other minor fixes. |
| 876 | - documentation updated |
| 877 | - this version had been tested much more than any other OpenVMS version |
| 878 | earlier |
| 879 | |
| 880 | Version 5.7 (2000 Jun 24) |
| 881 | - New CTAGS v5.0 in distribution |
| 882 | - Documentation updated |
| 883 | |
| 884 | Version 5.6 (2000 Jan 17) |
| 885 | - VMS filename related changes: |
| 886 | - version handling (open everything, save to new version) |
| 887 | - correct file extension matching for syntax (version problem) |
| 888 | - handle <,> characters and passwords in directory definition |
| 889 | - handle internode/remote invocation and editing with passwords |
| 890 | - OpenVMS files will be treated case insensitive from now |
| 891 | - corrected response of expand("%:.") etc path related functions |
| 892 | (in one word: VMS directory handling internally) |
| 893 | - version command |
| 894 | - corrected (+,-) information data |
| 895 | - added compiler and OS version |
| 896 | - added user and host information |
| 897 | - resolving $VIM and $VIMRUNTIME logicals |
| 898 | - VMS port is in MAX_FEAT (maximum features) club with Unix, Win32 and OS/2. |
| 899 | - enabled farsi, rightleft etc. features |
| 900 | - undo level raised up to 1000 |
| 901 | - Updated OS_VMS.MMS file. |
| 902 | - maximum features ON is default |
| 903 | - Vim is compilable with +perl, +python and +tcl features. |
| 904 | - improved MMK compatibility |
| 905 | - Created MAKEFILE_VMS.MMS, makefile for testing Vim during development. |
| 906 | - Defined DEC terminal VT320 |
| 907 | - compatibility for VT3*0, VT2*0 and VT1*0 - ANSI terminals |
| 908 | backwards, but not VT340 and newer with colour capability. |
| 909 | - VT320 is default terminal for OpenVMS |
| 910 | - these new terminals are also fast ttys (default for OpenVMS). |
| 911 | - allowed dec_mouse ttym |
| 912 | - Updated files vimrc and gvimrc with VMS specific suggestions. |
| 913 | - OS_VMS.TXT updated with new features. |
| 914 | |
| 915 | Version 5.5 (1999 Dec 3) |
| 916 | - Popup menu line crash corrected. |
| 917 | - Handle full file names with version numbers. |
| 918 | - Directory handling (CD command etc.) |
| 919 | - Corrected file name conversion VMS to Unix and v.v. |
| 920 | - Correct response of expand wildcards |
| 921 | - Recovery is working from this version under VMS as well. |
| 922 | - Improved terminal and signal handing. |
| 923 | - Improved OS_VMS.TXT |
| 924 | |
| 925 | Version 5.4 (1999 Sep 9) |
| 926 | - Cut and paste mismatch corrected. |
| 927 | - Motif directories during open and save are corrected. |
| 928 | |
| 929 | Version 5.3 (1998 Oct 12) |
| 930 | - Minor changes in the code |
| 931 | - Standard distribution with +GUI option |
| 932 | |
| 933 | Version 5.1 (1998 Apr 21) |
| 934 | - Syntax and DEC C changes in the code |
| 935 | - Fixing problems with the /doc subdirectory |
| 936 | - Improve OS_VMS.MMS |
| 937 | |
| 938 | Version 4.5 (1996 Dec 16) |
| 939 | - First VMS port by Henk Elbers <henk@xs4all.nl> |
| 940 | |
| 941 | ============================================================================== |
| 942 | |
| 943 | 10. Authors *vms-authors* |
| 944 | |
| 945 | OpenVMS documentation and executables are maintained by: |
| 946 | Zoltan Arpadffy <arpadffy@polarhome.com> |
Bram Moolenaar | ac98e5d | 2008-09-01 14:51:37 +0000 | [diff] [blame] | 947 | OpenVMS Vim page: http://www.polarhome.com/vim/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 948 | |
| 949 | This document uses parts and remarks from earlier authors and contributors |
| 950 | of OS_VMS.TXT: |
| 951 | Charles E. Campbell, Jr. <cec@gryphon.gsfc.nasa.gov> |
| 952 | Bruce Hunsaker <BNHunsaker@chq.byu.edu> |
| 953 | Sandor Kopanyi <sandor.kopanyi@mailbox.hu> |
| 954 | |
Bram Moolenaar | 91f84f6 | 2018-07-29 15:07:52 +0200 | [diff] [blame] | 955 | vim:tw=78:ts=8:noet:ft=help:norl: |