Skip to content

Commit 7f57b4a

Browse files
committed
bugfix vim 8.1: E319: Sorry, the command is not available in this version: py << EOF
1 parent 3a91c91 commit 7f57b4a

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

install-plugins.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function init {
2727
}
2828

2929
function rebuild() {
30-
cd ~/.vim/plugged/YouCompleteMe && git submodule update --init --recursive && ./install.py "$@"
30+
cd ~/.vim/plugged/YouCompleteMe && git submodule update --init --recursive && python3 install.py "$@"
3131
}
3232

3333
function usage {

scripts/init-vim-centos.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ sudo yum -y remove vim
77

88
cd ~ && rm -rf vim && git clone git@github.com:vim/vim.git && cd vim
99
./configure --with-features=huge \
10-
--enable-multibyte \
11-
--enable-pythoninterp \
12-
#--with-python-config-dir=/usr/lib/python2.7/config \
13-
--enable-python3interp \
14-
#--with-python3-config-dir=/usr/lib/python3.4/config \
15-
--with-mac-arch=x86_64 \
16-
--enable-gui=gtk2 --enable-cscope --prefix=/usr
10+
--enable-multibyte \
11+
--enable-rubyinterp=yes \
12+
#--enable-pythoninterp=yes \
13+
#--with-python-config-dir=/usr/lib/python2.7/config \
14+
#--enable-python3interp=yes \
15+
#--with-python3-config-dir=/usr/lib/python3.6/config \
16+
--enable-pythoninterp=dynamic \
17+
--enable-python3interp=dynamic \
18+
--enable-perlinterp=yes \
19+
--enable-luainterp=yes \
20+
--enable-gui=gtk2 \
21+
--enable-cscope \
22+
--prefix=/usr/local
1723
make VIMRUNTIMEDIR=/usr/local/share/vim/vim81
1824
sudo make install

scripts/init-vim-ubuntu.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ sudo apt-get remove -y vim vim-runtime gvim
2222
echoo ">>> Install vim ..."
2323
cd ~ && rm -rf vim && git clone https://github.com/vim/vim.git && cd vim
2424
./configure --with-features=huge \
25-
--enable-multibyte \
26-
--enable-pythoninterp \
27-
#--with-python-config-dir=/usr/lib/python2.7/config \
28-
--enable-python3interp \
29-
#--with-python3-config-dir=/usr/lib/python3.4/config \
30-
--with-mac-arch=x86_64 \
31-
--enable-gui=gtk2 --enable-cscope --prefix=/usr
25+
--enable-multibyte \
26+
--enable-rubyinterp=yes \
27+
#--enable-pythoninterp=yes \
28+
#--with-python-config-dir=/usr/lib/python2.7/config \
29+
#--enable-python3interp=yes \
30+
#--with-python3-config-dir=/usr/lib/python3.6/config \
31+
--enable-pythoninterp=dynamic \
32+
--enable-python3interp=dynamic \
33+
--enable-perlinterp=yes \
34+
--enable-luainterp=yes \
35+
--enable-gui=gtk2 \
36+
--enable-cscope \
37+
--prefix=/usr/local
3238
make VIMRUNTIMEDIR=/usr/local/share/vim/vim81
3339
sudo make install

vimrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Plug 'jnurmine/Zenburn'
2424
Plug 'flazz/vim-colorschemes'
2525

2626
" best auto complete tool I have ever used(jedi, supertab...)
27-
Plug 'Valloric/YouCompleteMe', {'tag': '1e38a2b'}
27+
Plug 'Valloric/YouCompleteMe', {'tag': 'c9ff2177'}
2828

2929
" tree explore plugin
3030
Plug 'scrooloose/nerdtree'
@@ -129,7 +129,7 @@ let g:ycm_complete_in_strings = 1
129129
let g:ycm_autoclose_preview_window_after_completion = 1
130130
let g:ycm_autoclose_preview_window_after_insertion = 1
131131
" let g:ycm_filetype_whitelist = { 'python': 1 }
132-
let g:ycm_python_binary_path = 'python'
132+
let g:ycm_python_binary_path = 'python3'
133133
map <C-G> :YcmCompleter GoToDefinitionElseDeclaration<CR>
134134
" fix .cpp error: ValueError: Still no compile flags, no completions yet.
135135
let g:ycm_global_ycm_extra_conf = '~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
@@ -154,7 +154,7 @@ au BufNewFile,BufRead *.go
154154
\ set nolist
155155

156156
"python with virtualenv support
157-
py << EOF
157+
py3 << EOF
158158
import os
159159
import sys
160160
if 'VIRTUAL_ENV' in os.environ:

0 commit comments

Comments
 (0)