vim配置python编辑器

来源:互联网 发布:linux命令进入e盘 编辑:程序博客网 时间:2024/05/24 02:09

环境:centos7 + python2.7

坑:centos7中自带的vim 版本是7.4.160,安装完成YMC后报:YouCompleteMe unavailable: requires Vim 7.4.1578+.

解决方法:升级VIM 到8版本后解决


vimrc配置文件:

set nocompatible              " be iMproved, requiredset backspace=2syntax on                     " 语法高亮filetype off                  " requiredfiletype indent on            " 根据文件类型缩进filetype plugin on            " for vim Makefileset nu                        " 显示行号" 缩进设置set autoindent                " 自动缩进set cindent                   " C风格缩进set smartindent               " 智能缩进" 普通文件Tab设置             set expandtabset tabstop=4set softtabstop=4set shiftwidth=4" 括号匹配set showmatchset matchtime=1               " 匹配高亮时间(单位是十分之一秒)set completeopt=longest,menu    "让Vim的补全菜单行为与一般IDE一致(参考VimTip1228)set rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" let Vundle manage Vundle, requiredPlugin 'gmarik/Vundle.vim'Plugin 'Valloric/YouCompleteMe'Plugin 'Chiel92/vim-autoformat'call vundle#end()            " requiredfiletype plugin indent on    " requiredlet g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'let g:ycm_complete_in_strings = 0 " 设置YCM不在字符串内补全let g:ycm_confirm_extra_conf = 0 let g:ycm_seed_identifiers_with_syntax = 1 



参考文章:

http://blog.csdn.net/nzyalj/article/details/75331822


原创粉丝点击