Window10 Goland-2019.3.2 安装+破解+常用配置
前往新版连接,https://www.cnblogs.com/nickchou/p/.html
关于golang的开发IDE一般常用vscode和goland(推荐用Goland,在功能集成性上的速度和便捷度都非常好)
一、下载Goland
官网地址:https://www.jetbrains.com/go/
迅雷下载:https://download-cf.jetbrains.com/go/goland-2019.3.2.exe
二、下载注册补丁(pojie)(不需要改Host)
下载地址:https://sigusoft.com/s/1FrpavOrzkzLDYShndnqRZQ 提取码 2c4t
下载并解压到指定文件夹(文件路径避免中文),注意必须要包含jetbrains-agent.jar和important.txt2个文件,如图:
![](https://jihuo.bianchenghao6.com/uploads/202404/16/77f726eff23dc391.webp)
如果补丁下载有问题,请详见作者博客 https://sigusoft.com/
三、安装Goland
![](https://jihuo.bianchenghao6.com/uploads/202404/16/3a78352735a5b6ec.webp)
![](https://jihuo.bianchenghao6.com/uploads/202404/16/e989da969851a764.webp)
![](https://jihuo.bianchenghao6.com/uploads/202404/16/27b834627c84765b.webp)
![](https://jihuo.bianchenghao6.com/uploads/202404/16/e2c868b18d137b62.webp)
选择Skip Remaining and Set Default
![](https://jihuo.bianchenghao6.com/uploads/202404/16/92ac0a59a550dbed.webp)
选择试用,点Evaluate
![](https://jihuo.bianchenghao6.com/uploads/202404/16/e6f8398d55a5e937.webp)
点击Continue
![](https://jihuo.bianchenghao6.com/uploads/202404/16/7f33b1ca346dd4eb.webp)
创建一个空项目
![](https://jihuo.bianchenghao6.com/uploads/202404/16/29408382e88ea9c3.webp)
点击创建
![](https://jihuo.bianchenghao6.com/uploads/202404/16/d7135d855628c20a.webp)
点击菜单栏:Help->Edit Custom VM Options...
![](https://jihuo.bianchenghao6.com/uploads/202404/16/26b1c0f82a475d1e.webp)
提示是否创建goland64.exe.vmoptions,选择Create
![](https://jihuo.bianchenghao6.com/uploads/202404/16/63010b85a9e0a4f0.webp)
在文件最后一行加上补丁配置,路径改成自己的
![](https://jihuo.bianchenghao6.com/uploads/202404/16/aedbb3834a0ba08c.webp)
然后重启下Goland
重启后再次点击 Help->Register,从ACTIVATION_CODE.txt在复制激活码到Avtivation code中,激活即可,如图适用于2019.3.3及以下的版本,不要升级2019.3.4
![](https://jihuo.bianchenghao6.com/uploads/202404/16/c8b170eadac070d9.webp)
三、完成安装+破解
![](https://jihuo.bianchenghao6.com/uploads/202404/16/72c3bc2cc02cd83e.webp)
如果出现下面提示,回到步骤二看下,把下载的补丁包里未经修改的important.txt复制到jetbrains-agent.jar的同级目录即可
![](https://jihuo.bianchenghao6.com/uploads/202404/16/1e4ba6e64fe6fbb7.webp)
四、相关配置
1、实际在项目开发的时候发现一直提示"goland go list -m -json all" 且包也一直提示 Cannot resolve directory,如图:
![](https://jihuo.bianchenghao6.com/uploads/202404/16/6222359bfb214857.webp)
请检查先项目里的Proxy配置(默认值是direct)改为 https://goproxy.cn,direct 即可
![](https://jihuo.bianchenghao6.com/uploads/202404/16/85ab61cb74427165.webp)
2、默认字体配置对中文支持不好,如图
![](https://jihuo.bianchenghao6.com/uploads/202404/16/efc974fb50439c7a.webp)
菜单栏:File -> Setting(快捷键Ctrl+Alt+S),Simsun字体看起来好一些,也可以自行选择
![](https://jihuo.bianchenghao6.com/uploads/202404/16/eb8446b1042479a4.webp)
效果图:
![](https://jihuo.bianchenghao6.com/uploads/202404/16/cf3e85e6132e6d63.webp)
3、保存文件立即go fmt格式化代码
点击菜单栏:File->Settings->Tools->File Watchers->点击 "+"号,选择go fmt,直接保存即可。Ctrl+S后会自动格式化代码
![](https://jihuo.bianchenghao6.com/uploads/202404/16/cfdaad739b40f075.webp)
4、Goland的Terminal设置为Git Bash
在File > Settings > Tools > Terminal > Shell_path 中的cmd.exe修改为 C:Program FilesGitbinsh.exe,设置后在Terminal关闭tab再重新新增即可
![](https://jihuo.bianchenghao6.com/uploads/202404/16/10f7d4f1a8f92de5.webp)
5、取消下图调用方法返回的参数类型,仅针对2019.3的版本
![](https://jihuo.bianchenghao6.com/uploads/202404/16/be2f0e01819b2b69.webp)
菜单栏:File -> Setting(快捷键Ctrl+Alt+S)-> Editor -> Inlay Hits -> Go,取消Show parameter hits
![](https://jihuo.bianchenghao6.com/uploads/202404/16/f62d216666f54ea6.webp)
6、编辑运行/调试配置
![](https://jihuo.bianchenghao6.com/uploads/202404/16/ee8fece6e4040e54.webp)
7、设置Ctrl+鼠标滚轮调整字体大小
![](https://jihuo.bianchenghao6.com/uploads/202404/16/74c2c57bac941b48.webp)
8、设置鼠标悬浮显示文档
File -> Setting -> Editor -> General -> 找到Other下面的"Show Quick document on mouse move"
![](https://jihuo.bianchenghao6.com/uploads/202404/16/a760ba1954f6bcf9.webp)
效果如下:
![](https://jihuo.bianchenghao6.com/uploads/202404/16/7464181bbcce3a27.webp)
五、部分快捷键
说明
快捷键
转到定义
Ctrl+B
返回定义
Alt+方向左键
重命名文件or文件夹
Shift+F6
显示注释文档
Ctrl+Q