代码改变世界

Ubuntu 12.04本地编译安装Vim

2016-01-20 13:12  cascle  阅读(358)  评论(0编辑  收藏  举报

1.下载Vim,参考http://www.vim.org/git.php

 

2.编译安装Vim,参考https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

 

3.编译支持lua的Vim,参考https://gist.github.com/jdewit/9818870

 

编译好的Vim信息如下

nathan@nathan:~/code/code_for_compile/vim$ vim --version
 1 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 20 2016 12:10:26)
 2 包含补丁: 1-1143
 3 编译者 nathan@nathan
 4 巨型版本 带 GTK2 图形界面。
 5   可使用(+)与不可使用(-)的功能:
 6 +acl             +farsi           +mouse_netterm   +syntax
 7 +arabic          +file_in_path    +mouse_sgr       +tag_binary
 8 +autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
 9 +balloon_eval    +float           +mouse_urxvt     -tag_any_white
10 +browse          +folding         +mouse_xterm     -tcl
11 ++builtin_terms  -footer          +multi_byte      +terminfo
12 +byte_offset     +fork()          +multi_lang      +termresponse
13 +cindent         +gettext         -mzscheme        +textobjects
14 +clientserver    -hangul_input    +netbeans_intg   +title
15 +clipboard       +iconv           +path_extra      +toolbar
16 +cmdline_compl   +insert_expand   -perl            +user_commands
17 +cmdline_hist    +jumplist        +persistent_undo +vertsplit
18 +cmdline_info    +keymap          +postscript      +virtualedit
19 +comments        +langmap         +printer         +visual
20 +conceal         +libcall         +profile         +visualextra
21 +cryptv          +linebreak       +python          +viminfo
22 +cscope          +lispindent      -python3         +vreplace
23 +cursorbind      +listcmds        +quickfix        +wildignore
24 +cursorshape     +localmap        +reltime         +wildmenu
25 +dialog_con_gui  +lua             +rightleft       +windows
26 +diff            +menu            +ruby            +writebackup
27 +digraphs        +mksession       +scrollbind      +X11
28 +dnd             +modify_fname    +signs           -xfontset
29 -ebcdic          +mouse           +smartindent     +xim
30 +emacs_tags      +mouseshape      -sniff           +xsmp_interact
31 +eval            +mouse_dec       +startuptime     +xterm_clipboard
32 +ex_extra        -mouse_gpm       +statusline      -xterm_save
33 +extra_search    -mouse_jsbterm   -sun_workshop    -xpm
34      系统 vimrc 文件: "$VIM/vimrc"
35      用户 vimrc 文件: "$HOME/.vimrc"
36  第二用户 vimrc 文件: "~/.vim/vimrc"
37       用户 exrc 文件: "$HOME/.exrc"
38     系统 gvimrc 文件: "$VIM/gvimrc"
39     用户 gvimrc 文件: "$HOME/.gvimrc"
40 第二用户 gvimrc 文件: "~/.vim/gvimrc"
41         系统菜单文件: "$VIMRUNTIME/menu.vim"
42          $VIM 预设值: "/usr/share/vim"
43   $VIMRUNTIME 预设值: "/usr/share/vim/vim74"
44 编译方式: 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/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
45 链接方式: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl   -ldl  -L/usr/include/lua5.1/lib/x86_64-linux-gnu -lluajit-5.1  -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions   -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib    
46 nathan@nathan:~/code/code_for_compile/vim$

perl还是不支持,看来需要安装或配置perl的dev环境