原来Debian自带的vim是vim.tiny,不支持语法高亮提示等功能。通过下面命令得知vim在/usr/bin下
whereis vim
通过下面命令得知vi和vim都是链接到了vim.tiny
ls -al /usr/bin/vi*
所以要自己安装了
apt-get install vim
根据个人需要,还可以安装ctags、vim-doc、vim-scripts这几个包。
VI常用的配置选项
-----------------------
syntax on
set number
set showcmd
set incsearch
set expandtab
set showcmd
set history=400
set autoread
set ffs=unix,mac,dos
set ignorecase
set hlsearch
set shiftwidth=2
set wrap
set ai
set si
set cindent
set termencoding=unix
set tabstop=2
set nocompatible
set showmatch
set fileencodings=utf-8,gb2312
set ttyfast
set imcmdline
set previewwindow
set showfulltag
set vb t_vb=
set cursorline
set nowrapscan
set ruler
安装完了vim以后,可以使用这个配置文件:
这个配置文件中缺少MySys()函数,在文件开头自己加一个:
" Platform
function! MySys()
return "linux"
endfunction
配色方案:
http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html