{"id":1980,"date":"2016-05-20T11:48:02","date_gmt":"2016-05-20T03:48:02","guid":{"rendered":"http:\/\/www.gigiwangs.com\/?p=1980"},"modified":"2016-05-20T11:48:02","modified_gmt":"2016-05-20T03:48:02","slug":"textwrangler%e5%92%8cvim%e9%85%8d%e7%bd%aegolang-%e8%af%ad%e6%b3%95%e9%ab%98%e4%ba%ae","status":"publish","type":"post","link":"https:\/\/www.mujins.com\/?p=1980","title":{"rendered":"TextWrangler\u548cVim\u914d\u7f6eGoLang \u8bed\u6cd5\u9ad8\u4eae"},"content":{"rendered":"<blockquote><p>\u540c\u6b65\u6587\u7ae0:http:\/\/www.gejoin.com\/2016\/05\/20\/golang-syntax-highlighting-for-vim-and-textwrangler.html<\/p><\/blockquote>\n<h3>OSX \u4e0b\u914d\u7f6eVIM\u8bed\u6cd5\u9ad8\u4eae<\/h3>\n<p>Vim\u539f\u751f\u4e0d\u652f\u6301golang\u8bed\u6cd5\u9ad8\u4eae\uff0c\u56e0\u6b64\u8981\u501f\u52a9\u63d2\u4ef6\u3002\u529f\u80fd\u5f3a\u5927\u53c8\u597d\u7528\u7684\u63d2\u4ef6\u6709\u5f88\u591a\uff0c\u8fd9\u91cc\u5c31\u53ea\u7b80\u5355\u4ecb\u7ecd\u4e00\u79cd\u3002<br \/>\nvim-go\u63d2\u4ef6,github\u5728[\u8fd9\u91cc](https:\/\/github.com\/fatih\/vim-go).<br \/>\n\u6211\u4eec\u6765\u4f7f\u7528vim-plug[\ud83c\udf3a Minimalist Vim Plugin Manager]\u6765\u5b89\u88c5\uff0c\u5b89\u88c5\u65b9\u6cd5\uff1a<\/p>\n<p>1.\u4e0b\u8f7dplug.vim .<br \/>\n\u5e76\u653e\u7f6e\u5230~\/.vim\/autoload \u76ee\u5f55\u4e0b,\u70b9\u51fb[<a href=\"https:\/\/raw.githubusercontent.com\/junegunn\/vim-plug\/master\/plug.vim\" target=\"_blank\">\u8fd9\u91cc\u4e0b\u8f7d<\/a>].<br \/>\n\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528curl\u4e0b\u8f7d\u3002<\/p>\n<pre class=\"brush:bash\">curl -fLo ~\/.vim\/autoload\/plug.vim --create-dirs \\\n    https:\/\/raw.githubusercontent.com\/junegunn\/vim-plug\/master\/plug.vim<\/pre>\n<p>2. \u7f16\u8f91~\/.vimrc \u6587\u4ef6,\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9:<\/p>\n<pre class=\"brush:bash\"> call plug#begin('~\/.vim\/plugged')\n Plug 'fatih\/vim-go', { 'tag': '*' }\n call plug#end()\n<\/pre>\n<p>3. \u6253\u5f00vim\uff0c\u8f93\u5165\u547d\u4ee4:<\/p>\n<pre class=\"brush:bash\">  :PlugInstall<\/pre>\n<p><a href=\"https:\/\/www.gigiwangs.com\/wp-content\/uploads\/2016\/05\/go-vim.png\" data-lightbox=\"gal[1980]\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1982\" src=\"https:\/\/www.gigiwangs.com\/wp-content\/uploads\/2016\/05\/go-vim.png\" alt=\"go-vim\" width=\"400\" height=\"330\" \/><\/a><br \/>\n4. \u5b8c\u6210\uff0cvim\u6253\u5f00\u4e00\u4e2a*.go \u6587\u4ef6\u770b\u770b\u3002<\/p>\n<h3>\u914d\u7f6eTextWrangler\u6216BBEdit<\/h3>\n<p>BBEdit\u5b98\u65b9\u7f51\u7ad9\u7ed9\u51fa\u4e86\u914d\u7f6e\u65b9\u6cd5\uff0c\u5f53\u7136\u6d4b\u8bd5\u4e86\u514d\u8d39\u7684TextWrangler \uff0c\u4e5f\u662f\u53ef\u884c\u7684\u3002<br \/>\n\u5b98\u65b9\u7ed9\u51fa\u4e86\u597d\u591a\u53ef\u7528\u7684\u8bed\u8a00\u4f9b\u9009\u62e9\uff0c\u5730\u5740\u5728[<a href=\"http:\/\/www.barebones.com\/support\/bbedit\/plugin_library.html\" target=\"_blank\">\u8fd9\u91cc<\/a>].\u53ef\u4f9b\u9009\u62e9\u7684\u5305\u62ec\u4e86Erlang,Haskell,Go\u7b49\u7b49..<\/p>\n<blockquote><p>&gt;<a href=\"http:\/\/www.barebones.com\/support\/bbedit\/plugin_library.html\" target=\"_blank\">BBEdit\u00a0plugin library<\/a><\/p><\/blockquote>\n<p>1. \u5728\u8be5\u9875\u9762\u627e\u5230Go\u4e0b\u8f7d\u5730\u5740\u4e0b\u8f7d\uff0c\u6216\u70b9\u51fb\u8fd9\u91cc [<a href=\"http:\/\/pine.barebones.com\/extensions\/Go.plist.zip\" target=\"_blank\">\u76f4\u63a5\u4e0b\u8f7d<\/a>]<\/p>\n<p>2. \u4e0b\u8f7d\u7684\u6587\u4ef6Go.plist.zip \u89e3\u538b\u6210Go.plist\u3002<\/p>\n<p>3. \u5c06\u8be5\u6587\u4ef6\u653e\u7f6e\u5230<code>\/Users\/{USERNAME}\/Library\/Application Support\/TextWrangler\/Language Modules<\/code>, \u91cd\u65b0\u6253\u5f00TextWrangler\u3002\u4e00\u5207OK\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u6b65\u6587\u7ae0:http:\/\/www.gejoin.com\/2016\/05\/20\/golang-syntax-highlighting-for-vim-and-textwrangler.html OSX \u4e0b\u914d\u7f6eVIM\u8bed\u6cd5\u9ad8\u4eae Vim\u539f\u751f\u4e0d\u652f\u6301golang\u8bed\u6cd5\u9ad8\u4eae\uff0c\u56e0\u6b64\u8981\u501f\u52a9\u63d2\u4ef6\u3002\u529f\u80fd\u5f3a\u5927\u53c8\u597d\u7528\u7684\u63d2\u4ef6\u6709\u5f88\u591a\uff0c\u8fd9\u91cc\u5c31\u53ea\u7b80\u5355\u4ecb\u7ecd\u4e00\u79cd\u3002 vim-go\u63d2\u4ef6,github\u5728[\u8fd9\u91cc](https:\/\/github.com\/fatih\/vim-go). \u6211\u4eec\u6765\u4f7f\u7528vim-plug[\ud83c\udf3a Minimalist Vim Plugin Manager]\u6765\u5b89\u88c5\uff0c\u5b89\u88c5\u65b9\u6cd5\uff1a 1.\u4e0b\u8f7dplug.vim . \u5e76\u653e\u7f6e\u5230~\/.vim\/autoload \u76ee\u5f55\u4e0b,\u70b9\u51fb[\u8fd9\u91cc\u4e0b\u8f7d]. \u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528curl\u4e0b\u8f7d\u3002 curl -fLo ~\/.vim\/autoload\/plug.vim &#8211;create-dirs \\ https:\/\/raw.githubusercontent.com\/junegunn\/vim-plug\/master\/plug.vim 2. \u7f16\u8f91~\/.vimrc \u6587\u4ef6,\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9: call plug#begin(&#8216;~\/.vim\/plugged&#8217;) Plug &#8216;fatih\/vim-go&#8217;, { &#8216;tag&#8217;: &#8216;*&#8217; } call plug#end() 3. \u6253\u5f00vim\uff0c\u8f93\u5165\u547d\u4ee4: :PlugInstall 4. \u5b8c\u6210\uff0cvim\u6253\u5f00\u4e00\u4e2a*.go \u6587\u4ef6\u770b\u770b\u3002 \u914d\u7f6eTextWrangler\u6216BBEdit BBEdit\u5b98\u65b9\u7f51\u7ad9\u7ed9\u51fa\u4e86\u914d\u7f6e\u65b9\u6cd5\uff0c\u5f53\u7136\u6d4b\u8bd5\u4e86\u514d\u8d39\u7684TextWrangler \uff0c\u4e5f\u662f\u53ef\u884c\u7684\u3002 \u5b98\u65b9\u7ed9\u51fa\u4e86\u597d\u591a\u53ef\u7528\u7684\u8bed\u8a00\u4f9b\u9009\u62e9\uff0c\u5730\u5740\u5728[\u8fd9\u91cc].\u53ef\u4f9b\u9009\u62e9\u7684\u5305\u62ec\u4e86Erlang,Haskell,Go\u7b49\u7b49.. &gt;BBEdit\u00a0plugin library 1. \u5728\u8be5\u9875\u9762\u627e\u5230Go\u4e0b\u8f7d\u5730\u5740\u4e0b\u8f7d\uff0c\u6216\u70b9\u51fb\u8fd9\u91cc [\u76f4\u63a5\u4e0b\u8f7d] 2. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1976,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"aside","meta":[],"categories":[31,93],"tags":[94],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1980"}],"collection":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1980"}],"version-history":[{"count":0,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1980\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}