Go Toggle Declare
GoToggleDeclare is a Golang plugin for Sublime Text which toggles the short variable declaration := and the assignment operator =.
Details
Installs
- Total 691
- Win 336
- Mac 196
- Linux 159
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
GoToggleDeclare
GoToggleDeclare is a Golang plugin for Sublime Text which toggles the short variable declaration :=
and the assignment operator =
.
Please checkout GoAutoDeclare for automatic correction on save.
Usage
Given the following line of code:
sum = func(a, b int) int { return a+b } (3, 4)
Place your cursor on the line and press shift+tab
. You'll get:
sum := func(a, b int) int { return a+b } (3, 4)
GoToggleDeclare replaced =
with :=
, press shift+tab
again and it will change it back.
Install
Install Sublime Package Control (if you haven't done so already) from http://wbond.net/sublime_packages/package_control. Be sure to restart ST to complete the installation.
Bring up the command palette (default
ctrl+shift+p
orcmd+shift+p
) and start typingPackage 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 GoToggleDeclare and press return or on its entry to install GoToggleDeclare. If there is no entry for GoToggleDeclare, you most likely already have it installed.
Default key binding:
[
{
"keys": ["shift+tab"], "command": "go_toggle_declare"
}
]
You can set your own keybinding by copying the above into Preferences > Keybindings - User
and replacing shift+tab
with your preferred key(s).
License
GoAutoDeclare is released under the MIT license. See LICENSE.md