完整配置(参考)
set nocompatible
filetype on
set backspace=indent,eol,start
set number
colorscheme murphy
call plug#begin('~/.vim/plugged')
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
Plug 'preservim/nerdtree'
Plug 'ctrlpvim/ctrlp.vim'
call plug#end()
let g:ycm_global_ycm_extra_conf='~/.vim/plugged/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_seed_identifiers_with_syntax=1
let g:ycm_confrm_extra_conf=0
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
set completeopt=longest,menu
nnoremap <F5> :echo system('python2 "' . expand('%') . '"')<cr>
nnoremap <F9> :echo system('python3 "' . expand('%') . '"')<cr>
" 目录树配置<<<<<<<<<<<<<<<<<<<<<
" 打开vim时,自动打开NERDTree
autocmd vimenter * NERDTree
" 设置NerdTree打开的快捷键,可自行更改
map <F2> :NERDTreeMirror<CR>
map <F2> :NERDTreeToggle<CR>
" ctrlp配置<<<<<<<<<<<<<<<<<<<<<<
let g:ctrlp_map = '<c-p>'
"python-mode<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<python-mode 配置
"开启警告
let g:pymode_warnings = 0
"保存文件时自动删除无用空格
let g:pymode_trim_whitespaces = 1
let g:pymode_options = 1
"显示允许的最大长度的列
let g:pymode_options_colorcolumn = 1
"设置QuickFix窗口的最大,最小高度
let g:pymode_quickfix_minheight = 3
let g:pymode_quickfix_maxheight = 10
"使用python3
let g:pymode_python = 'python3'
"使用PEP8风格的缩进
let g:pymode_indent = 1
"取消代码折叠
let g:pymode_folding = 0
"开启python-mode定义的移动方式
let g:pymode_motion = 1
"启用python-mode内置的python文档,使用K进行查找
let g:pymode_doc = 1
let g:pymode_doc_bind = 'K'
"自动检测并启用virtualenv
let g:pymode_virtualenv = 1
"let g:pymode_virtualenv_path = /home/changle/testl-eenv/venv
"不使用python-mode运行python代码
"let