summaryrefslogtreecommitdiff
path: root/doc/editors.html
blob: dd74446d7b57b55a27fad66f8c56b728e474a6d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!--{
	"Title": "Editor plugins and IDEs",
	"Template": true
}-->

<h2 id="introduction">Introduction</h2>

<p>
  This document lists commonly used editor plugins and IDEs from the Go ecosystem
  that makes Go development more productive and seamless.
  A comphensive list of editor support and IDEs for Go development is available on
  <a href="http://golang.org/wiki/IDEsAndTextEditorPlugins">the wiki</a>.
</p>

<h2 id="options">Options</h2>
<p>
The Go ecosystem provides a variety of editor plugins and IDEs to enhance your day-to-day
editing, navigation, testing, and debugging experience.
</p>

<ul>
<li><a href="https://github.com/fatih/vim-go">Vim Go</a>: a plugin for Vim to provide Go programming language support</li>
<li><a href="https://marketplace.visualstudio.com/items?itemName=lukehoban.Go">Visual Studio Code Go</a>:
an extension for Visual Studio Code to provide support for the Go programming language</li>
<li><a href="https://www.jetbrains.com/go">Gogland</a>: Gogland is distributed either as standalone IDE
or a plugin for the IntelliJ Platform IDEs</li>
</ul>

<p>
Note that these are only a few top solutions, a more comphensive
community maintained list of
<a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
is available at the wiki.
</p>

<p>
Each development environment provides a large variety of static and dynamic tool integrations.
The following feature matrix lists and compares the most significant features.
</p>

<table class="features-matrix">
  <tr>
    <th></th>
    <th><img title="Vim Go" src="/doc/editors/vimgo.png"><br>Vim Go</th>
    <th><img title="Visual Studio Code" src="/doc/editors/vscodego.png"><br>Visual Studio Code Go</th>
    <th><img title="Gogland" src="/doc/editors/gogland.png"><br>Gogland</th>
  </tr>
  <tr>
    <td class="feature-row" colspan="4">Editing features</td>
  </tr>
  <tr>
    <td>Build and run from the editor/IDE</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Autocompletion of identifers (variable, method, and function names)</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Autocompletion based on type</td>
    <td class="no">No</td>
    <td class="no">No</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Rename identifiers</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Auto format, build, vet, and lint on save</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes<sup>1</sup></td>
  </tr>
  <tr>
    <td>Auto insert import paths and remove unused on save</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes<sup>2</sup></td>
  </tr>
  <tr>
    <td>Auto generate JSON, XML tags for struct fields</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td class="feature-row" colspan="4">Navigation features</td>
  </tr>
  <tr>
    <td>Display documentation inline, or open godoc in browser</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Switch between <code>*.go</code> and <code>*_test.go</code> file</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Jump to definition and referees</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Look up for interface implementations</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Search for callers and callees</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td class="feature-row" colspan="4">Testing and debugging features</td>
  </tr>
  <tr>
    <td>Debugger support</td>
    <td class="no">No</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Run a single test case, all tests from file, or all tests from a package</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Auto generate tests for packages, files and identifiers</td>
    <td class="no">No</td>
    <td class="yes">Yes</td>
    <td class="no">No</td>
  </tr>
  <tr>
    <td>Debug tests</td>
    <td class="no">No</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr>
    <td>Display test coverage</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
    <td class="yes">Yes</td>
  </tr>
  <tr class="download">
    <td></td>
    <td><a href="https://github.com/fatih/vim-go">Install<a/></td>
    <td><a href="https://marketplace.visualstudio.com/items?itemName=lukehoban.Go">Install<a/></td>
    <td><a href="https://www.jetbrains.com/go">Install<a/></td>
  </tr>
</table>

<p>
<sup>1</sup>: Possible when enabled via Settings &gt; Go &gt; On Save,  go vet and golint are available via plugins. Also runs tests on save if configured.
<br>
<sup>2</sup>: Additionally, user input can disambiguate when two or more options are available.
</p>

</div>

<style>
.features-matrix {
  min-width: 800px;
  border-collapse: collapse;
}
.features-matrix th {
  width: 60px;
  text-align: center;
  font-size: 14px;
  color: #666;
}
.features-matrix th img {
  width: 48px;
}
.features-matrix .yes {
  text-align: center;
}
.features-matrix .no {
  text-align: center;
  background-color: #ffe9e9;
}
.features-matrix .download {
  font-weight: bold;
  text-align: center;
}
.features-matrix td {
  padding: 11px 5px 11px 5px;
  border-bottom: solid 1px #ebebeb;
}
.features-matrix .feature-row {
  background-color: #ebebeb;
  font-weight: bold;
}
</style>

<!--TODO(jbd): Add the Atom comparison-->