vim 配置

来源:互联网 发布:castep几何优化 编辑:程序博客网 时间:2024/04/29 03:43

vim编辑器有多个插件管理的方法,我选用了Vundle(https://github.com/gmarik/Vundle.vim),这是一个github上的开源项目,主页上有详细的使用帮助。同时可以去http://vim-scripts.org/上去查找一些自己喜欢的插件


以下是我的.vimrc文件

set nocompatible              " be iMproved, requiredfiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'gmarik/Vundle.vim'" The following are examples of different formats supported." Keep Plugin commands between vundle#begin/end." plugin on GitHub repo"Plugin 'tpope/vim-fugitive'" plugin from http://vim-scripts.org/vim/scripts.html"Plugin 'L9'" Git plugin not hosted on GitHub"Plugin 'git://git.wincent.com/command-t.git'" git repos on your local machine (i.e. when working on your own plugin)"Plugin 'file:///home/gmarik/path/to/plugin'" The sparkup vim script is in a subdirectory of this repo called vim." Pass the path to set the runtimepath properly."Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}" Avoid a name conflict with L9"Plugin 'user/L9', {'name': 'newL9'}Plugin 'vim-scripts/winmanager'Plugin 'scrooloose/nerdtree'Plugin 'Lokaltog/vim-powerline'Plugin 'taglist.vim'Plugin 'minibufexpl.vim'" All of your Plugins must be added before the following linecall vundle#end()            " requiredfiletype plugin indent on    " required" To ignore plugin indent changes, instead use:"filetype plugin on"" Brief help" :PluginList       - lists configured plugins" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate" :PluginSearch foo - searches for foo; append `!` to refresh local cache" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal"" see :h vundle for more details or wiki for FAQ" Put your non-Plugin stuff after this lineset nocompatible " Disable vi-compatibilityset nu!"显示行号set laststatus=2 " Always show the statuslineset encoding=utf-8 " Necessary to show Unicode glyphsset t_Co=256 " Explicitly tell Vim that the terminal supports 256 colorscolorscheme calmar256-darklet g:Powerline_theme = 'solarized256'let g:Powerline_colorscheme = 'solarized256'autocmd vimenter * NERDTreeautocmd StdinReadPre * let s:std_in=1autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endifautocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endifmap <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>let Tlist_Auto_Open = 1  let Tlist_Show_One_File = 1  let Tlist_Exit_OnlyWindow = 1  let Tlist_Use_Right_Window = 1let Tlist_File_Fold_Auto_Close = 1let g:miniBufExplMapWindowNavVim = 1let g:miniBufExplMapWindowNavArrows = 1let g:miniBufExplMapCTabSwitchBufs = 1let g:miniBufExplModSelTarget = 1 let g:miniBufExplorerAutoStart = 1let g:NERDTree_title="[NERDTree]" let g:winManagerWindowLayout="NERDTree|TagList"




0 0