{"id":46302,"date":"2023-04-18T09:44:03","date_gmt":"2023-04-18T01:44:03","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=46302"},"modified":"2023-04-18T09:44:03","modified_gmt":"2023-04-18T01:44:03","slug":"easymake-vim8","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/easymake-vim8.html","title":{"rendered":"\u8f7b\u677e\u5b66\u4f1a\u6e90\u7801\u7f16\u8bd1Vim 8.0"},"content":{"rendered":"

 <\/p>\n

\"\"<\/p>\n

1\u3001\u9996\u5148\uff0c\u5b89\u88c5\u5305\u62ec Git \u5728\u5185\u7684\u6240\u6709\u5fc5\u5907\u7684\u5e93\u3002<\/strong><\/div>\n

\u5bf9\u4e8e\u4e00\u4e2a Debian \u7c7b\u7684 Linux \u53d1\u884c\u7248\uff0c\u4f8b\u5982 Ubuntu\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n

sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \\\r\nlibgtk2.0-dev libatk1.0-dev libbonoboui2-dev \\\r\nlibcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \\\r\npython3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git<\/pre>\n

\u5728 Ubuntu 16.04 \u4e0a\uff0clua \u5f00\u53d1\u5305\u7684\u540d\u79f0\u662f liblua5.1-dev<\/span>\u800c\u975e lua5.1-dev<\/span>\u3002
\n\u5982\u679c\u4f60\u77e5\u9053\u4f60\u5c06\u4f7f\u7528\u54ea\u79cd\u8bed\u8a00\uff0c\u53ef\u968f\u610f\u5220\u53bb\u4f60\u4e0d\u9700\u8981\u7684\u5305\u3002\u4f8b\u5982\uff1aPython2\u00a0python-dev<\/span>\u6216\u8005\u662f Ruby\u00a0ruby-dev<\/span>\u3002\u8fd9\u4e00\u539f\u5219\u9002\u7528\u4e8e\u672c\u6587\u7684\u5927\u90e8\u5206\u5185\u5bb9\u3002<\/p>\n

\u5bf9\u4e8e Fedora 20\uff0c\u5c06\u662f\u4ee5\u4e0b\u547d\u4ee4:<\/p>\n

sudo yum install -y ruby ruby-devel lua lua-devel luajit \\\r\nluajit-devel ctags git python python-devel \\\r\npython3 python3-devel tcl-devel \\\r\nperl perl-devel perl-ExtUtils-ParseXS \\\r\nperl-ExtUtils-XSpp perl-ExtUtils-CBuilder \\\r\nperl-ExtUtils-Embed<\/pre>\n

\u5728 Fedora 20 \u4e0a\u9700\u8981\u8fd9\u4e00\u6b65\u6765\u7ea0\u6b63\u5b89\u88c5 XSubPP \u65f6\u51fa\u73b0\u7684\u95ee\u9898\uff1a<\/p>\n

### \u4ece \/usr\/bin \u5230 perl \u76ee\u5f55\u505a\u4e2a xsubpp (perl) \u7684\u7b26\u53f7\u94fe\u63a5<\/p>\n

sudo ln -s \/usr\/bin\/xsubpp \/usr\/share\/perl5\/ExtUtils\/xsubpp<\/pre>\n
2\u3001\u5982\u679c\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86 vim\uff0c\u5220\u6389\u5b83\u3002<\/strong><\/div>\n
sudo apt-get remove vim vim-runtime gvim<\/pre>\n

\u5982\u679c\u662f Ubuntu 12.04.2\uff0c\u4f60\u6216\u8bb8\u4e5f\u9700\u8981\u540c\u65f6\u5220\u9664\u4e0b\u9762\u8fd9\u4e9b\u8f6f\u4ef6\u5305:<\/p>\n

sudo apt-get remove vim-tiny vim-common vim-gui-common vim-nox<\/pre>\n

 <\/p>\n

3\u3001\u83b7\u53d6 vim \u6e90\u4ee3\u7801.<\/strong><\/div>\n

\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u4f7f\u7528python\uff0c\u4f60\u7684\u914d\u7f6e\u76ee\u5f55\u6216\u8bb8\u6709\u4e00\u4e2a\u7279\u5b9a\u7684\u673a\u5668\u540d(\u4f8b\u5982\u00a0config-3.5m-x86_64-linux-gnu<\/span>)\u3002\u68c0\u67e5\/usr\/lib\/python[2\/3\/3.5]<\/span>\u76ee\u5f55\u6765\u627e\u5230\u4f60\u7684 python \u914d\u7f6e\u76ee\u5f55\uff0c\u636e\u6b64\u66f4\u6539 python-config-dir<\/span>\u548c\/\u6216python3-config-dir<\/span>\u7684\u53c2\u6570\u3002<\/p>\n

\u6dfb\u52a0\/\u5220\u9664\u4e0b\u9762\u7684\u7f16\u8bd1\u53c2\u6570\u4ee5\u9002\u5408\u60a8\u7684\u8bbe\u7f6e\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u4e0d\u6253\u7b97\u5199\u4efb\u4f55 Lua \u811a\u672c\uff0c\u60a8\u53ef\u4ee5\u5220\u53bb\u00a0enable-luainterp<\/span>\u3002\u540c\u65f6\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u7684\u4e0d\u662fvim8.0\uff0c\u8bf7\u786e\u8ba4\u4e0b\u9762VIMRUNTIMEDIR<\/span>\u53c2\u6570\u8bbe\u7f6e\u6b63\u786e\uff08\u4f8b\u5982\uff0c\u5982\u679c\u4f7f\u7528vim8.0a,\u5c31\u7528\/usr\/share\/vim\/vim80a<\/span>\uff09\u3002\u8bb0\u4f4f\uff0c\u4e00\u4e9b vim \u5b89\u88c5\u662f\u76f4\u63a5\u5b89\u88c5 \/usr\/share\/vim<\/span><\/p>\n

\u4e0b\u7684\uff1b\u8c03\u6574\u597d\u53c2\u6570\u4ee5\u9002\u5e94\u4f60\u7684\u7cfb\u7edf:<\/p>\n

cd ~\r\ngit clone https:\/\/github.com\/vim\/vim.git\r\ncd vim\r\n.\/configure --with-features=huge \\\r\n--enable-multibyte \\\r\n--enable-rubyinterp=yes \\\r\n--enable-pythoninterp=yes \\\r\n--with-python-config-dir=\/usr\/lib\/python2.7\/config \\\r\n--enable-python3interp=yes \\\r\n--with-python3-config-dir=\/usr\/lib\/python3.5\/config \\\r\n--enable-perlinterp=yes \\\r\n--enable-luainterp=yes \\\r\n--enable-gui=gtk2 --enable-cscope --prefix=\/usr\r\nmake VIMRUNTIMEDIR=\/usr\/share\/vim\/vim80<\/pre>\n

\u5728 Ubuntu 16.04 \u4e0a\uff0c\u7531\u4e8e\u540c\u65f6\u5f00\u542f\u4e86 Python2 \u548c Python3\uff0cPython \u652f\u6301\u5c06\u4e0d\u5de5\u4f5c\u3002 \u9605\u8bfb chirinosky \u7684\u56de\u7b54 \u4ee5\u83b7\u53d6\u53d8\u901a\u7684\u5904\u7406\u65b9\u6cd5\u3002<\/p>\n

\u5982\u679c\u4f60\u60f3\u5c06\u6765\u8f7b\u677e\u5378\u8f7d vim\uff0c\u53ef\u4ee5\u4f7f\u7528\u00a0checkinstall<\/span>\u6765\u5b89\u88c5 \u3002<\/p>\n

sudo apt-get install checkinstall\r\ncd ~\/vim\r\nsudo checkinstall<\/pre>\n

\u5426\u5219\uff0c\u53ef\u4ee5\u4f7f\u7528\u00a0make<\/span>\u6765\u5b89\u88c5\u3002<\/p>\n

cd ~\/vim\r\nsudo make install<\/pre>\n

\u8981\u8ba9 vim \u6210\u4e3a\u4f60\u9ed8\u8ba4\u7684\u7f16\u8f91\u5668\uff0c\u8bf7\u4f7f\u7528\u00a0update-alternative<\/span>\u3002<\/p>\n

sudo update-alternatives --install \/usr\/bin\/editor editor \/usr\/bin\/vim 1\r\nsudo update-alternatives --set editor \/usr\/bin\/vim\r\nsudo update-alternatives --install \/usr\/bin\/vi vi \/usr\/bin\/vim 1\r\nsudo update-alternatives --set vi \/usr\/bin\/vim<\/pre>\n
4\u3001 \u786e\u8ba4 Vim \u5e94\u7528\u7a0b\u5e8f\u7248\u672c\u3002<\/strong><\/div>\n

\u5982\u679c\u4f60\u7684 gvim \u4e0d\u5de5\u4f5c\uff08\u5728 ubuntu 12.04.1 LTS \u4e0a\uff09\uff0c\u8bd5\u7740\u628a\u00a0--enable-gui=gtk2<\/span>\u53c2\u6570\u53d8\u4e3a\u00a0--enable-gui=gnome2<\/span>\u3002<\/p>\n

\u5982\u679c\u4f60\u9047\u5230\u95ee\u9898\uff0c\u4ed4\u7ec6\u68c0\u67e5\u5728\u6b65\u9aa4 3 \u5f00\u59cb\u63d0\u5230\u7684\uff0c\u4f7f\u7528\u6b63\u786e\u7684 Python \u914d\u7f6e\u76ee\u5f55\u914d\u7f6e\u00a0configure<\/span>\u3002<\/p>\n

\u8fd9\u4e9b\u00a0configure<\/span>\u548c\u00a0 make<\/span>\u547d\u4ee4\u5047\u8bbe\u4f60\u662f\u4e00\u4e2a Debian \u53d1\u884c\u7248\uff0cVim \u7684\u8fd0\u884c\u5e93\u6587\u4ef6\u76ee\u5f55\u653e\u5728\u00a0\/usr\/share\/vim\/vim80\/<\/span>\uff0c\u8fd9\u4e0d\u662f vim \u7684\u9ed8\u8ba4\u8def\u5f84\u3002 \u5728 configure<\/span>\u547d\u4ee4\u4e2d\u7684 --prefix=\/usr<\/span>\u4e5f\u662f\u5982\u6b64\u3002\u8fd9\u4e9b\u53c2\u6570\u6216\u8bb8\u5bf9\u4e00\u4e2a\u4e0d\u662f\u57fa\u4e8e Debian \u7684 Linux \u53d1\u884c\u7248\u6765\u8bf4\u662f\u6709\u6240\u4e0d\u540c\u7684\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8bd5\u7740\u79fb\u9664 configure<\/span>\u547d\u4ee4\u4e2d\u7684 --prefix<\/span>\u53d8\u91cf\u548c make<\/span>\u547d\u4ee4\u4e2d\u7684\u00a0VIMRUNTIMEDIR<\/span>(\u6362\u53e5\u8bdd\u8bf4\uff0c\u4f7f\u7528\u8fd9\u4e9b\u53c2\u6570\u7684\u9ed8\u8ba4\u503c)\u3002<\/p>\n


\n

via: https:\/\/github.com\/Valloric\/YouCompleteMe\/wiki\/Building-Vim-from-source<\/p>\n

\u4f5c\u8005\uff1aVal Markovic \u7b49\u4eba \u8bd1\u8005\uff1azky001 \u6821\u5bf9\uff1ajasminepeng<\/p>\n

\u672c\u6587\u7531 LCTT \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8094-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1a http:\/\/lrxjmw.cn\/easymake-vim8.html<\/a>\u7f16\u8f91\uff1a\u674e\u5e05\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

  1\u3001\u9996\u5148\uff0c\u5b89\u88c5\u5305\u62ec Git \u5728\u5185\u7684\u6240\u6709\u5fc5\u5907\u7684\u5e93\u3002 \u5bf9\u4e8e\u4e00\u4e2a Debian \u7c7b\u7684 Linux \u53d1\u884c […]<\/p>\n","protected":false},"author":63,"featured_media":46321,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-46302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=46302"}],"version-history":[{"count":19,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46302\/revisions"}],"predecessor-version":[{"id":269754,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/46302\/revisions\/269754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/46321"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=46302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=46302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=46302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}