我的vimrc
2015-12-21 19:51
405 查看
set nocompatible set langmenu=en_US let $LANG= 'en_US'
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let eq = '' if $VIMRUNTIME =~ ' ' if &sh =~ '\<cmd' let cmd = '""' . $VIMRUNTIME . '\diff"' let eq = '"' else let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' endif else let cmd = $VIMRUNTIME . '\diff' endif silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq endfunction set tags=tags set autochdir set nu! colorscheme desert syntax enable syntax on set guifont=courier_new:h12 set shiftwidth=4 set sts=4 set tabstop=4 set expandtab set nobackup set fileencodings=ucs-bom,utf-8,gb2312,gbk,cp936,gb18030,big5,euc-jp,euc-kr,latin1,shift-jis set encoding=utf-8 set termencoding=cp936 language messages zh_CN.UTF-8 syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2 syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1 hi cFunction gui=NONE guifg=#B5A1FF filetype off
set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
call vundle#rc('$VIM/vimfiles/bundle/')
Bundle 'VundleVim/Vundle.vim'
filetype plugin indent on Bundle 'Valloric/YouCompleteMe' Bundle 'scrooloose/syntastic' Bundle 'Valloric/ListToggle' Bundle 'https://github.com/Lokaltog/vim-powerline.git' Bundle 'taglist.vim' Bundle 'winmanager' Bundle 'scrooloose/nerdtree' filetype plugin indent on let g:ycm_complete_in_comments=1 let g:ycm_confirm_extra_conf=0 let g:ycm_collect_identifiers_from_tags_files=1 inoremap <leader>; <C-x><C-o> set completeopt-=preview let g:ycm_min_num_of_chars_for_completion=1 let g:ycm_cache_omnifunc=0 let g:ycm_seed_identifiers_with_syntax=1 let g:ycm_key_invoke_completion = '<M-;>' nmap <M-g> :YcmCompleter GoToDefinitionElseDeclaration <C-R>=expand("<cword>")<CR><CR> "powerline set laststatus=2 set noshowmode set t_Co=256 " TagList settings " increase the width of the taglist window "let Tlist_WinWidth=20 " 自动打开TagList的window let Tlist_Auto_Open=0 " 当只剩下Tlist的时候自动关闭 let Tlist_Exit_OnlyWindow=2 " 打开tags用单击 let Tlist_Use_SingleClick=1 " close tag folders for inactive buffers let Tlist_File_Fold_Auto_Close=1 " show the fold indiactor column in the taglist window let Tlist_Enable_Fold_Column=1 " 自动更新TagList包含最新编辑的文件 let Tlist_Auto_Update=1 " 显示一个文件的tag let Tlist_Show_One_File=1 " 在右侧显示窗口 let Tlist_Use_Right_Window=1 " 按照名称排序 let Tlist_Sort_Type="name" " 让TagList始终解释文件中的tag,不管TagList窗口有没有打开 let Tlist_Process_File_Always=1 " 设置leader键 "nnoremap <leader>tl :TlistToggle<CR> let g:NERDTree_title='[NERD Tree]' function! NERDTree_Start() exec 'NERDTree' endfunction function! NERDTree_IsValid() return 1 endfunction " 设置winmanager " 设置界面分割 let g:winManagerWindowLayout = "NERDTree|TagList" "设置winmanager的宽度,默认为25 let g:winManagerWidth=30 "定义打开关闭winmanager快捷键为F8 "nmap <silent> <F8> :WMToggle<cr> nmap <silent> <F4> :if IsWinManagerVisible() <BAR> WMToggle<CR> <BAR> else <BAR> WMToggle<CR>:q<CR> endif <CR> "在进入vim时自动打开winmanager let g:AutoOpenWinManager=0
相关文章推荐
- 第十四周 项目五-是否二叉树?
- Allocation Tracker(Android Studio) 分析应用内存问题
- 创建计算字段
- 获取当前用户的网络状态--iOS
- hive中,向map类型插入数据时,需要str_to_map一下
- Error digesting Registry data org.xml.sax.SAXNotSupportedException
- hadoop支持lzo完整过程
- 常用排序算法(冒泡、选择、归并、快排、插入)
- 图形学优化_3: ogre设计模式_Factory Method (工厂方法模式)
- Android Studio插件和一些小技巧
- vi命令汇总
- java中queue的使用
- Animation动画详解(三)—— 代码生成alpha、scale、translate、rotate、set及插值器动画
- Coderforce题解
- 17个提升iOS开发效率的必用工具
- 正則表達式基础及java使用
- linux驱动学习笔记(linux驱动头文件说明)
- 小KTV学习-5
- 隔空取物——reflection
- 阿岳之_压缩和解压缩工具介绍篇