"vundle配置"" set nocompatible " be iMproved filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " My Bundles here: " " original repos on github "Bundle 'tpope/vim-fugitive' "Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} " " vim-scripts repos #http://vim-scripts.org/vim/scripts.html "pydiction Bundle 'Pydiction' let g:pydiction_location = '~/.vim/bundle/Pydiction/complete-dict' "let g:pydiction_menu_height = 20 "TagList Bundle 'taglist.vim' let Tlist_Show_One_File=1 let Tlist_Exit_OnlyWindow=1 "启动vim自动打开taglist "let Tlist_Auto_Open=1 "WinManager,bufexplorer Bundle 'bufexplorer.zip' "Bundle 'winmanager' "let g:winManagerWindowLayout='BufExplorer,FileExplorer|TagList' "let g:winManagerWindowLayout='FileExplorer,BufExplorer|TagList' "let g:miniBufExplorerMoreThanOne = 0 "nmap wm :WMToggle Bundle 'scrooloose/nerdtree' "map :NERDTreeToggle "map :TlistToggle "let Tlist_Inc_Winwidth = 50 "golang Bundle 'jnwhiteh/vim-golang' "F7检查语法 Bundle 'vim-flake8' " 使用vim-syntastic需要flake8 Bundle 'scrooloose/syntastic' "在打开文件的时候检查 let g:syntastic_check_on_open=1 " non github repos "Bundle 'git://git.wincent.com/command-t.git' " ... filetype plugin indent on " required! " " Brief help " :BundleList - list configured bundles " :BundleInstall(!) - install(update) bundles " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles " " see :h vundle for more details or wiki for FAQ " NOTE: comments after Bundle command are not allowed.. "开启语法高亮 syntax on "窗口大小 if has('gui_running') set lines=35 columns=118 endif "显示当前的行号列号: set ruler "在状态栏显示正在输入的命令 set showcmd "关闭/打开配对括号高亮 "let loaded_matchparen = 1 "显示行号: set number "配色方案 colorscheme darkblue "去掉菜单栏 set guioptions-=m "去掉工具栏 set guioptions-=T "总是显示标签栏 set showtabline=2 "反显光标当前行颜色 if has('gui_running') set cursorline "hi cursorline guibg=#330003 endif "编码 "set encoding=utf-8 let &termencoding=&encoding set fileencodings=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,iso-8859-6 "自动补全 "关键字补全 " 即简单地补全到文档中已有的词,快捷键为 Ctrl-N 或 Ctrl-P。 "智能补全 " Vim 7中引入 Omni Complete,可根据语义补全,快捷键为 Ctrl-X Ctrl-O。 " set completeopt=longest,menu "自动补全命令时候使用菜单式匹配列表 set wildmenu autocmd FileType python set omnifunc=pythoncomplete#Complete set expandtab "一个tab4个空格 set tabstop=4 "每层缩进4个空格 set shiftwidth=4 "退格键,每次删除4个空格 set softtabstop=4 " "代码折叠可以只以缩进为依据 autocmd FileType python setlocal foldmethod=indent "默认展开所有代码 za会翻转当前位置的折叠状态 set foldlevel=99 " 增量式搜索,边输入边搜索 set incsearch " 高亮搜索 set hlsearch "自动切换目录 set autochdir "81列处高亮 set cc=81 " 备份,需要创建文件夹 set backup set dir=~/.vim/tmp/backup " backups:""" set backupdir=~/.vim/tmp/backup " backups:""" "let &backupext = '-' . substitute(expand("%:h"), '/', '-', 'g') . '~' function Replacetext(text) let r_text = a:text for sss in ['/','\','*','?','[','|','/<','/>'] let r_text = substitute(r_text, sss, '_', 'g') "echo r_text endfor return r_text endfunction let &backupext = '-' . Replacetext(expand("%:p")) . '~' """来自mswin.vim " backspace and cursor keys wrap to previous/next line set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d " CTRL-X and SHIFT-Del are Cut vnoremap "+x vnoremap "+x " CTRL-C and CTRL-Insert are Copy vnoremap "+y vnoremap "+y " CTRL-V and SHIFT-Insert are Paste map "+gP map "+gP cmap + cmap + " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. " Uses the paste.vim autoload script. exe 'inoremap