What do you use to write Go [closed]

2019-03-12 14:37发布

I know its a bit too early, but I've been trying out Go (Google's Programming Language) and its kindof annoying to write code in gedit.

So, my question: What do you use to experiment with Go?

10条回答
对你真心纯属浪费
2楼-- · 2019-03-12 15:09

Dropping in to post the obligatory vim answer.

查看更多
甜甜的少女心
3楼-- · 2019-03-12 15:10

Someone has released a bundle for TextMate if you're on a Mac. (just search the Go Google Group discussions).

查看更多
爷的心禁止访问
4楼-- · 2019-03-12 15:14

under $GOROOT/misc there are syntax highlighting files for emacs, vim, xcode and kate. Using any of these editors should do.

查看更多
你好瞎i
5楼-- · 2019-03-12 15:14

I'll see your vim and raise you one emacs.

查看更多
Anthone
6楼-- · 2019-03-12 15:14

Some info no-one has mentioned yet: The Go distribution comes with a program called gofmt which provides a standardized format for the language. You can run golfed Go through it and get clean output. See this example.

I am always using Emacs so I initially started thinking there would be no Go mode for Emacs and asked this question. Then a minute after I'd asked I had the notion to do find . -name "*.el" at the top of the Go source tree and was able to answer my own question. Some other people seem to have found the answer useful.

查看更多
SAY GOODBYE
7楼-- · 2019-03-12 15:18

Somebody in the #go-nuts irc channel has a Go syntax file for gedit, so I would ask there if you want that.

I personally use what Rob Pike and Russ Cox use: acme. And I know Ken Thompson still uses sam.

Edit: For those interested, I have created a page to collect Go syntax highlighting files for various text editors. If you have any that is not included there let me know and I'll be happy to add it.

查看更多
登录 后发表回答