15

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?

James McMahon
  • 48,506
  • 64
  • 207
  • 283
GaiusSensei
  • 1,860
  • 4
  • 25
  • 44

10 Answers10

38

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

William Casarin
  • 2,542
  • 2
  • 23
  • 24
12

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.

uriel
  • 1,467
  • 13
  • 14
3

Dropping in to post the obligatory vim answer.

Michael Kristofik
  • 34,290
  • 15
  • 75
  • 125
Bartek
  • 15,269
  • 2
  • 58
  • 65
  • 8
    Why does you link point to perl.org ? – 246tNt Nov 13 '09 at 19:12
  • Haha oops .. I was browsing perl earlier and pasted someone the link in a chat. Guess when I went to vim, I didn't copy and pasted the wrong one :) – Bartek Nov 13 '09 at 19:27
3

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

Rob Kam
  • 10,063
  • 14
  • 55
  • 65
2

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

Kenny Shen
  • 4,773
  • 3
  • 21
  • 18
2

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/

GaiusSensei
  • 1,860
  • 4
  • 25
  • 44
2

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.

Community
  • 1
  • 1
1

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

To see the differences read Go For C++ Programmers

Chris
  • 6,272
  • 9
  • 35
  • 57
0

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

EMPraptor
  • 642
  • 1
  • 5
  • 11
  • 6
    You're just ASKING for a flame war. (go vim btw) – Ralphleon Nov 13 '09 at 19:25
  • 1
    2+ years later... I mostly use vi. I want to try using emacs for some prolonged period to get a better feel for the difference, though. I included emacs to avoid a flame war, not start it. :P I guess it could be taken either way. – EMPraptor Feb 22 '12 at 04:40
0

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

Hotei
  • 497
  • 4
  • 11