{"id":2434,"date":"2015-08-02T23:17:13","date_gmt":"2015-08-02T15:17:13","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2434"},"modified":"2015-08-02T23:17:13","modified_gmt":"2015-08-02T15:17:13","slug":"%e5%9c%a8archlinux%e4%b8%ad%e5%ae%89%e8%a3%85sublime-text2","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2434.html","title":{"rendered":"\u5728ArchLinux\u4e2d\u5b89\u88c5Sublime Text2"},"content":{"rendered":"<h6>\u7f18\u7531\uff1a<\/h6>\n<p>\u5728ArchLinux\u4e0b\u8fdb\u884c\u6587\u672c\u7f16\u8f91\u3001\u4ee3\u7801\u7f16\u5199\uff0c\u9664\u4e86\u9700\u8981CLI\u7f16\u8f91\u5668Vim\u4e4b\u5916\uff0c\u8fd8\u9700\u8981\u4e00\u4e2a\u79f0\u624b\u7684GUI\u7f16\u8f91\u5668\uff0c\u81ea\u5e26\u7684Gedit\u90a3\u4e2a\u663e\u7136\u4e0d\u80fd\u582a\u6b64\u91cd\u4efb\uff0c\u6240\u4ee5\uff0c\u5bfb\u627e\u4e00\u4e2a\u7ed9\u529b\u7684\u7f16\u8f91\u5668\u5c31\u6210\u4e86\u5f53\u52a1\u4e4b\u6025\uff0c\u6700\u540e\u7ecf\u8fc7\u4e00\u756a\u6bd4\u8f83\u2026\u2026\u9009\u5b9a\u4e86Sublime Text2\u3002<\/p>\n<h5>\u53c2\u8003\u6b65\u9aa4\u5982\u4e0b\uff1a<\/h5>\n<p>\u56e0\u4e3a\u76f4\u63a5\u4ece\u6e90\u91cc\u6ca1\u529e\u6cd5\u5b89\u88c5sublime(pacman -Ss sublime)\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u4e0b\u8f7d\u4e4b\u540e\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<h6>1.\u4e0b\u8f7d<\/h6>\n<p><a href=\"http:\/\/www.sublimetext.com\/2\" target=\"_blank\">http:\/\/www.sublimetext.com\/2<\/a><\/p>\n<h6>2.\u5b89\u88c5(\u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55)<\/h6>\n<pre class=\"lang:default decode:true\"># tar jxf Sublime\\ Text\\ 2.0.2\\ x64.tar.bz2\n# mv Sublime\\ Text\\ 2 sublimte2\n# mv sublimte2\/ \/usr\/share\/<\/pre>\n<h6>3.\u4fee\u6539~\/.bashrc(\u65b9\u4fbf\u5feb\u901f\u542f\u52a8)<\/h6>\n<pre class=\"lang:default decode:true\">export SUBLIME2=\/usr\/share\/sublimte2\nexport PATH=$SUBLIME2:$PATH<\/pre>\n<p>\u7136\u540esource\u4e00\u4e0b~\/.bashrc\uff0c\u4f7f\u4fee\u6539\u751f\u6548\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165sublime_text\u5c31\u53ef\u4ee5\u5feb\u901f\u5524\u8d77sublime\u8fd9\u4e2a\u7f16\u8f91\u5668\u4e86\u3002<\/p>\n<h6>4.\u521b\u5efa\u684c\u9762\u56fe\u6807<\/h6>\n<p>\u65b0\u5efa\u6587\u4ef6[\/usr\/share\/applications\/sublime.desktop]\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true\">$ cat \/usr\/share\/applications\/sublime.desktop\n[Desktop Entry]\nVersion=2.2.2.1\nName=Sublime Text 2\nGenericName=Text Editor\n\nExec=\/usr\/share\/sublimte2\/sublime2.sh\nTerminal=false\nIcon=\/usr\/share\/sublimte2\/Icon\/256x256\/sublime_text.png\nType=Application\nCategories=TextEditor;IDE;Dev\nX-Ayatana-Desktop-Shortcuts=NewWindow\n\n[NewWindow Shortcut Group]\nName=New Window\nExec=\/usr\/share\/sublimte2\/sublime2.sh -n<\/pre>\n<p>\u8fd9\u6837\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5search\u5230sublime\u7684\u56fe\u6807\u5e76\u5feb\u901f\u542f\u52a8\u5b83\u3002<\/p>\n<h6>5.\u4e3aArchLinux\u4e0b\u7684Sublime Text2\u6dfb\u52a0fcitx\u4e2d\u6587\u652f\u6301<\/h6>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\u6211\u4eec\u8fd8\u6ca1\u529e\u6cd5\u5728sublime\u4e2d\u8f93\u5165\u4e2d\u6587\uff08\u6211\u7528\u7684\u662ffcitx\u8f93\u5165\u6cd5\uff09\uff0c\u56e0\u6b64\u9700\u8981\u89e3\u51b3\u4e00\u4e0b\u8fd9\u4e2a\u95ee\u9898\uff0c\u53c2\u8003\uff1a<\/p>\n<p><a href=\"http:\/\/my.oschina.net\/wugaoxing\/blog\/121281\" target=\"_blank\">http:\/\/my.oschina.net\/wugaoxing\/blog\/121281<\/a><\/p>\n<p>\u65b0\u7f16\u8bd1\u4e86\u4e00\u4e2a.so\u6587\u4ef6\uff0c\u5728\u542f\u52a8\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6eLD_PRELOAD\uff0c\u56e0\u4e3a\u4e4b\u524d\u7684sublime.desktop\u90a3\u4e2a\u6587\u4ef6\u7684EXEC\u540e\u9762\u6ca1\u529e\u6cd5\u63a5\u6536\u5b58\u5728\u7a7a\u683c\u7684\u591a\u4e2a\u53c2\u6570\uff08\u867d\u7136\u6587\u7ae0\u4e2d\u7ed9\u51fa\u4e86bash -c\u9009\u9879\u7684\u89e3\u6cd5\uff0c\u4e0d\u8fc7\u6211\u4e0d\u559c\u6b22\uff09\uff0c\u6240\u4ee5\uff0c\u5e72\u8106\u65b0\u5efa\u4e00\u4e2aBash\u811a\u672c\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true\">$ cat \/usr\/share\/sublimte2\/sublime2.sh\n#!\/bin\/bash\nDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &amp;&amp; pwd )\nLD_PRELOAD=$DIR\/libsublime-imfix.so $DIR\/sublime_text<\/pre>\n<p>\u7136\u540e\uff0c\u5728\u542f\u52a8\u4e86\u4e4b\u540e\u5c06sublime\u6dfb\u52a0\u5230Favorites\u65b9\u4fbf\u4ee5\u56fe\u6807\u7684\u65b9\u5f0f\u5feb\u901f\u542f\u52a8\u3002<\/p>\n<p>&nbsp;<\/p>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/59895\/can-a-bash-script-tell-what-directory-its-stored-in\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/59895\/can-a-bash-script-tell-what-directory-its-stored-in<\/a><\/li>\n<li><a href=\"https:\/\/wiki.archlinux.org\/index.php\/Fcitx\" target=\"_blank\">https:\/\/wiki.archlinux.org\/index.php\/Fcitx<\/a><\/li>\n<li><a href=\"http:\/\/my.oschina.net\/wugaoxing\/blog\/121281\" target=\"_blank\">http:\/\/my.oschina.net\/wugaoxing\/blog\/121281<\/a><\/li>\n<li><a href=\"http:\/\/www.sublimetext.com\/2\" target=\"_blank\">http:\/\/www.sublimetext.com\/2<\/a><\/li>\n<li><a href=\"http:\/\/sublime-text-unofficial-documentation.readthedocs.org\/en\/latest\/getting_started\/install.html\" target=\"_blank\">http:\/\/sublime-text-unofficial-documentation.readthedocs.org\/en\/latest\/getting_started\/install.html<\/a><\/li>\n<li><a href=\"http:\/\/askubuntu.com\/questions\/196390\/how-to-add-sublime-text-to-dash\" target=\"_blank\">http:\/\/askubuntu.com\/questions\/196390\/how-to-add-sublime-text-to-dash<\/a><\/li>\n<li><a href=\"http:\/\/www.technoreply.com\/how-to-install-sublime-text-2-on-ubuntu-12-04-unity\/\" target=\"_blank\">http:\/\/www.technoreply.com\/how-to-install-sublime-text-2-on-ubuntu-12-04-unity\/<\/a><\/li>\n<\/ul>\n<p>=EOF=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f18\u7531\uff1a \u5728ArchLinux\u4e0b\u8fdb\u884c\u6587\u672c\u7f16\u8f91\u3001\u4ee3\u7801\u7f16\u5199\uff0c\u9664\u4e86\u9700\u8981CLI\u7f16\u8f91\u5668Vim\u4e4b\u5916\uff0c\u8fd8\u9700\u8981\u4e00\u4e2a\u79f0\u624b\u7684GUI\u7f16 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12],"tags":[533,551],"class_list":["post-2434","post","type-post","status-publish","format-standard","hentry","category-linux","category-tools","tag-archlinux","tag-editor"],"views":2199,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2434"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2434\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}