1.vim的配置文件一般放在/etc/vimrc中,这是系统的配置,不建议修改它。每个用户可以针对自己配置vim。可以修改~/.vimrc文件,如果不存在,则手动建立。举例,文件内容例如:
colorscheme darkZ
set fileencodings=ucs-bom,utf-8,GB18030,gbk
set t_Co=256
syntax on
set nu
set tabstop=4
set autoindent
set matchtime=1 "set the match time is one tenth second
set hlsearch "high light the search
set cindent "set the c language indent format
set shiftwidth=4 "set the indent width
set ruler "set show status on
set showmode "set show mode on
set linespace=6 "set linespace ,only work in GUI
let Tlist_Exit_OnlyWindow=1 "Exit Tlist when it is the last window
/usr/share/vim/vim72/colors,那里保存这系统默认的配色方案文件
a. 先到http://ctags.sourceforge.net/下载ctags-5.8.tar.gz
b. tar zxvf ctags-5.8.tar.gz 解压到任意目录。
c. cd .../ctags-5.8 然后 ./configure && make && make install
d. 在工程目录下 ctags -R 自动创建tags文件。
e.使用 方法,:(1)ta 函数名 (2)光标放停在函数或者变量名上" ctr+ ] "跳转 ,“ctrl + o” 返回
3.安装Taglist
a.先到http://vim.sourceforge.net/scripts/script.php?script_id=273下载 taglist_45.zip文件
b. unzip taglist_45.zip -d ~/.vim/ 将文件解压到~/.vim/ 目录下,木有该目录则自己创建,vim 的colorscheme文件就放在 ~/.vim/colors中。
c. cd ~/.vim/doc 启动 vim ,运行 ":helptags . " 重启vim即可。
d. ctr + w+w可以在窗口中切换。":TlistToggle"命令可以开启、关闭Taglist