How to install VIM in the MSYS?

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>

 

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值