1. sudo apt-get install vim
sudo apt-get install exuberant-ctags
2.
//taglist.vim: http://www.vim.org/scripts/script.php?script_id=273//这个是vim官网上长期下载和分数都为第一位的插件,是实现图中最左边功能框的插件
3.
//SrcExpl : http://www.vim.org/scripts/script.php?script_id=2179
//这是实现source insight的预览框的功能
解压后会有taglist.vim srcexpl.vim NERD_tree.vim trinity.vim这四个插件,直接复制到vim安装目录下的plugin文件夹下,txt 放到doc目录4. config:
sudo gedit /etc/vim/vimrc
" Open and close all the three plugins on the same time
nmap:TrinityToggleAll " Open and close the srcexpl.vim separately
nmap:TrinityToggleSourceExplorer " Open and close the taglist.vim separately
nmap:TrinityToggleTagList " Open and close the NERD_tree.vim separately
nmap:TrinityToggleNERDTree "语法高亮
syntax on"显示行号
set number"自动缩进与C语言风格缩进
set autoindent
set cindent"缩进宽度
set tabstop=4
set softtabstop=4
set shiftwidth=4
"建议开启expandtab选项,会自动将tab扩展很空格,代码缩进会更美观
set expandtab
"set noexpandtab"switch case 对齐风格
set cino=g0,:0"
" taglist
"
let Tlist_Show_One_File=1 "只显示当前文件的tags
let Tlist_WinWidth=40 "设置taglist宽度
let Tlist_Exit_OnlyWindow=1 "tagList窗口是最后一个窗口,则退出Vim
let Tlist_Use_Right_Window=1 "在Vim窗口右侧显示taglist窗口set mouse=a
5. modify colors
http://www.vim.org/scripts/script.php?script_id=2340
copy to /usr/share/vim/vim74/colors/
sudo vim /etc/vim/vimrc
这时你先在工程目录下执行ctags -R后,再用vim打开一个文件,按下F8(打开所有的功能框)
记录技术、生活、经验、思考、学习、管理的博客