日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

配置学习Go的编辑器:配置TextMate

發布時間:2025/7/25 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置学习Go的编辑器:配置TextMate 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
TextMate是蘋果電腦上的著名的文本編輯器,有非常好用的一些插件,fei'chang我選用了TextMate。 1.Textmate官網:http://macromates.com/ Textmate是收費的文本編輯器,但是現在可以免費使用了,只需在提示你更新的時候,更新到最新的版本就可以一直使用,如果感覺好用,可以支持一下作者。 2.安裝好之后需要配置下命令行調用: 兩種方式: (1)將Textmate的可執行文件的路徑添加到環境變量PATH中。 export TEXTMATE_PATH=/Applications/TextMate.app/Contents/Resources export PATH=${PATH}:${TEXTMATE_PATH} (2)給Textmate的可執行文件創建軟連接: ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate ~/bin/mate文件需要先在~/bin目錄中先創建一個。 設置環境變量默認的編輯器為 echo 'export EDITOR=~/bin/mate -w:$EDITOR'>>~/.bash_profile 3.安裝Go語言對應的插件: Preference-->Bundles-->選擇Go語言的插件:

查看Go插件的幫助文檔:

基本內容如下:

This bundle relies on amazing open source tooling for some functionality. These utilities can be installed with the following commands:

go get -u github.com/nsf/gocode # completion go get -u github.com/zmb3/gogetdoc # documentation go get -u golang.org/x/tools/cmd/goimports # import resolution/rewriting go get -u github.com/golang/lint/golint # linting go get -u github.com/rogpeppe/godef # goto definition go get -u github.com/alecthomas/gometalinter # metalinting

You may override the following TextMate variables in the preferences (adjust paths to your own configuration). TextMate does not inherit the users environment unless it is launched from the command line. It may be necessary to set TM_GOPATH and GOROOT.

TM_GO=/usr/local/bin/go TM_GOPATH=/Users/myuser/go TM_GOCODE=/Users/myuser/bin/gocode TM_GOGETDOC=/Users/myuser/bin/gogetdoc TM_GOFMT=/Users/myuser/bin/gofmt # or /Users/myuser/bin/goimports TM_GOIMPORTS=/Users/myuser/bin/goimports TM_GOLINT=/Users/myuser/bin/golint TM_GODEF=/Users/myuser/bin/godef TM_GOMETALINTER=/Users/myuser/bin/gometalinter

文中提到的插件都是開發Go語言程序和使用該插件的時候需要用到的,按照幫助文檔中的提示下載安裝插件,并配置插件路徑,

提醒一點,別忘了配置TM_GOPATH和GOROOT哦。

配置完畢后變量配置頁面結果為:

?

途中標紅部分是你的用戶名。

至此,用來開發Go的編輯器TextMate就配置完畢了。

?

?

?


?

?

轉載于:https://www.cnblogs.com/mengyehongmanshan/p/7351910.html

總結

以上是生活随笔為你收集整理的配置学习Go的编辑器:配置TextMate的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。