How to install VIM in the MSYS?
MSYS has not provided VI editor, and it plays very vital roles in the daily activities. The article only focuses on how to install and configure VIM into the MSYS. There two steps to describe installation and configuration separately in the following contents.
Step1: Install VIM into the MSYS
A. Download vim-7.1-MSYS-1.0.11-1-bin.tar.gz from http://sourceforge.net/projects/mingw/files/
B. Extract vim-7.1-MSYS-1.0.11-1-bin.tar.gz into “/ ” folder in the MSYS.
NOTICE:
To build the MSYS, please refer to How to build the environment of MSYS in the windows? .
Ok, we have installed VIM into the MSYS. The next stage is to configure it to use easily.
Step2: Configure VIM in the MSY.
A. Create .vimrc in the ~ folder(By cd ~ to it). The normal setting is listed in the following table.
set nobackup set softtabstop=4 set tabstop=4 set smarttab set expandtab set highlight set backspace=indent,eol,start set hlsearch set shiftwidth=4 set sm set mouse=a set autoindent set cindent syntax enable set number set ruler set incsearch |
B. Download taglist_45.zip , and other plugin can be found in the http://vim.sourceforge.net/scripts/script_search_results.php?order_by=rating
C. Create .vim in the ~ folder.
D. Extract taglist_45.zip into the .vim folder.
E. Open VIM and input ‘:helptags .’ to handle the taglist help files.
F. Download ctags-5.8.tar.gz and install it into ‘/bin ’ folder.
$ tar xvzf ./ctags-5.8.tar.gz $ cd ./ctags-5.8 $ ./configure --prefix=/. --disable-shared --enable-static --enable-etags $ make $ make install |
G. Edit ~/.vimrc, and append two entries marked by red color.
set nobackup set softtabstop=4 set tabstop=4 set smarttab set expandtab set highlight set backspace=indent,eol,start set hlsearch set shiftwidth=4 set sm set mouse=a set autoindent set cindent syntax enable set number set ruler set incsearch
let Tlist_Ctags_Cmd='/bin/ctags.exe' nnoremap <F12> : TlistToggle<CR> |
Restart VIM, and press F12. What will happen:- )? Is it cool?!
[Summarization]
1. It is a simple installation for VIM in the MSYS, and the usage of VIM can be found in http://www.fprintf.net/vimCheatSheet.html .
2. END key is not available in the current settings, and readers can use ‘A’ for the end of line. If readers don’t like it, please add them into ‘~/.vimrc ’.
map <ESC>[8~ <End> map <ESC>[7~ <Home> imap <ESC>[8~ <End> imap <ESC>[7~ <Home> |