![]() When you run these commands they will open and execute in a panel within Sublime Text. Type Golang Build and hit Enter to install the package.Īfter installation should see a bunch of new tools in your command palette.Run the Package Control: Install Package command.Open the Sublime Text command palette by pressing Ctrl+Shift+P.The official sublime-build plugin provides integrations so you can execute common go commands (like go run, go test and go get) without leaving your editor. In the latest version of Sublime Text the easiest way to do that by going to Tools > Install Package Control…. You'll also need to install Package Control, if you haven't already. And if you're following along, you should also make sure that your workspace's bin directory is on your system path.Īccordingly my bash ~/.profile configuration includes these lines. To work correctly some of these Sublime Text plugins need an explicit $GOPATH environment variable to be set. If you haven't come across these plugins before, I recommend giving them a try! Prerequisites In this post I'm going to run through the process of setting these up. Snippet management with Sublime Text's inbuilt tool and the PackageResourceViewer plugin.Code navigation with the GoGuru plugin.Autocompletion with the gocode package.Code linting with the SublimeLinter plugin and gometalinter.Automatic formatting with the Gofmt plugin and goimports.Tooling integration with the official sublime-build plugin.Although it took a while to configure, it's resulted in a coding environment that feels clearer to use and more streamlined than before. git at the end).Īnd finally, to uninstall a plugin, type Remove Package and select a plugin for removal.For the past couple of years I've used Sublime Text as my primary code editor, along with the GoSublime plugin to provide some extra IDE-like features.īut I've recently swapped GoSublime for a more modular plugin setup and have been really happy with the way it's worked out. To add a custom repository, type Add Repository in the Command Palette and paste the URL of the repository to add (without. With Package Control plugin you can also install packages from custom repositories, like GitHub or BitBucket. To install a plugin from the Package Control repository, simply type Install Package in the Command Palette and search for the needed package. Once the Package Control is installed, open the Command Palette using the shortcut Ctrl + Shift + P on Windows/Linux or ⌘ Cmd + Shift + P on Mac. Install Package (Plugin) for Sublime Text sublime-package and put it into the Installed Packages directory. After downloading the plugin, change the extension back from. To install Package Control manually, open Preferences -> Browse Packages menu, navigate up to the parent directory and then open the Installed Packages directory.ĭownload Package Control.sublime-package, copy it into the Installed Packages directory and restart Sublime Text. ![]() If the console installation doesn’t work for some reason (for example this can be caused by proxy/firewall settings), you can install Package Control manually. ![]() To install the Package Control, open the console in Sublime Text using the shortcut Ctrl + ` or the View -> Show Console menu and paste the code from the official guide. The easiest way to install a package (plugin) for Sublime Text is to use Package Control – the package manager for Sublime Text.Ĭool Tip: View a config file without comments using grep command! Read More → Install Package Control The functionality of Sublime Text can be extremely extended by hundreds of useful plugins. ![]() ![]() Sublime Text is one of the most popular code editors with a lot of built-in features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |