由於我的網絡問題,我download vim的原碼進行手動編譯:
碰到的問題:
1:編譯的時候找不到python.h ??
編譯的vim的時候需要python 支持,有兩種一種python2, python3, 若出現此錯誤都需要安裝python2.7-dev 或者python3.5-dev,然后重新執行configure ,make ,解決
2: 編譯出來的vim 不支持clipboard?
configure 在配置的時候會出現一堆的"checking ...", 會出現"checking if X11 header files can be found... no"
安裝啦libgtk2.0-dev, libgnome2-dev, 仍然不行, 最后安裝libxt-dev, 然后執行:
./configure --with-feature=huge --with-x , 然后查看上面的checking if x11 , 尾部是yes, 就可以咯
用vim --version | grep clipboard 可以看出一直是減號, 后來安裝X11-dev等的各種,然后重新configure:
./configure --with-features=huge --enable-gui=auto --enable-gtk2-check --enable-gnome-check --with-x make && sudo make install vim --version
結合第一個支持python的vim, 重新整理configure:
./configure --with-features=huge--enable-gui=auto --enable-gtk2-check --enable-gnome-check --with-x --enable-python3interp
--enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-rubyinterp
--enable-luainterp --enable-perlinterp --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/
--enable-multibyte --enable-cscope --enable-gui=gnome2 --with-compiledby="magnum.peng@dji.com"
make && sudo make install
dji@dji-ThinkPad-X250:~/Downloads/vim-8.0.0000$ vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 21 2016 22:45:24) Compiled by magnum.peng@dji.com Huge version with GTK2-GNOME GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_old_static +arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float +mouse_urxvt -tcl +balloon_eval +folding +mouse_xterm +termguicolors +browse -footer +multi_byte +terminfo ++builtin_terms +fork() +multi_lang +termresponse +byte_offset +gettext -mzscheme +textobjects +channel -hangul_input +netbeans_intg +timers +cindent +iconv +num64 +title +clientserver +insert_expand +packages +toolbar +clipboard +job +path_extra +user_commands +cmdline_compl +jumplist -perl +vertsplit +cmdline_hist +keymap +persistent_undo +virtualedit +cmdline_info +lambda +postscript +visual +comments +langmap +printer +visualextra +conceal +libcall +profile +viminfo +cryptv +linebreak +python/dyn +vreplace +cscope +lispindent +python3/dyn +wildignore +cursorbind +listcmds +quickfix +wildmenu +cursorshape +localmap +reltime +windows +dialog_con_gui -lua +rightleft +writebackup +diff +menu +ruby +X11 +digraphs +mksession +scrollbind -xfontset +dnd +modify_fname +signs +xim -ebcdic +mouse +smartindent -xpm +emacs_tags +mouseshape +startuptime +xsmp_interact +eval +mouse_dec +statusline +xterm_clipboard +ex_extra -mouse_gpm -sun_workshop -xterm_save +extra_search -mouse_jsbterm +syntax +farsi +mouse_netterm +tag_binary
可以看到支持python 和 clipboard