# Golang Build 官方发布 #

Sublime Text build system integration packages

Gophers,

This is our first stable release of a set of Sublime Text packages (v0.9.0):

  • ‘golangconfig’ is a developer library used to obtain information about the local Go environment. It handles configuration ($GOPATH, etc) through a combination of auto-detection and configuration. It is designed to be used by other Go-related Sublime Text packages.
  • ‘Golang Build’ provides Go toolchain integration with the Sublime build system – go build, go run, go install, go test. It is the first package to utilize the functionality of golangconfig.

Golang Build can be installed via packagecontrol.io:

  1. If you don’t already have Package Control installed, follow these instructions.
  2. Run the “Install Package” command via the command palette
  3. Type “Golang Build” and press enter

User documentation for Golang Build is available here. If you’d like to contribute to either package, there is also complete developer documentation available on Github (golangconfigGolang Build).


Please file bugs using the appropriate issue trackers on Github. For problems with Go environment detection and configuration, issues should be filed at:

For bugs related to the build command integration, issues should be filed at:

Our goal is to have other Go-related Sublime packages adopt golangconfig. This would allow users to set their Go environment configuration in one place and have that used by all of their installed Go/Sublime packages. If you are an author of a Go-related Sublime Text package, we’d love to hear your feedback on golangconfig.

Happy Editing,
The Go Team

Sublime Text 安装 GO说明

想必已经安装了st的插件管理器

直接安装名称为 “Golang Build “即可

Golang Build 源码  

Golang Build

Golang Build 文档

Golang Build 使用文档

 

问:Sublime Text 2如何跳转函数

答:CTRL+R 或者 CRTL+P输入@

问:Sublime Text 2如何跳转到多少行

答:CTRL+G

问:Sublime Text 2如何快速查找、跳转需要编辑的文件

答:前提是你打开的一个文件夹(一个项目),CTRL+P,支持模糊匹配。

问:Sublime Text 2如何快速注释

答:CTRL+/ 注释单行  CTRL+SHIFT+/注释多行

问:Sublime Text 2如何设置代码片段,并快速调用

答: 菜单:tools->new snippet

Wwek的Sublime Text使用的配置

Sublime Text快捷键:

  • Ctrl+Shift+P:打开命令面板
  • Ctrl+P:搜索项目中的文件
  • Ctrl+G:跳转到第几行
  • Ctrl+W:关闭当前打开文件
  • Ctrl+Shift+W:关闭所有打开文件
  • Ctrl+Shift+V:粘贴并格式化
  • Ctrl+D:选择单词,重复可增加选择下一个相同的单词
  • Ctrl+L:选择行,重复可依次增加选择下一行
  • Ctrl+Shift+L:选择多行
  • Ctrl+Shift+Enter:在当前行前插入新行
  • Ctrl+X:删除当前行
  • Ctrl+M:跳转到对应括号
  • Ctrl+U:软撤销,撤销光标位置
  • Ctrl+J:选择标签内容
  • Ctrl+F:查找内容
  • Ctrl+Shift+F:查找并替换
  • Ctrl+H:替换
  • Ctrl+R:前往 method
  • Ctrl+N:新建窗口
  • Ctrl+K+B:开关侧栏
  • Ctrl+Shift+M:选中当前括号内容,重复可选着括号本身
  • Ctrl+F2:设置/删除标记
  • Ctrl+/:注释当前行
  • Ctrl+Shift+/:当前位置插入注释
  • Ctrl+Alt+/:块注释,并Focus到首行,写注释说明用的
  • Ctrl+Shift+A:选择当前标签前后,修改标签用的
  • F11:全屏
  • Shift+F11:全屏免打扰模式,只编辑当前文件
  • Alt+F3:选择所有相同的词
  • Alt+.:闭合标签
  • Alt+Shift+数字:分屏显示
  • Alt+数字:切换打开第N个文件
  • Shift+右键拖动:光标多不,用来更改或插入列内容
  • 鼠标的前进后退键可切换Tab文件
  • 按Ctrl,依次点击或选取,可需要编辑的多个位置
  • 按Ctrl+Shift+上下键,可替换行

 

扩展阅读
Sublime Text 使用介绍、全套快捷键及插件推荐