Skip to content
This repository

A Golang plugin collection for the text editor SublimeText 2 providing code completion and other IDE-like features.

branch: master
Octocat-spinner-32 articles * misc cleanup July 17, 2013
Octocat-spinner-32 doc fix formatting July 18, 2013
Octocat-spinner-32 gosubl * ann February 25, 2014
Octocat-spinner-32 settings * add comment setting fixes #298 July 14, 2013
Octocat-spinner-32 something_borrowed * miss-renamed July 26, 2013
Octocat-spinner-32 src * backport some InstallSuffix changes from gs-next to allow setting t… February 25, 2014
Octocat-spinner-32 ss - add 2 screenshots January 28, 2012
Octocat-spinner-32 syntax * close #416 December 21, 2013
Octocat-spinner-32 .no-sublime-package ? July 20, 2013
Octocat-spinner-32 9o.hidden-tmLanguage * misc tweaks; fixes #180 March 25, 2013
Octocat-spinner-32 9o.hidden-tmLanguage.json * misc tweaks; fixes #180 March 25, 2013
Octocat-spinner-32 9o.md * clarify the interaction between the pre-defined env vars and the us… June 30, 2013
Octocat-spinner-32 AUTHORS.md Update AUTHORS.md December 16, 2013
Octocat-spinner-32 CHANGELOG.md * ann February 25, 2014
Octocat-spinner-32 Default (Linux).sublime-keymap ... December 26, 2013
Octocat-spinner-32 Default (Linux).sublime-mousemap * track mouse clicks globally December 27, 2012
Octocat-spinner-32 Default (OSX).sublime-keymap ... December 26, 2013
Octocat-spinner-32 Default (OSX).sublime-mousemap * track mouse clicks globally December 27, 2012
Octocat-spinner-32 Default (Windows).sublime-keymap ... December 26, 2013
Octocat-spinner-32 Default (Windows).sublime-mousemap * track mouse clicks globally December 27, 2012
Octocat-spinner-32 GoSublime-next.tmLanguage * add fallbacks for the old syntax files June 30, 2013
Octocat-spinner-32 GoSublime.py * show the exception when exec fails to load about.py July 20, 2013
Octocat-spinner-32 GoSublime.sublime-build * make build_command configurable February 03, 2013
Octocat-spinner-32 GoSublime.sublime-commands * fix opening the wrong error log June 29, 2013
Octocat-spinner-32 GoSublime.sublime-settings * sync sh.py with gs-next December 21, 2013
Octocat-spinner-32 GoSublime.tmLanguage * add fallbacks for the old syntax files June 30, 2013
Octocat-spinner-32 GoSublime.tmLanguage.json * highlight fmt vebs in raw strings as well February 03, 2013
Octocat-spinner-32 GsDoc.hidden-tmLanguage * rename tmlanguage files to remove them the menus January 25, 2013
Octocat-spinner-32 LICENSE.md - misc July 07, 2012
Octocat-spinner-32 Main.sublime-menu * fix opening the wrong error log June 29, 2013
Octocat-spinner-32 Preferences.sublime-settings - add global prefs... add dot(.) to trigger autocompletion April 24, 2012
Octocat-spinner-32 README.md Typos in README.md September 01, 2013
Octocat-spinner-32 THANKS.md Add Sander van Harmelen March 08, 2014
Octocat-spinner-32 USAGE.md Cleaning USAGE.md August 31, 2013
Octocat-spinner-32 gs9o.py tmp: add a command that opens 9o and runs each specified command November 23, 2013
Octocat-spinner-32 gscommands.py * fix missing callback arg December 22, 2013
Octocat-spinner-32 gscomplete.py * close #457: make caltips more like func decls January 26, 2014
Octocat-spinner-32 gsdoc.py fix python unicode length problem July 27, 2013
Octocat-spinner-32 gsev.py * close #340 . sync the settings in all files January 22, 2014
Octocat-spinner-32 gslint.py * handle <stdin> special-case March 03, 2013
Octocat-spinner-32 gspalette.py * use pkgpaths to implements the pkg list in m_import_paths July 27, 2013
Octocat-spinner-32 gssynforce.py :| June 30, 2013
Octocat-spinner-32 gstest.py close #459 January 21, 2014
README.md

GoSublime

Click here to lend your support to: GoSublime and make a donation at www.pledgie.com !

Intro

GoSublime is a Golang plugin collection for the text editor SublimeText providing code completion and other IDE-like features. Both Sublime Text versions 2 and 3 are supported.

Features

  • code completion from Gocode
  • context aware snippets via the code-completion popup to complement the existing SublimeText Go package.
  • sublime build system(ctrl+b) integrating with GoSublime 9o command prompt
  • lint/syntax check as you type
  • quickly jump to any syntax error reported (and jump back to where you were before (across files))
  • quickly fmt your source or automatically on save to conform with the Go standards
  • easily create a new go file and run it without needing to save it first (9o replay)
  • share your snippets (anything in the loaded file) on play.golang.org
  • list declarations in the current file
  • automatically add/remove package imports
  • quickly jump your import section(automatically goes to the last import) where you can easily edit the pkg alias and return to where you were before
  • go to definition of a package function or constant, etc.
  • show the source(and thus documentation) of a variable without needing to change views

Demo

Installation

Sublime Package Control allows you to easily install or remove GoSublime (and many other ST2 packages) from within the editor. It offers automatically updating packages as well so you no longer need to keep track of changes in GoSublime.

  1. Install Sublime Package Control (if you haven't done so already) from http://wbond.net/sublime_packages/package_control . Be sure to restart ST2 to complete the installation.

  2. Bring up the command palette (default ctrl+shift+p or cmd+shift+p) and start typing Package Control: Install Package then press return or click on that option to activate it. You will be presented with a new Quick Panel with the list of available packages. Type GoSublime and press return or on its entry to install GoSublime. If there is no entry for GoSublime, you most likely already have it installed.

Usage

Please see USAGE.md and 9o.md for general usage and other tips for effective usage of GoSublime

NOTE GoCode is entirely integrated into GoSublime/MarGo. If you see any bugs related to completion, assume they are GoSublime's bugs and I will forward bug reports as necessary.

Settings

You can customize the behaviour of GoSublime by creating a settings file in your User package. This can be accessed from within SublimeText by going to the menu Preferences > Browse Packages.... Create a file named GoSublime.sublime-settings or alternatively copy the default settings file Packages/GoSublime/GoSublime.sublime-settings to your User package and edit it to your liking.

Note: File names are case-sensitive on some platforms (e.g. Linux) so the file name should be exactly GoSublime.sublime-settings with capitalization preserved.

Completion Markers

The following letters are used as suffix for entries in the completion list.

  • ʂ - Snippets. These snippets are provided by GoSublime and should not be confused with SublimeText's snippets. Furthermore, they are context sensitive, therefore the snippets provided in the global scope will be different to those provided in function scope.

  • ν - Variables

  • ʈ - User-defined types, structs, maps, slices, etc.

  • Ɩ - Constants

  • ƒ - Functions

  • ρ - Packages

Copyright, License & Contributors

GoSublime and MarGo are released under the MIT license. See LICENSE.md

GoSublime is the copyrighted work of The GoSublime Authors i.e me (https://github.com/DisposaBoy/GoSublime) and all contributors. If you submit a change, be it documentation or code, so long as it's committed to GoSublime's history I consider you a contributor. See AUTHORS.md for a list of all the GoSublime authors/contributors.

GoSublime bundles several dependencies, these all reside under the directory tree something_borrowed/ and are the copyright of their respective authors.

Supporters

GoSublime has received support from many kind individuals and as a thank you I've added most to THANKS.md file as a way of saying Thank You. Some donors donated anonymously and so are not listed, however, if you donated and either I have not yet sent you an email personally thanking you or you would otherwise like to be added, please don't hesitate to contact me disposaboy@dby.me

Something went wrong with that request. Please try again.