GoLand - Golang IDE
2016-12-24 | 更新: 2019-01-11
官网:https://www.jetbrains.com/go/
配置
行为
-
Ensure line feed at file end on save
Preferences → Editor → General → Ensure line feed at file end on save -
Disable Drag'n'Drop functionality in editor, 鼠标拖动就复制粘贴实在太烦了
Preferences → Editor → General → 去掉勾选 Enable Drag'n'Drop functionality in editor
外观
-
Copy Colors & fonts Scheme to own
Preferences → Editor → Colors & Fonts, Save As -
Editor Font
Preferences → Editor → Colors & Fonts → Font -
Copy Code Style Scheme to own
Preferences → Editor → Code Style, Scheme → Manage → Save As -
Right margin (columns)
Preferences → Editor → Code Style, Default Options → Right margin (columns) -
Code Style of Languages
Preferences → Editor → Code Style → Choose a language -
Show whitespaces
Preferences → Editor → General → Apperance → Show whitespaces
快捷键重新设定
⌘ + r
- Keymap → Main menu → Refactor → Rename
快捷键
搜索
⇧ + ⇧
- 打开搜索框,默认所有任何东西,可以用 Tab 键来选择具体搜索内容 All, Types, Files, Symbols, Actions⌘ + o
- 打开 Types 搜索⌘ + ⇧ + o
- 打开 Fiels 搜索
其他
⌘ + l
- 跳转到具体行列⌘ + b
- 跳转到 Declaration⌘ + [
- 跳转回来⌘ + ]
- 跳转过去
插件
每次保存的时候 goimports 当前文件
只需录制一个宏,Save file + Goimports file,然后将 ⌃ + s
快捷键绑定到这个宏就完成了,是不是很简单。
录制宏功能可在 Edit → Macros 找到。
在新版本中,已经添加了这个功能了,只需在 Preferences → Go → On Save → On save run 设置即可
2017-10-31 在新版本中用 File Watchers 插件代替了 On Save
配置文件
Mac OS X
- Configuration:
~/Library/Preferences/<PRODUCT><VERSION>
- Caches:
~/Library/Caches/<PRODUCT><VERSION>
- Plugins:
~/Library/Application Support/<PRODUCT><VERSION>
- Logs:
~/Library/Logs/<PRODUCT><VERSION>