editors.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!--{
  2. "Title": "Editor plugins and IDEs",
  3. "Template": true
  4. }-->
  5. <h2 id="introduction">Introduction</h2>
  6. <p>
  7. This document lists commonly used editor plugins and IDEs from the Go ecosystem
  8. that make Go development more productive and seamless.
  9. A comprehensive list of editor support and IDEs for Go development is available at
  10. <a href="http://golang.org/wiki/IDEsAndTextEditorPlugins">the wiki</a>.
  11. </p>
  12. <h2 id="options">Options</h2>
  13. <p>
  14. The Go ecosystem provides a variety of editor plugins and IDEs to enhance your day-to-day
  15. editing, navigation, testing, and debugging experience.
  16. </p>
  17. <ul>
  18. <li><a href="https://github.com/fatih/vim-go">Vim Go</a>: a plugin for Vim to provide Go programming language support</li>
  19. <li><a href="https://marketplace.visualstudio.com/items?itemName=lukehoban.Go">Visual Studio Code Go</a>:
  20. an extension for Visual Studio Code to provide support for the Go programming language</li>
  21. <li><a href="https://www.jetbrains.com/go">Gogland</a>: Gogland is distributed either as a standalone IDE
  22. or as a plugin for the IntelliJ Platform IDEs</li>
  23. </ul>
  24. <p>
  25. Note that these are only a few top solutions; a more comphensive
  26. community-maintained list of
  27. <a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
  28. is available at the Wiki.
  29. </p>
  30. <p>
  31. Each development environment integrates a number of Go-specific tools.
  32. The following feature matrix lists and compares the most significant features.
  33. </p>
  34. <table class="features-matrix">
  35. <tr>
  36. <th></th>
  37. <th><img title="Vim Go" src="/doc/editors/vimgo.png"><br>Vim Go</th>
  38. <th><img title="Visual Studio Code" src="/doc/editors/vscodego.png"><br>Visual Studio Code Go</th>
  39. <th><img title="Gogland" src="/doc/editors/gogland.png"><br>Gogland</th>
  40. </tr>
  41. <tr>
  42. <td class="feature-row" colspan="4">Editing features</td>
  43. </tr>
  44. <tr>
  45. <td>Build and run from the editor/IDE</td>
  46. <td class="yes">Yes</td>
  47. <td class="yes">Yes</td>
  48. <td class="yes">Yes</td>
  49. </tr>
  50. <tr>
  51. <td>Autocompletion of identifers (variable, method, and function names)</td>
  52. <td class="yes">Yes</td>
  53. <td class="yes">Yes</td>
  54. <td class="yes">Yes</td>
  55. </tr>
  56. <tr>
  57. <td>Autocompletion based on type</td>
  58. <td class="no">No</td>
  59. <td class="no">No</td>
  60. <td class="yes">Yes</td>
  61. </tr>
  62. <tr>
  63. <td>Rename identifiers</td>
  64. <td class="yes">Yes</td>
  65. <td class="yes">Yes</td>
  66. <td class="yes">Yes</td>
  67. </tr>
  68. <tr>
  69. <td>Auto format, build, vet, and lint on save</td>
  70. <td class="yes">Yes</td>
  71. <td class="yes">Yes</td>
  72. <td class="yes">Yes<sup>1</sup></td>
  73. </tr>
  74. <tr>
  75. <td>Auto insert import paths and remove unused on save</td>
  76. <td class="yes">Yes</td>
  77. <td class="yes">Yes</td>
  78. <td class="yes">Yes<sup>2</sup></td>
  79. </tr>
  80. <tr>
  81. <td>Auto generate JSON, XML tags for struct fields</td>
  82. <td class="yes">Yes</td>
  83. <td class="yes">Yes</td>
  84. <td class="yes">Yes</td>
  85. </tr>
  86. <tr>
  87. <td class="feature-row" colspan="4">Navigation features</td>
  88. </tr>
  89. <tr>
  90. <td>Display documentation inline, or open godoc in browser</td>
  91. <td class="yes">Yes</td>
  92. <td class="yes">Yes</td>
  93. <td class="yes">Yes</td>
  94. </tr>
  95. <tr>
  96. <td>Switch between <code>*.go</code> and <code>*_test.go</code> file</td>
  97. <td class="yes">Yes</td>
  98. <td class="yes">Yes</td>
  99. <td class="yes">Yes</td>
  100. </tr>
  101. <tr>
  102. <td>Jump to definition and referees</td>
  103. <td class="yes">Yes</td>
  104. <td class="yes">Yes</td>
  105. <td class="yes">Yes</td>
  106. </tr>
  107. <tr>
  108. <td>Look up for interface implementations</td>
  109. <td class="yes">Yes</td>
  110. <td class="yes">Yes</td>
  111. <td class="yes">Yes</td>
  112. </tr>
  113. <tr>
  114. <td>Search for callers and callees</td>
  115. <td class="yes">Yes</td>
  116. <td class="yes">Yes</td>
  117. <td class="yes">Yes</td>
  118. </tr>
  119. <tr>
  120. <td class="feature-row" colspan="4">Testing and debugging features</td>
  121. </tr>
  122. <tr>
  123. <td>Debugger support</td>
  124. <td class="no">No</td>
  125. <td class="yes">Yes</td>
  126. <td class="yes">Yes</td>
  127. </tr>
  128. <tr>
  129. <td>Run a single test case, all tests from file, or all tests from a package</td>
  130. <td class="yes">Yes</td>
  131. <td class="yes">Yes</td>
  132. <td class="yes">Yes</td>
  133. </tr>
  134. <tr>
  135. <td>Auto generate tests for packages, files and identifiers</td>
  136. <td class="no">No</td>
  137. <td class="yes">Yes</td>
  138. <td class="no">No</td>
  139. </tr>
  140. <tr>
  141. <td>Debug tests</td>
  142. <td class="no">No</td>
  143. <td class="yes">Yes</td>
  144. <td class="yes">Yes</td>
  145. </tr>
  146. <tr>
  147. <td>Display test coverage</td>
  148. <td class="yes">Yes</td>
  149. <td class="yes">Yes</td>
  150. <td class="yes">Yes</td>
  151. </tr>
  152. <tr class="download">
  153. <td></td>
  154. <td><a href="https://github.com/fatih/vim-go">Install<a/></td>
  155. <td><a href="https://marketplace.visualstudio.com/items?itemName=lukehoban.Go">Install<a/></td>
  156. <td><a href="https://www.jetbrains.com/go">Install<a/></td>
  157. </tr>
  158. </table>
  159. <p>
  160. <sup>1</sup>: Possible when enabled via Settings &gt; Go &gt; On Save, <code>go</code> <code>vet</code> and <code>golint</code> are available via plugins. Also runs tests on save if configured.
  161. <br>
  162. <sup>2</sup>: Additionally, user input can disambiguate when two or more options are available.
  163. </p>
  164. </div>
  165. <style>
  166. .features-matrix {
  167. min-width: 800px;
  168. border-collapse: collapse;
  169. }
  170. .features-matrix th {
  171. width: 60px;
  172. text-align: center;
  173. font-size: 14px;
  174. color: #666;
  175. }
  176. .features-matrix th img {
  177. width: 48px;
  178. }
  179. .features-matrix .yes {
  180. text-align: center;
  181. }
  182. .features-matrix .no {
  183. text-align: center;
  184. background-color: #ffe9e9;
  185. }
  186. .features-matrix .download {
  187. font-weight: bold;
  188. text-align: center;
  189. }
  190. .features-matrix td {
  191. padding: 11px 5px 11px 5px;
  192. border-bottom: solid 1px #ebebeb;
  193. }
  194. .features-matrix .feature-row {
  195. background-color: #ebebeb;
  196. font-weight: bold;
  197. }
  198. </style>
  199. <!--TODO(jbd): Add the Atom comparison-->