use python2.7

This commit is contained in:
chxuan 2019-08-31 16:35:55 +08:00
parent 8a7900fb3f
commit eae0e7044c
3 changed files with 4 additions and 8 deletions

2
.vimrc
View File

@ -248,7 +248,7 @@ let g:ycm_warning_symbol = '✹'
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_complete_in_comments = 1
let g:ycm_complete_in_strings = 1
let g:ycm_server_python_interpreter = '/usr/bin/python'
let g:ycm_server_python_interpreter = '/usr/bin/python2.7'
let g:ycm_python_binary_path = 'python'
nnoremap <leader>u :YcmCompleter GoToDeclaration<cr>
" 已经使用cpp-mode插件提供的转到函数实现的功能

View File

@ -170,10 +170,6 @@ An automatic configuration program for vim
vimplus使用vim-plug作为插件管理器vim-plug可能由于界面没有刷新其实在安装所以进度一直停留在`Installing plugins (24/40)`,用户只需要耐心等待所有插件安装完成即可,或者直接`Ctrl+C`终止安装通过vim打开`~/.vimrc`并执行`:PlugInstall`命令安装剩余插件。
- **`The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library compiled for Python 3 but loaded in Python 2. Set the 'g:ycm_server_python_interpreter' option to a Python 3 interpreter path`**
编译ycm和运行ycmd server的python版本不一致导致的比如说编译ycm时使用系统默认版本python3后来又将系统默认版本改为python2解决该问题有三种方法第一编辑.vimrc将g:ycm_server_python_interpreter指向编译ycm时的python版本第二使用当前python版本重新编译ycm第三恢复系统默认的python版本。
- **`vimplus不支持目前用户正在使用的系统怎么办`**
可以给作者提[Issues][39]或者自己fork vimplus来修改并提交pr贡献自己的一份力量。

View File

@ -245,14 +245,14 @@ function install_ycm_on_linux()
git clone https://gitee.com/chxuan/YouCompleteMe_linux_with_clang.git ~/.vim/plugged/YouCompleteMe
cd ~/.vim/plugged/YouCompleteMe
./install.py --clang-completer
python2.7 ./install.py --clang-completer
}
# macos编译ycm, 原始方法
function compile_ycm_on_mac_legacy()
{
cd ~/.vim/plugged/YouCompleteMe
./install.py --clang-completer --system-libclang
python2.7 ./install.py --clang-completer --system-libclang
}
# macos编译ycm, Mojave上的方法
@ -262,7 +262,7 @@ function compile_ycm_on_mac_mojave()
xcode-select --install
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
cd ~/.vim/plugged/YouCompleteMe
./install.py --clang-completer
python2.7 ./install.py --clang-completer
}
# 在MacOS上安装ycm插件