The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Next Previous Contents

2. Install Vim on Microsoft Windows 95/NT

For Windows 95/NT, download the Vim zip file. Double click on the vim.exe and do "FULL" install and not "Typical" to get graphics and colors.

If you decide download in parts, then you must download TWO zip files -

Get one big executable or two zip files from: Goto http://www.vim.org and click on Download-> download FAQ-> Windows 95/NT or click on these ftp://vim.ftp.fu-berlin.de/pc/gvim60.zip and ftp://vim.ftp.fu-berlin.de/pc/vim60rt.zip. ( see also Before you Install )

Unpack the zip files using the Winzip http://www.winzip.com. Both the zip files (vim*rt.zip and vim*60.zip) must be unpacked in the same directory like say c:\vim.

For Windows 95/98, set the environment variable VIM (all caps no lowercase) in autoexec.bat by adding this line -


set VIM=c:\vim\vim60

For Windows NT, add the environment variable VIM (all caps no lowercase) to the Start | Control Panel | System | Environment | System Properties dialog. For Windows 2000, click on Start | Control Panel | System | Advanced | Environment Variable dialog and add variable VIM (all caps no lowercase):
VIM=c:\vim\vim60

The VIM variable should point to wherever you installed the vim60 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. Bring up a MS-DOS window by click on Start->Programs->MSDOS (for Windows 95/98) and Start->Run->cmd (for Windows NT/2000). At an MS-DOS prompt type -


c:\> set vim
c:\> cd vim\vim60
c:\> install.exe

For 'set vim' command, you should see - VIM=c:\vim\vim60 and start the install program which will setup the enviroment.

Create a short-cut on to your desktop by click-and-drag from c:\vim\vim60\gvim.exe.

Color Syntax Highlighting: To enable color syntaxt highlighting and other nice features you must copy the gvimrc_example file to the $VIM\_gvimrc. In my case it is c:\vim\vim60\_gvimrc.


c:\> copy c:\vim\vim60\gvimrc_example  $VIM\_gvimrc

Useful Tips :

2.1 Install bash shell

In order make MS Windows 95/98/NT/2000/XP even more user-friendly, install the bash shell (Bourne Again Shell). Install http://sources.redhat.com/cygwin/setup.exe (Cygwin-setup program) and select bash and other common utilities. The CygWin main site is at http://sources.redhat.com/cygwin. With CygWin the Windows 2000 computer will look like Linux/Unix box!! And combined with gvim editor, the Windows 2000 gives programmers more power. The cygwin home is at http://cygwin.com.

You may also want to install MKS in case you are planning to use Java and Java compilers. Get MKS from http://www.mks.com.

2.2 Edit bash_profile

After installing the Cygwin, insert some useful aliases in  /.bash_profile file. Open a cygwin window and at bash prompt -


bash$ cd $HOME
bash$ gvim .bash_profile
set -o vi
alias ls='ls --color '
alias cp='cp -i '
alias mv='mv -i '
alias rm='rm -i '
alias vi='gvim '
alias vip='gvim ~/.bash_profile & '
alias sop='. ~/.bash_profile '
alias mys='mysql -uroot -p '
PATH=$PATH:"/cygdrive/c/Program Files/mysql/bin"

With color ls, when you do ls you will see all the directory names and files in different colors (it looks great!!). With set -o vi, you can use the command line history editing just as in linux.

2.3 Setup Window colors

The default background color of MS DOS prompt window is black and white text. You must change the color, fontsize and window size to make it more pleasing. On MS Windows 2000, click on button Start->Run and type "cmd" and hit return. On MS Windows 95/98/NT click on Start->Programs->MSDOS Prompt which will bring up MSDOS window. Right click on the top left corner of the MSDOS prompt window and select properties. Select color background and enter R=255, G=255, B=190 (red, green, blue) for lightyellow background and text foreground color to black (R=0, G=0, B=0). This sets background to light yellow and text foreground to black and this combination is most pleasing to human eyes. If you have problems with colors in cygwin bash window when doing 'man ls', set the text color to "marune".

For Windows95 see Color for MS-DOS prompt window.


Next Previous Contents


Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру