/root/.vimrc文件内容:
" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")} "状态行显示的内容
set statusline=%F%m%r%h%w\ \ \ \ \ \ \ [POS=%l,%v][%p%%] "状态行显示的内容
set novisualbell " 不要闪烁(不明白)
set laststatus=2 " 启动显示状态行(1),总是显示状态行(2)
set cmdheight=1 " 命令行(在状态行下)的高度,默认为1
set go= " 不要图形按钮
set autoread " 设置当文件被改动时自动载入
set ruler " 打开状态栏标尺
" set cursorline " 突出显示当前行
set magic " 设置魔术
set guioptions-=T " 隐藏工具栏
set guioptions-=m " 隐藏菜单栏
" set foldcolumn=0
" set foldmethod=indent
" set foldlevel=3
" set foldenable " 开始折叠
set syntax=on " 语法高亮
set nocompatible " 不要使用vi的键盘模式,而是vim自己的
set confirm " 在处理未保存或只读文件的时候,弹出确认
set history=1000 " 历史记录数
set nobackup " 禁止生成临时文件, 从不备份
set noswapfile
" set ignorecase " 搜索忽略大小写
set hlsearch " 搜索逐字符高亮
set incsearch
set enc=utf-8 " 编码设置
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
filetype on " 侦测文件类型
filetype plugin on " 载入文件类型插件
" filetype plugin indent on " 打开可支持go语言,前提是indent目录下有go插件
"set number " 显示行号
"set cursorline " 突出显示当前行
set showmatch " 高亮显示匹配的括号
set matchtime=1 " 匹配括号高亮的时间(单位是十分之一秒)
"set cino=g0,:0 "switch case 对齐风格
"VIM settings to match QEMU coding style. They are activated by adding the
"following settings (without the " symbol) as last two lines in $HOME/.vimrc:
"set secure
"set exrc
"set expandtab
"set shiftwidth=4
"set smarttab
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Tags的设定
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"let Tlist_Sort_Type = "name" " 按照名称排序
let Tlist_Compart_Format = 1 " 压缩方式
let Tlist_Exist_OnlyWindow = 1 " 如果只有一个buffer,kill窗口也kill掉buffer
let Tlist_File_Fold_Auto_Close = 0 " 不要关闭其他文件的tags
let Tlist_Enable_Fold_Column = 0 " 不要显示折叠树
set tags=tags " 设置tags
let Tlist_Auto_Open=0 " 默认打开Taglist
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File = 1 " 不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1 " 如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Use_Right_Window = 1 " 在右侧窗口中显示taglist窗口