{"id":220759,"date":"2021-06-26T08:42:40","date_gmt":"2021-06-26T00:42:40","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=220759"},"modified":"2021-06-18T10:43:48","modified_gmt":"2021-06-18T02:43:48","slug":"linux-text-helix","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-text-helix.html","title":{"rendered":"\u9ad8\u7ea7 Linux \u7528\u6237\u7684\u7ec8\u7aef\u6587\u672c\u7f16\u8f91\u5668\uff1aHelix"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nHelix \u662f\u7528 Rust \u7f16\u5199\u7684\uff0c\u4f7f\u7528 Tree-sitter \u8fdb\u884c\u8bed\u6cd5\u9ad8\u4eae\u3002\u5f00\u53d1\u8005\u58f0\u79f0\uff0c\u5b83\u6bd4\u6b63\u5219\u8868\u8fbe\u5f0f\u9ad8\u4eae\u66f4\u5feb\uff0c\u56e0\u4e3a Tree-sitter \u50cf\u7f16\u8bd1\u5668\u4e00\u6837\u5c06\u4ee3\u7801\u89e3\u6790\u6210\u8bed\u6cd5\u6811\uff0c\u4ece\u800c\u7ed9\u51fa\u66f4\u591a\u7684\u4ee3\u7801\u7ed3\u6784\u4fe1\u606f\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u8bf4\u5230 \u57fa\u4e8e\u7ec8\u7aef\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u901a\u5e38 Vim\u3001Emacs \u548c Nano \u53d7\u5230\u4e86\u5173\u6ce8\u3002<\/p>\n

\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u6ca1\u6709\u5176\u4ed6\u8fd9\u6837\u7684\u6587\u672c\u7f16\u8f91\u5668\u3002Vim \u7684\u73b0\u4ee3\u589e\u5f3a\u7248 Neovim\uff0c\u662f\u8bb8\u591a\u8fd9\u6837\u7684\u4f8b\u5b50\u4e4b\u4e00\u3002<\/p>\n

\u6309\u7167\u540c\u6837\u7684\u601d\u8def\uff0c\u6211\u60f3\u4ecb\u7ecd\u53e6\u4e00\u4e2a\u57fa\u4e8e\u7ec8\u7aef\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u53eb\u505a Helix Editor\u3002<\/p>\n

Helix\uff0c\u4e00\u4e2a\u7528 Rust \u7f16\u5199\u7684\u73b0\u4ee3\u6587\u672c\u7f16\u8f91\u5668<\/strong><\/div>\n

Helix \u662f\u7528 Rust \u7f16\u5199\u7684\uff0c\u4f7f\u7528 Tree-sitter \u8fdb\u884c\u8bed\u6cd5\u9ad8\u4eae\u3002\u5f00\u53d1\u8005\u58f0\u79f0\uff0c\u5b83\u6bd4\u6b63\u5219\u8868\u8fbe\u5f0f\u9ad8\u4eae\u66f4\u5feb\uff0c\u56e0\u4e3a Tree-sitter \u50cf\u7f16\u8bd1\u5668\u4e00\u6837\u5c06\u4ee3\u7801\u89e3\u6790\u6210\u8bed\u6cd5\u6811\uff0c\u4ece\u800c\u7ed9\u51fa\u66f4\u591a\u7684\u4ee3\u7801\u7ed3\u6784\u4fe1\u606f\u3002<\/p>\n

\u4f60\u53ef\u4ee5\u8ddf\u8e2a\u5c40\u90e8\u53d8\u91cf\uff0c\u8ba1\u7b97\u7f29\u8fdb\u548c\u64cd\u4f5c\u9009\u62e9\u6765\u9009\u62e9\u8bed\u6cd5\u8282\u70b9\u3002\u5b83\u8db3\u591f\u5f3a\u5927\uff0c\u5373\u4f7f\u6709\u8bed\u6cd5\u9519\u8bef\u4e5f\u80fd\u4ea7\u751f\u7ed3\u679c\u3002<\/p>\n

Helix \u7684\u4e3b\u8981\u4eae\u70b9\u662f\u201c\u591a\u91cd\u9009\u62e9\u201d\uff0c\u8fd9\u662f\u57fa\u4e8e Kakoune \u7684\u3002<\/p>\n

\u5185\u7f6e\u7684\u8bed\u8a00\u670d\u52a1\u5668\u652f\u6301\u63d0\u4f9b\u4e0a\u4e0b\u6587\u611f\u77e5\u8865\u5168\u3001\u8bca\u65ad\u548c\u4ee3\u7801\u64cd\u4f5c\u3002<\/p>\n

\u5728 Linux \u4e0a\u5b89\u88c5 Helix<\/strong><\/div>\n

\u5bf9\u4e8e Arch \u548c Manjaro \u7528\u6237\u6765\u8bf4\uff0cHelix \u5728 AUR \u4e2d\u6709\u4e24\u4e2a\u5305\uff1a<\/p>\n

  • helix-bin: \u5305\u542b\u6765\u81ea GitHub \u53d1\u5e03\u7684\u9884\u6784\u5efa\u4e8c\u8fdb\u5236\u6587\u4ef6<\/li>\n
  • helix-git: \u6784\u5efa\u8be5\u4ed3\u5e93\u7684\u4e3b\u5206\u652f<\/li>\n

    \u4f5c\u4e3a\u4e00\u4e2a Arch \u7528\u6237\uff0c\u6211\u76f8\u4fe1\u4f60\u53ef\u80fd\u5df2\u7ecf\u77e5\u9053 \u5982\u4f55\u4f7f\u7528 AUR \u5b89\u88c5\u5e94\u7528\u3002<\/p>\n

    \u5bf9\u4e8e\u5176\u4ed6 Linux \u53d1\u884c\u7248\uff0c\u4f60\u5fc5\u987b\u4f7f\u7528 Cargo\u3002Cargo \u662f Rust \u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3002\u6709\u4e86\u5b83\uff0c\u4f60\u53ef\u4ee5\u5b89\u88c5 Rust \u5305\u3002\u53ef\u4ee5\u8ba4\u4e3a\u5b83\u76f8\u5f53\u4e8e Python \u7684 PIP\u3002<\/p>\n

    \u4f60\u5e94\u8be5\u80fd\u591f\u4f7f\u7528\u4f60\u7684\u53d1\u884c\u7248\u7684\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5 Cargo\u3002\u5728\u57fa\u4e8e Ubuntu \u7684\u53d1\u884c\u7248\u4e0a\uff0c\u53ef\u4ee5\u8fd9\u6837\u5b89\u88c5 Cargo\uff1a<\/p>\n

    \r\nsudo apt install cargo<\/pre>\n

    \u63a5\u4e0b\u6765\uff0c\u4f60\u8981\u514b\u9686 Helix \u4ed3\u5e93\uff1a<\/p>\n

    \r\ngit clone --recurse-submodules --shallow-submodules -j8 https:\/\/github.com\/helix-editor\/helix\r\n<\/pre>\n

    \u8fdb\u5165\u514b\u9686\u7684\u76ee\u5f55\u4e2d\uff1a<\/p>\n

    cd helix<\/pre>\n

    \u73b0\u5728\u7528 cargo \u6765\u5b89\u88c5 Helix\uff1a<\/p>\n

    cargo install --path helix-term --features \"embed_runtime\"<\/pre>\n

    \u6700\u540e\u4e00\u6b65\u662f\u5c06 hx \u4e8c\u8fdb\u5236\u6587\u4ef6\u6dfb\u52a0\u5230 PATH \u53d8\u91cf\u4e2d\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u4ece\u4efb\u4f55\u5730\u65b9\u8fd0\u884c\u5b83\u3002\u8fd9\u5e94\u8be5\u88ab\u6dfb\u52a0\u5230\u4f60\u7684 bashrc \u6216 bash \u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/p>\n

    export PATH=\u201d$HOME\/.cargo\/bin:$PATH\u201d<\/pre>\n

    \u73b0\u5728\u90fd\u8bbe\u7f6e\u597d\u4e86\uff0c\u4f60\u5e94\u8be5\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u8f93\u5165 hx \u6765\u4f7f\u7528\u7f16\u8f91\u5668\u3002<\/p>\n

    \u4f60\u53ef\u4ee5\u5728 Helix \u7684\u6587\u6863\u9875\u4e0a\u627e\u5230\u4f7f\u7528 Helix \u7684\u952e\u76d8\u5feb\u6377\u952e\uff1a<\/p>\n

  • Helix \u952e\u76d8\u5feb\u6377\u952e<\/a><\/li>\n

    \u5b83\u4e0e Vim \u6216 Neovim \u76f8\u6bd4\u5982\u4f55\uff1f\u6211\u65e0\u6cd5\u8bf4\u3002\u6211\u53ef\u4ee5\u7528 Vim \u8fdb\u884c\u57fa\u672c\u7684\u7f16\u8f91\uff0c\u4f46\u6211\u4e0d\u662f Vim \u5fcd\u8005\u3002\u5982\u679c\u4f60\u662f\u4e00\u4e2a\u4fe1\u5949 Vim\uff08\u6216 Emacs\uff09\u7684\u4eba\uff0c\u8bf7\u4f60\u8bd5\u8bd5 Helix \u5e76\u81ea\u5df1\u5224\u65ad\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u8bf4\u5230 \u57fa\u4e8e\u7ec8\u7aef\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u901a\u5e38 Vim\u3001Emacs \u548c Nano \u53d7\u5230\u4e86\u5173\u6ce8\u3002 \u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u6ca1\u6709\u5176\u4ed6\u8fd9\u6837\u7684\u6587 […]<\/p>\n","protected":false},"author":317,"featured_media":219971,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-220759","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\/220759","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\/317"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=220759"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/220759\/revisions"}],"predecessor-version":[{"id":220761,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/220759\/revisions\/220761"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/219971"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=220759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=220759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=220759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}