{"id":207569,"date":"2020-12-31T09:35:51","date_gmt":"2020-12-31T01:35:51","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=207569"},"modified":"2020-12-21T10:37:18","modified_gmt":"2020-12-21T02:37:18","slug":"enjoy-xedit-function","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/enjoy-xedit-function.html","title":{"rendered":"\u4f53\u9a8c Xedit \u6587\u672c\u7f16\u8f91\u5668\u7684\u5b9e\u7528\u529f\u80fd"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nXedit \u662f X11 \u56fe\u5f62\u670d\u52a1\u5668\u7684\u4e00\u90e8\u5206\uff0c\u5b83\u4e0d\u7b97\u597d\u770b\uff0c\u4f46\u5374\u6709\u8db3\u591f\u7684\u9690\u85cf\u529f\u80fd\uff0c\u4f7f\u5b83\u6210\u4e3a\u4e00\u4e2a\u4e25\u8083\u7684\u6587\u672c\u7f16\u8f91\u5668\u3002X11 \u56fe\u5f62\u670d\u52a1\u5668\u7531 X.org \u53d1\u5e03\uff0c\u5b83\u6709\u4e00\u4e9b\u8c61\u5f81\u6027\u7684\u5e94\u7528\u6765\u5c55\u793a\u5982\u4f55\u4f7f\u7528\u5b83\u63d0\u4f9b\u7684\u5de5\u5177\u8fdb\u884c\u7f16\u7a0b\u3002\u8fd9\u4e9b\u5e94\u7528\u5305\u62ec\u4ece TWM \u684c\u9762\u5230\u611a\u8822\u4f46\u50ac\u7720\u7684 Xeyes\u3002\u5b83\u8fd8\u5305\u62ec\u4e00\u4e2a\u540d\u4e3a Xedit \u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5b83\u662f\u4e00\u4e2a\u770b\u4f3c\u7b80\u5355\u7684\u5e94\u7528\uff0c\u5374\u6709\u8db3\u591f\u7684\u9690\u85cf\u529f\u80fd\uff0c\u4f7f\u5176\u6210\u4e3a\u4e00\u4e2a\u4e25\u8083\u7684\u7f16\u8f91\u5668\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u5b89\u88c5 Xedit<\/strong><\/div>\n

\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Linux \u6216 BSD\uff0c\u4f60\u53ef\u4ee5\u4ece\u4f60\u7684\u53d1\u884c\u7248\u8f6f\u4ef6\u4ed3\u5e93\u6216 ports \u6811\u4e2d\u5b89\u88c5 Xedit\u3002\u5b83\u6709\u65f6\u4f1a\u51fa\u73b0\u5728\u4e00\u4e2a\u540d\u4e3a X11-apps \u7684\u8f6f\u4ef6\u5305\u4e2d\uff0c\u4e0e\u5176\u4ed6 X11 \u5e94\u7528\u6346\u7ed1\u5728\u4e00\u8d77\u3002<\/p>\n

\u5728 macOS \u4e0a\uff0c\u4f60\u53ef\u4ee5\u5b89\u88c5 XQuartz\uff0c\u5b83\u63d0\u4f9b\u4e86 Xedit\u3001Xeyes \u548c\u5176\u4ed6\u4e00\u4e9b\u5c0f\u7a0b\u5e8f\uff08\u4ee5\u53ca\u4e00\u4e2a X11 \u56fe\u5f62\u670d\u52a1\u5668\uff09\u3002<\/p>\n

\u542f\u52a8 Xedit<\/strong><\/div>\n

\u5982\u679c\u5b83\u88ab\u5217\u5728\u4f60\u7684\u5e94\u7528\u83dc\u5355\u7684\u8bdd\uff0c\u4f60\u53ef\u4ee5\u4ece\u4e2d\u542f\u52a8 Xedit\u3002\u5c3d\u7ba1\u5b83\u7edd\u5bf9\u662f\u4e00\u4e2a GUI \u5e94\u7528\uff0c\u4f46\u6709\u4e9b\u53d1\u884c\u7248\u5c06\u5b83\u89c6\u4e3a\u547d\u4ee4\u800c\u4e0d\u662f GUI \u5e94\u7528\uff0c\u6240\u4ee5\u5b83\u53ef\u80fd\u4e0d\u4f1a\u88ab\u5217\u5728\u5e94\u7528\u83dc\u5355\u4e2d\u3002\u8fd9\u65f6\uff0c\u4f60\u53ef\u4ee5\u4ece\u7ec8\u7aef\u542f\u52a8 Xedit\u3002\u5982\u679c\u4f60\u8f93\u5165 xedit & \u6765\u542f\u52a8\u5e94\u7528\uff0c\u5b83\u5c31\u4f1a\u542f\u52a8\u4e00\u4e2a\u7a7a\u7684 Xedit \u7f16\u8f91\u5668\uff0c\u53ef\u4ee5\u968f\u65f6\u8f93\u5165\u3002\u5982\u679c\u4f60\u5728\u8f93\u5165\u542f\u52a8\u547d\u4ee4\u7684\u540c\u65f6\u8f93\u5165\u4e00\u4e2a\u73b0\u6709\u7684\u6587\u4ef6\u540d\uff0cXedit \u542f\u52a8\u65f6\u4f1a\u5c06\u6587\u4ef6\u52a0\u8f7d\u5230\u7f13\u51b2\u533a\u3002<\/p>\n

$ xedit example.txt &<\/pre>\n

\"\"<\/p>\n

\u52a0\u8f7d\u6587\u4ef6<\/strong><\/div>\n

\u5728\u6253\u5f00\u7684 Xedit \u5b9e\u4f8b\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5728\u9876\u90e8\u6587\u672c\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u6587\u4ef6\u7684\u8def\u5f84\u6765\u52a0\u8f7d\u6587\u4ef6\u3002\u70b9\u51fb Load \u6309\u94ae\uff08\u5728\u6587\u672c\u8f93\u5165\u6846\u7684\u5de6\u8fb9\uff09\uff0c\u5c06\u6587\u4ef6\u8bfb\u5165 Xedit \u7a97\u53e3\u3002<\/p>\n

\"\"<\/p>\n

\u4f60\u53ef\u4ee5\u540c\u65f6\u6253\u5f00\u591a\u4e2a\u6587\u4ef6\u3002\u5f53\u4e00\u4e2a\u6587\u4ef6\u88ab\u52a0\u8f7d\u65f6\uff0c\u5b83\u5c06\u83b7\u53d6\u7126\u70b9\u5e76\u51fa\u73b0\u5728\u4f60\u7684\u4e3b Xedit \u7f13\u51b2\u533a\uff08\u4e3b\u7a97\u53e3\u4e2d\u7684\u5927\u6587\u672c\u8f93\u5165\u6846\uff09\uff0c\u5e76\u5c06\u4efb\u4f55\u73b0\u6709\u7684\u6587\u4ef6\u5207\u6362\u5230\u4e00\u4e2a\u9690\u85cf\u7684\u7f13\u51b2\u533a\u3002<\/p>\n

\u4f60\u53ef\u4ee5\u4f7f\u7528\u7ec4\u5408\u952e\u5728\u7f13\u51b2\u533a\u4e4b\u95f4\u5207\u6362\uff0c\u8fd9\u5bf9 Emacs \u7528\u6237\u800c\u8a00\u5f88\u719f\u6089\uff0c\u4f46\u5bf9\u5176\u4ed6\u7528\u6237\u4f1a\u611f\u5230\u56f0\u60d1\u3002\u9996\u5148\uff0c\u6309\u4e0b Ctrl+X\u3002\u653e\u5f00\u7136\u540e\u6309 Ctrl+B\u3002<\/p>\n

\u7ec4\u5408\u952e<\/strong><\/div>\n

\u4e00\u5f00\u59cb\u6267\u884c\u9700\u8981\u8fde\u7eed\u4e24\u4e2a\u952e\u76d8\u5feb\u6377\u952e\u7684\u64cd\u4f5c\u611f\u89c9\u5f88\u5947\u602a\uff0c\u4f46\u8fc7\u4e86\u4e00\u6bb5\u65f6\u95f4\uff0c\u4f60\u5c31\u4f1a\u4e60\u60ef\u3002\u4e8b\u5b9e\u4e0a\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u7ecf\u5e38\u4f7f\u7528 Emacs \u7684\u7528\u6237\uff0c\u6211\u53d1\u73b0\u590d\u5408\u952e\u7ec4\u5408\u5f88\u6709\u8282\u594f\u611f\u3002\u6211\u5f88\u60ca\u8bb6\u4e5f\u5f88\u9ad8\u5174\u5730\u53d1\u73b0\uff0c\u6211\u6700\u559c\u6b22\u7684\u4e00\u4e9b\u5feb\u6377\u952e\u5728 Xedit \u4e2d\u4e5f\u6709\u6548\u3002<\/p>\n

\u539f\u6765\uff0cXedit \u4ece\u51e0\u4e2a\u7075\u611f\u6765\u6e90\u501f\u7528\u4e86\u952e\u76d8\u5feb\u6377\u952e\u3002\u5982\u679c\u4f60\u662f Emacs \u7528\u6237\uff0c\u4f60\u4f1a\u53d1\u73b0\u6700\u5e38\u89c1\u7684\u7ec4\u5408\u5728 Xedit \u4e2d\u6709\u6548\u3002\u4f8b\u5982\uff0cC-x C-f \uff08\u5373 Ctrl+X \u540e\u662f Ctrl+F\uff09\u53ef\u4ee5\u56de\u5230\u9876\u90e8\u7684\u6587\u672c\u8f93\u5165\u6846\u6765\u52a0\u8f7d\u6587\u4ef6\uff0c\u800c C-x C-s\uff08Ctrl+X \u540e\u662f Ctrl+S\uff09\u53ef\u4ee5\u4fdd\u5b58\u6587\u4ef6\u3002\u4ee4\u4eba\u60ca\u8bb6\u7684\u662f\uff0cC-x 3 \u751a\u81f3\u53ef\u4ee5\u5782\u76f4\u5206\u5272\u7a97\u53e3\uff0c\u800c C-x 2 \u5219\u53ef\u4ee5\u6c34\u5e73\u5206\u5272\uff0cC-x 0 \u6216 C-x 1 \u5219\u53ef\u4ee5\u79fb\u9664\u5206\u5272\u3002<\/p>\n

Emacs \u6216 Bash \u7528\u6237\u719f\u6089\u7684\u7f16\u8f91\u547d\u4ee4\u4e5f\u9002\u7528\uff1a<\/p>\n

  • Ctrl+A \u79fb\u52a8\u5230\u884c\u9996\u3002<\/li>\n
  • Ctrl+E \u79fb\u81f3\u884c\u5c3e\u3002<\/li>\n
  • Alt+B \u5411\u540e\u79fb\u52a8\u4e00\u4e2a\u5355\u8bcd\u3002<\/li>\n
  • Ctrl+B \u5411\u540e\u79fb\u52a8\u4e00\u4e2a\u5b57\u7b26\u3002<\/li>\n
  • Ctrl+F \u5411\u524d\u79fb\u52a8\u4e00\u4e2a\u5b57\u7b26\u3002<\/li>\n
  • Alt+F \u5411\u524d\u79fb\u52a8\u4e00\u4e2a\u5355\u8bcd\u3002<\/li>\n
  • `Ctrl+D \u5220\u9664\u4e0b\u4e00\u4e2a\u5b57\u7b26\u3002<\/li>\n

    \u8fd8\u6709\u66f4\u591a\uff0c\u5b83\u4eec\u90fd\u5728 Xedit \u624b\u518c\u9875\u9762\u4e0a\u5217\u51fa\u3002<\/p>\n

    \u4f7f\u7528\u884c\u7f16\u8f91\u6a21\u5f0f<\/strong><\/div>\n

    Xedit \u8fd8\u542b\u6709\u4e00\u4e2a\u7c7b\u4f3c ex \u7684\u884c\u7f16\u8f91\u5668\uff0c\u8fd9\u5bf9 Vi \u548c ed \u751a\u81f3 sed \u7528\u6237\u5e94\u8be5\u5f88\u719f\u6089\u3002\u8981\u8fdb\u5165\u884c\u7f16\u8f91\u6a21\u5f0f\uff0c\u6309\u4e0b Esc \u952e\u3002\u8fd9\u5c06\u4f7f\u4f60\u5904\u4e8e\u9876\u90e8\u7684\u6587\u672c\u8f93\u5165\u6846\uff0c\u4f46\u5904\u4e8e\u547d\u4ee4\u6a21\u5f0f\u3002\u7f16\u8f91\u547d\u4ee4\u4f7f\u7528\u7684\u8bed\u6cd5\u662f\uff1a\u884c\u53f7\u540e\u9762\u8ddf\u7740\u4e00\u4e2a\u547d\u4ee4\u548c\u53c2\u6570\u3002<\/p>\n

    \u6bd4\u5982\u8bf4\u4f60\u6709\u8fd9\u4e2a\u6587\u672c\u6587\u4ef6\uff1a<\/p>\n

    ed is the standard Unix text editor.\r\nThis is line number two.<\/pre>\n

    \u4f60\u51b3\u5b9a\u5c06\u7b2c 1 \u884c\u7684 ed \u6539\u4e3a Xedit\u3002\u5728 Xedit \u4e2d\uff0c\u79fb\u52a8\u5230\u7b2c 1 \u884c\uff0c\u6309\u4e0b Esc\uff0c\u7136\u540e\u8f93\u5165 .,s\/ed\/Xedit\/\u3002<\/p>\n

    Xedit is the standard Unix text editor.\r\nThis is line number two.<\/pre>\n

    \u4e0d\u7528\u5c06\u5149\u6807\u79fb\u5230\u4e0b\u4e00\u884c\uff0c\u4f60\u53ef\u4ee5\u5c06 two \u6539\u4e3a the second\u3002\u6309\u4e0b Esc\uff0c\u7136\u540e\u8f93\u5165 2,s\/two\/the second\/\u3002<\/p>\n

    \u5404\u79cd\u547d\u4ee4\u548c\u6709\u6548\u7684\u53c2\u6570\u5728 Xedit \u7684\u624b\u518c\u9875\u4e2d\u5217\u51fa\u3002<\/p>\n

    \u7b80\u5355\u4f46\u7a33\u5b9a<\/strong><\/div>\n

    Xedit \u5e76\u4e0d\u7b97\u597d\u770b\uff0c\u5b83\u5f88\u7b80\u5355\uff0c\u6ca1\u6709\u83dc\u5355\u53ef\u8a00\uff0c\u4f46\u5b83\u501f\u9274\u4e86\u4e00\u4e9b\u6700\u597d\u7684 Unix \u7f16\u8f91\u5668\u7684\u6d41\u884c\u7684\u4fbf\u5229\u6027\u3002\u4e0b\u6b21\u4f60\u5728\u5bfb\u627e\u65b0\u7684\u7f16\u8f91\u5668\u65f6\uff0c\u4e0d\u59a8\u8bd5\u8bd5 Xedit\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Linux \u6216 BSD\uff0c\u4f60\u53ef\u4ee5\u4ece\u4f60\u7684\u53d1\u884c\u7248\u8f6f\u4ef6\u4ed3\u5e93\u6216 ports \u6811\u4e2d\u5b89\u88c5 Xedit\u3002\u5b83\u6709\u65f6 […]<\/p>\n","protected":false},"author":1920,"featured_media":207573,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-207569","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\/207569","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\/1920"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=207569"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207569\/revisions"}],"predecessor-version":[{"id":207613,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/207569\/revisions\/207613"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/207573"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=207569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=207569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=207569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}