Vim documentation: os_vms
main help file
*os_vms.txt* For Vim version 7.0. Last change: 2006 Apr 30
VIM REFERENCE MANUAL
*VMS* *vms*
This file contains the particularities for the VMS version of Vim.
You can reach this information file by typing :help VMS in Vim command
prompt.
1. Getting started |vms-started|
2. Download files |vms-download|
3. Compiling |vms-compiling|
4. Problems |vms-problems|
5. Deploy |vms-deploy|
6. Practical usage |vms-usage|
7. GUI mode questions |vms-gui|
8. Useful notes |vms-notes|
9. VMS related changes |vms-changes|
10. Authors |vms-authors|
==============================================================================
1. Getting started *vms-started*
Vim (Vi IMproved) is a vi-compatible text editor that runs on nearly every
operating system known to humanity. Now use Vim on OpenVMS too, in character
or X/Motif environment. It is fully featured and absolutely compatible with
Vim on other operating systems.
==============================================================================
2. Download files *vms-download*
You can download the Vim source code by ftp from the official Vim site:
ftp://ftp.vim.org/pub/vim/
Or use one of the mirrors:
ftp://ftp.vim.org/pub/vim/MIRRORS
You will need both the Unix and Extra archives to build vim.exe for VMS.
For using Vim's full power you will need the runtime files as well.
You can download precompiled executables from:
http://www.polarhome.com/vim/
ftp://ftp.polarhome.com/pub/vim/
To use the precompiled binary version, you need one of these archives:
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-vax-gui.zip VAX GUI executables
vim-XX-exe-vax-term.zip VAX console executables
and of course (optional)
vim-XX-runtime.zip runtime files
The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
For GTK executables you will need GTKLIB that is available for
Alpha and IA64 platform.
==============================================================================
3. Compiling *vms-compiling*
See the file [.SRC]INSTALLVMS.TXT.
==============================================================================
4. Problems *vms-problems*
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
platforms with the DEC C compiler. It should work without bigger problems.
If your system does not have some include libraries you can tune up in
OS_VMS_CONF.H file.
If you decided to build Vim with +perl, +python, etc. options, first you need
to download OpenVMS distributions of Perl and Python. Build and deploy the
libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
a problem from Vim side.
Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
Note: Under VAX it should work with the DEC C compiler without problems. The
VAX C compiler is not fully ANSI C compatible in pre-processor directives
semantics, therefore you have to use a converter program what will do the lion
part of the job. For detailed instructions read file INSTALLvms.txt
MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
change to subdirectory and build it separately.
CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
specific source might contain CTAGS source files as described above.
You can find more information about CTAGS on VMS at
http://www.polarhome.com/ctags/
Advanced users may try some acrobatics in FEATURE.H file also.
It is possible to compile with +xfontset +xim options too, but then you have
to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
You may want to use GUI with GTK icons, then you have to download and install
GTK for OpenVMS or at least runtime shareable images - LIBGTK from
polarhome.com
For more advanced questions, please send your problem to Vim on VMS mailing
list <vim-vms@polarhome.com>
More about the vim-vms list can be found at:
http://www.polarhome.com/mailman/listinfo/vim-vms
==============================================================================
5. Deploy *vms-deploy*
Vim uses a special directory structure to hold the document and runtime files:
vim (or wherever)
|- tmp
|- vim57
|----- doc
|----- syntax
|- vim62
|----- doc
|----- syntax
|- vim64
|----- doc
|----- syntax
vimrc (system rc files)
gvimrc
Use:
define/nolog VIM device:[path.vim]
define/nolog VIMRUNTIME device:[path.vim.vim60]
define/nolog TMP device:[path.tmp]
to get vim.exe to find its document, it is not the
closing parentheses, indent the following line N characters
relative to the outer context (i.e. start of the line or the
next unclosed parentheses). (default: 0).
cino=(0 cino=(0,W4
a_long_line( a_long_line(
argument, argument,
argument); argument);
a_short_line(argument, a_short_line(argument,
argument); argument);
mN When N is non-zero, line up a line starting with a closing
parentheses with the first character of the line with the
matching opening parentheses. (default 0).
cino=(s cino=(s,m1
c = c1 && ( c = c1 && (
c2 || c2 ||
c3 c3
) && c4; ) && c4;
if ( if (
c1 && c2 c1 && c2
) )
foo; foo;
MN When N is non-zero, line up a line starting with a closing
parentheses with the first character of the previous line.
(default 0).
cino= cino=M1
if (cond1 && if (cond1 &&
cond2 cond2
) )
*java-cinoptions* *java-indenting*
jN Indent java anonymous classes correctly. The value 'N' is
currently unused but must be non-zero (e.g. 'j1'). 'j1' will
indent for example the following code snippet correctly:
object.add(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
do_something();
}
});
)N Vim searches for unclosed parentheses at most N lines away.
This limits the time needed to search for parentheses. (default
20 lines).
*N Vim searches for unclosed comments at most N lines away. This
limits the time needed to search for the start of a comment.
(default 30 lines).
The defaults, spelled out in full, are:
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30
Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
- It starts with a label (a keyword followed by ':', other than "case" and
"default").
- Any combination of indentations causes the line to have less than 0
indentation.
==============================================================================
2. Indenting by expression *indent-expression*
The basics for using flexible indenting are explained in section |30.3| of the
user manual.
If you want to write your own indent file, it must set the 'indentexpr'
option. Setting the 'indentkeys' option is often useful. See the
$VIMRUNTIME/indent directory for examples.
REMARKS ABOUT SPECIFIC INDENT FILES
FORTRAN *ft-fortran-indent*
Block if, select case, and where constructs are indented. Comments, labelled
statements and continuation lines are indented if the Fortran is in free
source form, whereas they are not indented if the Fortran is in fixed source
form because of the left margin requirements. Hence manual indent corrections
will be necessary for labelled statements and continuation lines when fixed
source form is being used. For further discussion of the method used for the
detection of source format see |ft-fortran-syntax|.
Do loops
All do loops are left unindented by default. Do loops can be unstructured in
Fortran with (possibly multiple) loops ending on a labelled executable
statement of almost arbitrary type. Correct indentation requires
compiler-quality parsing. Old code with do loops ending on labelled statements
of arbitrary type can be indented with elaborate programs such as Tidy
http://www.unb.ca/chem/ajit/f_tidy.htm. Structured do/continue loops are
also left unindented because continue statements are also used for purposes
other than ending a do loop. Programs such as Tidy can convert structured
do/continue loops to the do/enddo form. Do loops of the do/enddo variety can
be indented. If you use only structured loops of the do/enddo form, you should
declare this by setting the fortran_do_enddo variable in your .vimrc as
follows
let fortran_do_enddo=1
in which case do loops will be indented. If all your loops are of do/enddo
type only in, say, .f90 files, then you should set a buffer flag with an
autocommand such as
au! BufRead,BufNewFile *.f90 let b:fortran_do_enddo=1
to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.
PYTHON *ft-python-indent*
The amount of indent can be set for the following situations. The examples
given are de the defaults. Note that the variables are set to an expression,
so that you can change the value of 'shiftwidth' later.
Indent after an open paren:
let g:pyindent_open_paren = '&sw * 2'
Indent after a nested paren:
let g:pyindent_nested_paren = '&sw'
Indent for a continuation line:
let g:pyindent_continue = '&sw * 2'
VERILOG *ft-verilog-indent*
General block statements such as if, for, case, always, initial, function,
specify and begin, etc., are indented. The module block statements (first
level blocks) are not indented by default. you can turn on the indent with
setting a variable in the .vimrc as follows:
let b:verilog_indent_modules = 1
then the module blocks will be indented. To stop this, remove the variable:
:unlet b:verilog_indent_modules
To set the variable only for Verilog file. The following statements can be
used:
au BufReadPost * if exists("b:current_syntax")
au BufReadPost * if b:current_syntax == "verilog"
au BufReadPost * let b:verilog_indent_modules = 1
au BufReadPost * endif
au BufReadPost * endif
Furthermore, setting the variable b:verilog_indent_width to change the
indenting width (default is 'shiftwidth'):
let b:verilog_indent_width = 4
let b:verilog_indent_width = &sw * 2
In addition, you can turn the verbose mode for debug issue:
let b:verilog_indent_verbose = 1
Make sure to do ":set cmdheight=2" first to allow the display of the message.
VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash:
:let g:vim_indent_cont = &sw * 3
Three times shiftwidth is the default value.
top - main help file