• Debian7编译VIM7.4


    [ 另: vim7.4源码在vs2013的编译方法 ]

    1 安装libncurses5库:
    apt-get install libncurses5-dev

    2 安装gvim需要的库:
    方法一: apt-get install libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev libperl-dev ruby-dev liblua5.1-0-dev
    方法二: apt-get build-dep vim-gtk
    (CentOS 用yum install安装相应的包)

    3 下载VIM7.4
    wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
    (For 7.3 and later, extra files and translations are included in the "All" archive)
    tar jxvf vim-7.4.tar.bz2

    4 patches
    cd vim74/ &&
    mkdir patches &&
    cd patches/ &&
    wget ftp://ftp.vim.org/pub/vim/patches/7.4/*

    cd .. &&
    for file in patches/7.4.*; do
        patch -Np0 -i $file
    done

    cd .. 
    for ((i=1;i<=9;i++)); do
        patch -Np0 -i patches/7.4.00$i 
    done
    for ((i=10;i<=99;i++)); do
        patch -Np0 -i patches/7.4.0$i 
    done
    for ((i=100;i<=2361;i++)); do
        patch -Np0 -i patches/7.4.$i 
    done


    5 编译安装
    echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h &&
    echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h &&
    ./configure --prefix=/usr/local/vim74 --with-features=huge
                --enable-multibyte --enable-fontset --enable-xim
                --enable-pythoninterp --enable-perlinterp
                --enable-rubyinterp --enable-luainterp
                --enable-cscope --enable-sniff
                --enable-gui=gtk2
                --with-compiledby="busor" &&
    make &&
    make install

    ln -s /usr/local/vim74/bin/vim /usr/local/bin/vim &&
    ln -s /usr/local/vim74/bin/vimtutor /usr/local/bin/vimtutor &&
    ln -s /usr/local/vim74/bin/gvimtutor /usr/local/bin/gvimtutor &&
    ln -s /usr/local/vim74/bin/xxd /usr/local/bin/xxd &&
    ln -s vim /usr/local/bin/vi &&
    ln -s vim /usr/local/bin/view &&
    ln -s vim /usr/local/bin/vimdiff &&
    ln -s vim /usr/local/bin/gvimdiff &&
    ln -s vim /usr/local/bin/gview &&
    ln -s vim /usr/local/bin/gvim

    6 验证
    vim --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 10 2014 15:56:53)
    包含补丁: 1-193
    编译者 busor
    巨型版本 带 GTK2 图形界面。  可使用(+)与不可使用(-)的功能:
    +acl             +farsi           +mouse_netterm   +syntax
    +arabic          +file_in_path    +mouse_sgr       +tag_binary
    +autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
    +balloon_eval    +float           +mouse_urxvt     -tag_any_white
    +browse          +folding         +mouse_xterm     -tcl
    ++builtin_terms  -footer          +multi_byte      +terminfo
    +byte_offset     +fork()          +multi_lang      +termresponse
    +cindent         +gettext         -mzscheme        +textobjects
    +clientserver    -hangul_input    +netbeans_intg   +title
    +clipboard       +iconv           +path_extra      +toolbar
    +cmdline_compl   +insert_expand   +perl            +user_commands
    +cmdline_hist    +jumplist        +persistent_undo +vertsplit
    +cmdline_info    +keymap          +postscript      +virtualedit
    +comments        +langmap         +printer         +visual
    +conceal         +libcall         +profile         +visualextra
    +cryptv          +linebreak       +python          +viminfo
    +cscope          +lispindent      -python3         +vreplace
    +cursorbind      +listcmds        +quickfix        +wildignore
    +cursorshape     +localmap        +reltime         +wildmenu
    +dialog_con_gui  +lua             +rightleft       +windows
    +diff            +menu            +ruby            +writebackup
    +digraphs        +mksession       +scrollbind      +X11
    +dnd             +modify_fname    +signs           -xfontset
    -ebcdic          +mouse           +smartindent     +xim
    +emacs_tags      +mouseshape      +sniff           +xsmp_interact
    +eval            +mouse_dec       +startuptime     +xterm_clipboard
    +ex_extra        -mouse_gpm       +statusline      -xterm_save
    +extra_search    -mouse_jsbterm   -sun_workshop    +xpm
         系统 vimrc 文件: "/etc/vimrc"
         用户 vimrc 文件: "~/.vimrc"
     第二用户 vimrc 文件: "~/.vim/vimrc"
          用户 exrc 文件: "~/.exrc"
        系统 gvimrc 文件: "/etc/gvimrc"
        用户 gvimrc 文件: "~/.gvimrc"
    第二用户 gvimrc 文件: "~/.vim/gvimrc"

  • 相关阅读:
    epoll的LT和ET(转)
    js和jQuery的互相转换
    Spring的回滚问题
    Spring的事务
    分布式锁的实现方式
    xml是什么
    ajax的4个字母分别是什么意思
    try、catch、finally都有return语句时执行哪个
    静态变量、实例变量、局部变量线程安全吗,为什么
    String和StringBuilder、StringBuffer的区别
  • 原文地址:https://www.cnblogs.com/busor/p/3598241.html
Copyright © 2020-2023  润新知