Next Previous Contents

1. Introduction

Vim stands for 'Vi Improved'. Vi is the most popular and powerful editors in the Unix world. Vi is an abbreviation for "Visual" editor. One of the first editors was a line editor called 'ed' (and 'ex'). The Visual editor like Vi was a vast improvement over line editors like 'ed' (or 'ex'). The editors 'ed' and 'ex' are still available on Linux: see 'man ed' and 'man ex'.

A good editor improves programmer productivity. Vim supports color syntax highlighting of program code and also emphasises text using different fonts like normal, bold or italics. A color editor like Vim can improve the productivity of programmers by 2 to 3 times!! Programmers can read the code much more rapidly as the code syntax is colored and highlighted.

1.1 Before you Install

Before you install Vim, please refer to the OS specific release notes and information about compiling and usage of Vim at -

If you do not have the Vim package (RPM, DEB, tar, zip) then download the Vim source code by ftp from the official Vim site

1.2 Install Vim on Redhat Linux

To use Vim install the following RPM packages on Redhat Linux -


        rpm -i vim*.rpm
OR do this -
        rpm -i vim-enhanced*.rpm
        rpm -i vim-X11*.rpm
        rpm -i vim-common*.rpm
        rpm -i vim-minimal*.rpm

You can see the list of files the vim rpm installs by -
        rpm -qa | grep ^vim | xargs rpm -ql | less 
or 
        rpm -qa | grep ^vim | awk '{print "rpm -ql " $1 }' | /bin/sh | less

and browse output using j,k, CTRL+f, CTRL+D, CTRL+B, CTRL+U or using arrow keys, page up/down keys. See 'man less'.

Note that the RPM packages for Redhat Linux use a Motif interface. If you have installed the GTK libraries on your system, consider compiling Vim from the source code for a clean GUI interface. For information on compiling Vim from the source code, see "Install Vim on Unixes", below.

1.3 Install Vim on GNU Debian Linux

To install Vim on Debian Linux (GNU Linux), login as root and when connected to internet type -


apt-get install vim vim-rt

It will download the latest version of vim, install it, configure it, and erase the .deb file it downloaded. The first package listed is vim, the standard editor, compiled with X11 support, vim-rt is the vim runtime, it holds all the syntax and help files.

1.4 Install Vim on Unixes

For other flavors of unixes like Solaris, HPUX, AIX, Sinix, SCO download the source code file ( see Before you Install )


 
        zcat vim.tar.gz | tar -xvf -
        cd vim-5.5/src
        ./configure --enable-gui=motif
        make
        make install

1.5 Install Vim on Microsoft Windows 95/NT

For Windows 95/NT, download the Vim zip file. For Windows 95/NT you must download TWO zip files -

Get these two zip files ( see Before you Install ) Unpack the zip files using the Winzip http://www.winzip.com. Both the zip files (vim*rt.zip and vim*56.zip) must be unpacked in the same directory like say c:\vim.

For Windows 95/98, set the environment variable VIM in autoexec.bat by adding this line -


set VIM=c:\vim\vim56

For Windows NT, add the environment variable VIM to the Control Panel | System | Environment | System Properties dialog:
VIM=c:\vim\vim56

The VIM variable should point to whereever you installed the vim56 directory. You can also set your PATH to include the gvim.exe's path.

You may need to logoff and relogin to set your environment. At an MS-DOS prompt type -


        set vim

And you should see - VIM=c:\vim\vim56

Create a short-cut on to your desktop by click-and-drag from c:\vim\vim56\gvim.exe. Copy the gvimrc_example file to the $VIM\_gvimrc. In my case it is c:\vim\vim56\_gvimrc.

1.6 Install Vim on VMS

Download files

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. Get these files ( see Before you Install )

You can download precompiled executables from: http://www.polarfox.com/vim

VMS vim authors are -

Compiling

Unpack the Unix and Extra archives together into one directory. In the <.SRC> subdirectory you should find the make file OS_VMS.MMS. By editing this file you may choose between building the character, GUI and debug version. There are also additional options for Perl, Python and Tcl support.

You will need either the DECSET mms utility or the freely available clone of it called mmk (VMS has no make utility in the standard distribution). You can download mmk from http://www.openvms.digital.com/freeware/MMK/

If you have MSS on your system, the command

> mms /descrip=os_vms.mms

will start building your own customised version of Vim. The equivalent command for mmk is:

> mmk /descrip=os_vms.mms

Deploy

Vim uses a special directory structure to hold the document and runtime files:


   vim (or wherever)
    |- tmp
    |- vim55
    |----- doc
    |----- syntax
    |- vim56
    |----- doc
    |----- syntax
    vimrc    (system rc files)
    gvimrc

Use:

>       define/nolog device:[leading-path-here.vim]       vim
>       define/nolog device:[leading-path-here.vim.vim56] vimruntime
>       define/nolog device:[leading-path-here.tmp]       tmp

to get vim.exe to find its document, filetype, and syntax files, and to specify a directory where temporary files will be located. Copy the "runtime" subdirectory of the vim distribution to vimruntime.

Note: Logicals $VIMRUNTIME and $TMP are optional. Read more at :help runtime

Practical usage

Usually you want to run just one version of Vim on your system, therefore it is enough to dedicate one directory for Vim. Copy all Vim runtime directory structure to the deployment position. Add the following lines to your LOGIN.COM (in SYS$LOGIN directory). Set up logical $VIM as:


>       $ define VIM device: <path>

Set up some symbols:


>       $ ! vi starts Vim in chr. mode.
>       $ vi*m  :== mcr device:<path>VIM.EXE

>       $ !gvi starts Vim in GUI mode.
>       $ gv*im :== spawn/nowait mcr device:<path>VIM.EXE -g

Create .vimrc and .gvimrc files in your home directory (SYS$LOGIN).

The easiest way is just rename example files. You may leave the menu file (MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will be default setup for all users, and for users is enough just to have their own additions or resetting in home directory in files .vimrc and .gvimrc. It should work without problems.

Note: Remember, system rc files (default for all users) do not have the leading "." So, system rc files are:


>       VIM$:vimrc
>       VIM$:gvimrc
>       VIM$:menu.vim

and user's customised rc files are:
>       sys$login:.vimrc
>       sys$login:.gvimrc

You can check that everything is on the right place with the :version command.


Example LOGIN.COM:

>       $ define/nolog VIM RF10:[UTIL.VIM]
>       $ vi*m  :== mcr VIM:VIM.EXE
>       $ gv*im :== spawn/nowait mcr VIM:VIM.EXE -g
>       $ set disp/create/node=192.168.5.223/trans=tcpip

Note: This set-up should be enough if you are working in a standalone server or clustered environment, but if you want to use Vim as an internode editor, it should suffice. You just have to define the "whole" path:


>       $ define VIM "<server_name>[""user password""]::device:<path>"
>       $ vi*m :== "mcr VIM:VIM.EXE"

as for example:


>       $ define VIM "PLUTO::RF10:[UTIL.VIM]"
>       $ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required

You can also use $VIMRUNTIME logical to point to proper version of Vim if you have multiple versions installed at the same time. If $VIMRUNTIME is not defined Vim will borrow value from $VIM logical. You can find more information about $VIMRUNTIME logical by typing :help runtime as a Vim command.

GUI mode questions

VMS is not a native X window environment, so you can not start Vim in GUI mode "just like that". But it is not too complicated to get a running Vim.


1) If you are working on the VMS X console:
   Start Vim with the command:

>       $ mc device:<path>VIM.EXE -g

   or type :gui as a command to the Vim command prompt. For more info :help gui

2) If you are working on other X window environment as Unix or some remote X
   VMS console. Set up display to your host with:

>       $ set disp/create/node=<your IP address>/trans=<transport-name>

   and start Vim as in point 1. You can find more help in VMS documentation or
   type: help set disp in VMS prompt.
   Examples:

>       $ set disp/create/node=192.168.5.159             ! default trans is DECnet
>       $ set disp/create/node=192.168.5.159/trans=tcpip ! TCP/IP network
>       $ set disp/create/node=192.168.5.159/trans=local ! display on the same node

Note: you should define just one of these. For more information type $help set disp in VMS prompt.

1.7 Install Vim on OS/2

Read the release notes for Vim on OS/2, see Before you Install .

At present there is no native PM version of the GUI version of vim: The OS/2 version is a console application. However, there is now a Win32s-compatible GUI version, which should be usable by owners of Warp 4 (which supports Win32s) in a Win-OS/2 session. The notes in this file refer to the native console version.

To run Vim, you need the emx runtime environment (at least rev. 0.9b). This is generally available as (ask Archie about it):


    emxrt.zip     emx runtime package

1.8 Install Vim on Apple Macintosh

Read the release notes for Vim on OS/2, see Before you Install .

The author of Vim on Mac is


Eric Fischer
5759 N. Guilford Ave
Indianapolis IN 46220 USA

Email to enf1@midway.uchicago.edu or to eric@jcp.uchicago.edu or to etaoin@uchicago.edu

Mac Bug Report When reporting any Mac specific bug or feature change, makes sure to include the following address in the "To:" or "Copy To:" field.

dany.stamant@sympatico.ca

Vim compiles out of the box with the supplied CodeWarrior project when using CodeWarrior 9. If you are using a more recent version (e. g. CW Pro) you have to convert the project first. When compiling Vim for 68k Macs you have to open the "size" resource in ResEdit and enable the "High level events aware" button to get drag and drop working. You have to increase the memory partition to at least 1024 kBytes to prevent Vim from crashing due to low memory.


 vim:ts=8:sw=8:tw=78:


Next Previous Contents