use python2.7
This commit is contained in:
parent
8a7900fb3f
commit
eae0e7044c
2
.vimrc
2
.vimrc
@ -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插件提供的转到函数实现的功能
|
||||
|
||||
@ -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,贡献自己的一份力量。
|
||||
|
||||
@ -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插件
|
||||
|
||||
Loading…
Reference in New Issue
Block a user