{"id":4346,"date":"2020-03-25T01:59:37","date_gmt":"2020-03-24T17:59:37","guid":{"rendered":"http:\/\/vip.fxxkpython.com\/?p=4346"},"modified":"2020-03-25T02:00:15","modified_gmt":"2020-03-24T18:00:15","slug":"%e5%b7%a5%e5%85%b7%e7%af%87-%e6%95%99%e4%bd%a0%e5%bc%84%e4%b8%80%e4%b8%aa%e9%85%b7%e7%82%ab%e7%9a%84-python-vim%e7%bc%96%e8%be%91%e5%99%a8%e4%b9%8b%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e8%a1%a5","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=4346","title":{"rendered":"\u5de5\u5177\u7bc7 | \u6559\u4f60\u5f04\u4e00\u4e2a\u9177\u70ab\u7684 Python Vim\u7f16\u8f91\u5668\u4e4b\u4ee3\u7801\u81ea\u52a8\u8865\u5168"},"content":{"rendered":"\n<p>\u63a5\u4e0b\u6765\u7ee7\u7eed\u4e3a\u4f60\u7684 Vim \u914d\u4e0a\u88c5\u5907\uff0c\u8ba9\u5b83\u63d0\u9ad8\u4f60\u7684\u7f16\u7a0b\u6548\u7387\uff0c\u63a5\u4e0b\u6765\u8fd9\u4e00\u7bc7\u5c0f\u5e05b\u4f1a\u8ddf\u4f60\u8bf4\u5982\u4f55\u914d\u7f6e Vim \u7684\u7f16\u5199\u4ee3\u7801\u884c\u4e3a\u2014\u2014\u5feb\u901f\u8865\u5168\u4ee3\u7801\u3002<\/p>\n\n\n\n<h2>Vim\u4ee3\u7801\u8865\u5168<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/ycm-core\/YouCompleteMe\">YouCompleteMe&nbsp;<\/a>\u662f\u4e00\u4e2a\u4e13\u95e8\u4e3a Vim \u6253\u9020\u7684\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u63d2\u4ef6\uff0c\u8fd9\u4e2a\u63d2\u4ef6\u53f7\u79f0 vim \u4e2d\u6700\u96be\u88c5\u7684\u63d2\u4ef6\u4e4b\u4e00\uff0c\u6240\u4ee5\u9700\u8981\u70b9\u8010\u5fc3\u54c8\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"860\" height=\"426\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/22.gif\" alt=\"\" class=\"wp-image-4348\"\/><\/figure><\/div>\n\n\n\n<p> \u56e0\u4e3a\u8fd9\u4e2a\u63d2\u4ef6\u9700\u8981 Python \u548c CMake \u73af\u5883\uff0c\u9700\u8981\u5148\u5b89\u88c5\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><code>sudo apt install build-essential cmake python3-dev <\/code><br><\/p><\/blockquote>\n\n\n\n<h2>\u5b89\u88c5\u65b9\u5f0f\u4e00\uff1a\u7f16\u8bd1\u5b89\u88c5 <\/h2>\n\n\n\n<p>\u63a5\u7740\u8fdb\u5165\u4f60\u7684 bundle \u76ee\u5f55\u4e2d\u4e0b\u8f7d YCM\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>cd .vim\/bundle\/<\/p><p>git clone https:\/\/github.com\/ycm-core\/YouCompleteMe.git<\/p><p><\/p><\/blockquote>\n\n\n\n<p>\u4e0b\u8f7d\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u7684 bundle \u6587\u4ef6\u4e0b\u4f1a\u591a\u4e00\u4e2a YouCompleteMe \u7684\u6587\u4ef6\u5939\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"678\" height=\"201\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-18-48-29.png\" alt=\"\" class=\"wp-image-4349\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-18-48-29.png 678w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-18-48-29-300x89.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/figure><\/div>\n\n\n\n<p>\u8fdb\u5165\u521a\u521a\u4e0b\u8f7d\u597d\u7684\u63d2\u4ef6\uff0c\u7136\u540e\u4f7f\u7528 Python install \u4e00\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><code>cd ~\/.vim\/bundle\/YouCompleteMe <\/code><\/p><p>git submodule update &#8211;init &#8211;recursive<\/p><p>python3 install.py &#8211;clang-completer<\/p><\/blockquote>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"734\" height=\"488\" src=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-20-33-55.png\" alt=\"\" class=\"wp-image-4350\" srcset=\"https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-20-33-55.png 734w, https:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/03\/Screenshot-from-2020-03-24-20-33-55-300x199.png 300w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/figure><\/div>\n\n\n\n<p>\u4ee5\u4e0a\u547d\u4ee4\u7684\u6267\u884c\u9700\u8981\u8010\u5fc3\u7b49\u5f85\u4e00\u4f1a\u5b89\u88c5\u76f8\u5173\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\n<h2>\u5b89\u88c5\u65b9\u5f0f\u4e8c\uff1avundle\u63d2\u4ef6\u5b89\u88c5\uff08\u63a8\u8350\uff09<\/h2>\n\n\n\n<p><div style=\"text-align:center;border:1px dashed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;\">\u672c\u6587\u9690\u85cf\u5185\u5bb9 <a href=\"https:\/\/vip.fxxkpython.com\/wp-login.php?redirect_to=https%3A%2F%2Fvip.fxxkpython.com%2F%3Fp%3D4346\">\u767b\u9646<\/a> \u540e\u624d\u53ef\u4ee5\u6d4f\u89c8<\/div>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<p>\u8fdb\u5165 clang \u6587\u4ef6\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>cd ~\/.vim\/bundle\/YouCompleteMe\/third_party\/ycmd\/clang_archives<\/p><\/blockquote>\n\n\n\n<p>\u91cd\u65b0\u4e0b\u8f7d\u91cc\u9762\u7684\u6587\u4ef6\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>wget <a href=\"https:\/\/dl.bintray.com\/micbou\/libclang\/libclang-9.0.0-x86_64-unknown-linux-gnu.tar.bz2\">https:\/\/dl.bintray.com\/micbou\/libclang\/libclang-7.0.0-x86_64-unknown-linux-gnu.tar.bz2<\/a><\/p><\/blockquote>\n\n\n\n<p>\u4e0b\u8f7d\u5b8c\u4e4b\u540e\u91cd\u65b0\u8fd0\u884c install.py \u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a5\u4e0b\u6765\u7ee7\u7eed\u4e3a\u4f60\u7684 Vim \u914d\u4e0a\u88c5\u5907\uff0c\u8ba9\u5b83\u63d0\u9ad8\u4f60\u7684\u7f16\u7a0b\u6548\u7387\uff0c\u63a5\u4e0b\u6765\u8fd9\u4e00\u7bc7\u5c0f\u5e05b\u4f1a\u8ddf\u4f60\u8bf4\u5982\u4f55\u914d\u7f6e Vim \u7684\u7f16\u5199\u4ee3\u7801\u884c\u4e3a\u2014\u2014\u5feb\u901f\u8865\u5168\u4ee3\u7801\u3002 Vim\u4ee3\u7801\u8865\u5168 YouCompleteMe&nbsp;\u662f\u4e00\u4e2a\u4e13\u95e8\u4e3a Vim \u6253\u9020\u7684\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u63d2\u4ef6\uff0c\u8fd9\u4e2a\u63d2\u4ef6\u53f7\u79f0 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":4355,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[343],"tags":[19,206,365,364,363,362],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/4346"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4346"}],"version-history":[{"count":4,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/4346\/revisions"}],"predecessor-version":[{"id":4359,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/4346\/revisions\/4359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/media\/4355"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}