{"id":960,"date":"2014-03-02T07:51:39","date_gmt":"2014-03-01T23:51:39","guid":{"rendered":"https:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=960"},"modified":"2019-06-20T10:25:08","modified_gmt":"2019-06-20T02:25:08","slug":"upgrade-vim-version-to-7-4-tar-install","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=960","title":{"rendered":"Upgrade Vim version to 7.4 (tar install)"},"content":{"rendered":"<p><a href=\"?p=955\" title=\"Upgrade Vim version to 7.4\">\u524d\u4e00\u7bc7\u6587\u7ae0<\/a>\u5c07vim\u66f4\u65b0\u81f37.4\u5f8c\u4e0d\u50c5plugin\u5b89\u88dd\u5931\u6557\uff0c\u9023syntax\u984f\u8272\u90fd\u4e0d\u898b\u4e86<br \/>\n\u6240\u4ee5\u5c31\u4f86\u8a66\u8a66\u770b\u53e6\u5916\u7528tar\u5b89\u88dd\u7684\u65b9\u5f0f<br \/>\n(\u4f46\u61c9\u8a72\u53ea\u662fBundleInstall\u6c92\u6709\u57f7\u884c&#8230;.\uff0c\u4e0d\u904e\u90fd\u79fb\u9664\u91cd\u65b0\u5b89\u88dd\u4e86\u5c31\u6c92\u518d\u8a66\u4e86)<!--more--><\/p>\n<p>\u57fa\u672c\u4e0a\u6e96\u5099\u5de5\u4f5c\u5927\u81f4\u76f8\u540c\uff0c\u53c3\u8003 <a href=\"http:\/\/blog.guetsec.org\/?p=141\" target=\"_blank\" rel=\"noopener noreferrer\">1<\/a> <a href=\"http:\/\/sudoers-d.com\/blog\/2013\/01\/18\/installing-vim-on-centos-6-dot-3\/\" target=\"_blank\" rel=\"noopener noreferrer\">2<\/a><br \/>\n\u5148\u5b89\u88dd\u57fa\u672c\u9700\u6c42\u5957\u4ef6<\/p>\n<pre lang=\"bash\">\n[root@WP ~]# yum groupinstall 'Development Tools'\n[root@WP ~]# yum install ruby\n[root@WP ~]# yum install perl-devel python-devel ruby-devel\n[root@WP ~]# yum install perl-ExtUtils-Embed ncurses-devel\n<\/pre>\n<p>\u4e0b\u8f09vim tar\u6a94\u6848\u4e26\u89e3\u58d3\u7e2e<\/p>\n<pre lang=\"bash\">\n[root@WP ~]# cd \/tmp\n[root@WP tmp]# mkdir vim_install\n[root@WP vim_install]# cd vim_install\n[root@WP vim_install]#wget http:\/\/ftp.vim.org\/pub\/vim\/unix\/vim-7.4.tar.bz2\n[root@WP vim_install]#wget http:\/\/ftp.vim.org\/pub\/vim\/extra\/vim-7.2-lang.tar.gz\n[root@WP vim_install]#wget http:\/\/ftp.vim.org\/pub\/vim\/extra\/vim-7.2-extra.tar.gz\n[root@WP vim_install]#tar xf vim-7.4.tar.bz2\n[root@WP vim_install]#tar xf vim-7.2-extra.tar.gz\n[root@WP vim_install]#tar xf vim-7.2-lang.tar.gz\n[root@WP vim_install]#mv vim72 vim74\n[root@WP src]#cd vim\/74\/src\n<\/pre>\n<p>\u7de8\u8b6f\u5b89\u88dd\u6a94\u6848\uff0c\u9019\u908amake\u6709\u52a0\u53c3\u6578-j\uff0c\u6309\u7167\u7db2\u8def\u770b\u5230\u7684\u8aaa\u660e\u662f\u8aaa\u9019\u5c07\u4ee5\u591a\u7dda\u7a0b\u8655\u7406\uff0c\u4e0d\u904e\u662f\u6c92\u5565\u611f\u89ba\u6709\u8b8a\u5feb&#8230;\u4e3b\u6a5f\u554f\u984c\u5427<br \/>\n\u53e6\u5916\u8981\u6ce8\u610fpython\u76ee\u9304\u4f4d\u7f6e\u7684\u90e8\u5206<\/p>\n<pre lang=\"bash\">\n[root@WP src]#.\/configure -with-features=huge -enable-rubyinterp -enable-pythoninterp -with-python-config-dir=\/usr\/lib\/python2.6 -enable-perlinterp -enable-gui=gtk2 -enable-cscope\n[root@WP src]#make -j4 && make install\n<\/pre>\n<p>\u63a5\u8457\u5b89\u88ddvundle\uff0c\u5c07\u5229\u7528\u5b83\u4f86\u5b89\u88dd\u4e00\u4e9bplugin\u7684\u90e8\u5206\uff0c\u82e5\u6307\u4ee4\u57f7\u884c\u767c\u73fe\u76ee\u9304\u5df2\u5b58\u5728~\u6211\u662f\u5148\u628a\u820a\u7684\u76ee\u9304\u780d\u6389&#8230;<\/p>\n<pre lang=\"bash\">\ngit clone https:\/\/github.com\/gmarik\/vundle ~\/.vim\/bundle\/vundle\n<\/pre>\n<p>\u7136\u5f8c\u5148\u7de8\u8f2fvimrc<\/p>\n<pre lang=\"bash\">\n[root@WP src]# vim \/etc\/vimrc\n\nsyntax on\n\nset nocompatible              \" be iMproved, required\nfiletype off                  \" required\n\n\" set the runtime path to include Vundle and initialize\nset rtp+=~\/.vim\/bundle\/vundle\/\ncall vundle#rc()\n\" alternatively, pass a path where Vundle should install bundles\n\"let path = '~\/some\/path\/here'\n\"call vundle#rc(path)\n\n\" let Vundle manage Vundle, required\nBundle 'gmarik\/vundle'\n\n\" The following are examples of different formats supported.\n\" Keep bundle commands between here and filetype plugin indent on.\n\" scripts on GitHub repos\nBundle 'tpope\/vim-fugitive'\nBundle 'Lokaltog\/vim-easymotion'\nBundle 'tpope\/vim-rails.git'\n\" The sparkup vim script is in a subdirectory of this repo called vim.\n\" Pass the path to set the runtimepath properly.\nBundle 'rstacruz\/sparkup', {'rtp': 'vim\/'}\n\" scripts from http:\/\/vim-scripts.org\/vim\/scripts.html\nBundle 'L9'\nBundle 'FuzzyFinder'\n\" scripts not on GitHub\nBundle 'git:\/\/git.wincent.com\/command-t.git'\n\" git repos on your local machine (i.e. when working on your own plugin)\nBundle 'file:\/\/\/home\/gmarik\/path\/to\/plugin'\n\" ...\n\nfiletype plugin indent on     \" required\n\"\n\" Brief help\n\" :BundleList          - list configured bundles\n\" :BundleInstall(!)    - install (update) bundles\n\" :BundleSearch(!) foo - search (or refresh cache first) for foo\n\" :BundleClean(!)      - confirm (or auto-approve) removal of unused bundles\n\"\n\" see :h vundle for more details or wiki for FAQ\n\" NOTE: comments after Bundle commands are not allowed.\n<\/pre>\n<p>\u63a5\u8457\u4fbf\u9032\u5165vim\u7a0b\u5f0f\u57f7\u884c:bundleInstall<br \/>\n(\u9019\u908a\u6703\u8df3\u932f\uff0c\u4f46\u662f\u770b\u4e0d\u51fa\u54ea\u88e1\u6709\u932f)<\/p>\n<p>\u9019\u6642\u5019\u5728vim\u5167\u57f7\u884c:scriptnames \u61c9\u8a72\u5c31\u53ef\u4ee5\u770b\u5230\u883b\u591a\u5df2\u5b89\u88dd\u7684script\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e00\u7bc7\u6587\u7ae0\u5c07vim\u66f4\u65b0\u81f37.4\u5f8c\u4e0d\u50c5plugin\u5b89\u88dd\u5931\u6557\uff0c\u9023syntax\u984f\u8272\u90fd\u4e0d\u898b\u4e86 \u6240\u4ee5\u5c31\u4f86\u8a66\u8a66\u770b\u53e6\u5916\u7528tar\u5b89\u88dd\u7684\u65b9\u5f0f (\u4f46\u61c9\u8a72\u53ea\u662fBundleInstall\u6c92\u6709\u57f7\u884c&#8230;.\uff0c\u4e0d\u904e\u90fd\u79fb\u9664\u91cd\u65b0\u5b89\u88dd\u4e86\u5c31\u6c92\u518d\u8a66\u4e86)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-960","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=960"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/960\/revisions"}],"predecessor-version":[{"id":2052,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/960\/revisions\/2052"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}