你用什么来编写Go代码?

huangapple go评论108阅读模式
英文:

What do you use to write Go

问题

我知道现在可能还为时过早,但我一直在尝试使用Go(Google的编程语言),在gedit中编写代码有点烦人。

所以,我的问题是:你用什么来尝试Go?

英文:

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?

答案1

得分: 38

在$GOROOT/misc目录下,有适用于emacs、vim、xcode和kate的语法高亮文件。使用其中任何一个编辑器都可以。

英文:

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

答案2

得分: 12

#go-nuts irc频道中有人为gedit编写了一个Go语法文件,所以如果你需要的话,我会建议你去那里问一下。

我个人使用的是Rob Pike和Russ Cox使用的工具:acme。而我知道Ken Thompson仍然使用sam

编辑:对于那些感兴趣的人,我创建了一个页面来收集各种文本编辑器的Go语法高亮文件。如果你有任何没有包含在其中的文件,请告诉我,我会很乐意添加进去。

英文:

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.

答案3

得分: 3

来发表必要的vim答案。

英文:

Dropping in to post the obligatory vim answer.

答案4

得分: 3

我会看到你的vim,并加上一个emacs。

英文:

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

答案5

得分: 2

如果你使用的是Mac电脑,有人已经发布了一个适用于TextMate的捆绑包(只需搜索Go Google Group讨论)。

英文:

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

答案6

得分: 2

在寻找替代方案后,我找到了这个帖子。Perez先生为gtk sourceview创建了一个语法文件,这样像gedit、scribes等编辑器就可以对Go进行语法高亮了。

只需将这个文件复制到/usr/share/gtksourceview-2.0/language-specs/目录下。

英文:

After searching for alternatives, I found this thread. Mr Perez created a syntax file for gtk sourceview, so that editors such as gedit, scribes etc. can have syntax highlighting for Go~

just copy this to /usr/share/gtksourceview-2.0/language-specs/

答案7

得分: 2

一些尚未提及的信息:Go发行版附带了一个名为gofmt的程序,它为该语言提供了一种标准化的格式。您可以通过它来运行压缩的Go代码并获得干净的输出。请参阅此示例

我一直在使用Emacs,所以最初我开始认为Emacs没有Go模式,并提出了这个问题。然后在我提问后的一分钟内,我想到在Go源代码树的顶部执行find . -name "*.el",并且能够回答自己的问题。其他一些人似乎也发现了这个答案有用。

英文:

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.

答案8

得分: 1

Notepad++可能需要对C++的语法文件进行一些调整才能正常工作。

要了解差异,请阅读Go For C++ Programmers

英文:

Notepad++ could probably work with some tweaking of the syntax file for C++.

To see the differences read Go For C++ Programmers

答案9

得分: 0

vim还是emacs?我还没有尝试过Go,但这两个编辑器是我在自己编程时使用的唯一选择。

英文:

vim or emacs? I haven't played around with Go yet, but those are the only editors I use when programming for myself.

答案10

得分: 0

个人而言,我发现kate的分割窗口功能在go编程中非常有用。(在添加了kate语法高亮文件的Ubuntu 10.4 LTS上)

Hotei

英文:

Personally I find the split-window capability of kate to be quite useful in go programming. (Ubuntu 10.4 LTS with the kate syntax highlight file added)

Hotei

huangapple
  • 本文由 发表于 2009年11月14日 03:09:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/1731217.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定