个人vim简单配置

精简.vimrc配置,简约不简单

该配置没有花里胡哨的插件,只是用ctags和cscope然后配合vim提供的基础功能就可以完成常见的代码编辑,浏览,查找等工作。

"***********************vim 配置*************************
set nocompatible
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,gbk,cp936,latin-1
set fileformat=unix
set fileformats=unix,dos,mac
set nobackup
set noswapfile

filetype on

set smartindent
set autoindent
set cindent
"set expandtab
set tabstop=4
set shiftwidth=4
"set smarttab
set backspace=indent,eol,start
set autoread


"***********************搜索*************************
set hlsearch
set incsearch
set ignorecase
set smartcase

"***********************界面设置*************************
set laststatus=2
set cmdheight=1
set number 
set cursorline

syntax on


set tags=tags;
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File = 1            "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1          "如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Use_Left_Window = 1         "在左侧窗口中显示taglist窗口

" -----------------------------------------------------------------------------
"    < cscope 工具配置 >
" -----------------------------------------------------------------------------
if has("cscope")
    set cscopetag
    set cscopequickfix=c-,d-,e-,g-,i-,s-,t-
    if filereadable("cscope.out")
        cs add cscope.out
    else
        let cscope_file=findfile("cscope.out",".;")
        let cscope_pre=matchstr(cscope_file, ".*/")
        if !empty(cscope_file) && filereadable(cscope_file)
            exe "cs add" cscope_file cscope_pre
        endif
    endif
endif

vim 键盘图

猜你喜欢

转载自www.cnblogs.com/ZhaoKevin/p/12296626.html