I compiled vim8.1 with the following options :
$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 18 2018 09:50:18)
Included patches: 1-320
Compiled by mohsen@ns1
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +extra_search +mouse_netterm +tag_old_static
+arabic +farsi +mouse_sgr -tag_any_white
+autocmd +file_in_path -mouse_sysmouse -tcl
+autochdir +find_in_path +mouse_urxvt +termguicolors
-autoservername +float +mouse_xterm -terminal
+balloon_eval +folding +multi_byte +terminfo
+balloon_eval_term -footer +multi_lang +termresponse
+browse +fork() -mzscheme +textobjects
++builtin_terms +gettext +netbeans_intg +timers
+byte_offset -hangul_input +num64 +title
+channel +iconv +packages +toolbar
+cindent +insert_expand +path_extra +user_commands
+clientserver +job +perl +vartabs
+clipboard +jumplist +persistent_undo +vertsplit
+cmdline_compl +keymap +postscript +virtualedit
+cmdline_hist +lambda +printer +visual
+cmdline_info +langmap +profile +visualextra
+comments +libcall +python/dyn +viminfo
+conceal +linebreak +python3/dyn +vreplace
+cryptv +lispindent +quickfix +wildignore
+cscope +listcmds +reltime +wildmenu
+cursorbind +localmap +rightleft +windows
+cursorshape +lua +ruby +writebackup
+dialog_con_gui +menu +scrollbind +X11
+diff +mksession +signs -xfontset
+digraphs +modify_fname +smartindent +xim
+dnd +mouse +startuptime +xpm
-ebcdic +mouseshape +statusline +xsmp_interact
+emacs_tags +mouse_dec -sun_workshop +xterm_clipboard
+eval +mouse_gpm +syntax -xterm_save
+ex_extra -mouse_jsbterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/opt/vim8/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lcrypt -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm
Now, When I put the following line in my vimrc, I get error.
YouCompleteMe unavailable: requires Vim compiled with Python (2.7.1+ or 3.4+) support.
I compiled with python,
The line of vimrc
:
Bundle 'YouCompleteMe'
Where's my problem? My vimrc is :
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Bundle 'YouCompleteMe'
Plugin 'tpope/vim-fugitive'
Plugin 'command-t'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end() " required
filetype plugin indent on " required
Plugin 'tmhedberg/SimpylFold'
filetype plugin on
set splitbelow
set splitright
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set foldmethod=indent
set foldlevel=99
nnoremap <space> za
let g:SimpylFold_docstring_preview=1
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
Plugin 'vim-scripts/indentpython.vim'
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h "match BadWhitespace /\s\+$/
set encoding=utf-8
python3 import sys; print(sys.version)
orpython import sys; print sys.version
(note, most likely you won't be able to run both commands in the same session). Also you might check:set pyhondll? pythonthreedll? pythonhome?
after running the previous commandlibpython3
)../configure
and added--with-python-command=/usr/bin/python
:help python
page.