Skip to content

1.解决 golang 中 grep console 插件不生效问题

日志多了以后不好找,idea 中的神奇 grep console 在 goland 竟然不好使了,

  1. ctrl+shift+a 找到 Registry

image-20240122103650425

2.找到go.run.processes.with.pty,改为 false

image-202401221037534951

之后关闭窗口即可

2.一条竖线

去掉编辑界面中右侧的一条竖线

按下 Ctrl+Shift+A

输入 show right margin

选择 off

image-20240410100628540

image-20240410100727963

3.unhandled err

现象,

image-20240410101836128

解决方式,

file---->setting,直接搜索

image-20240410102200842

4.调整内存

点击“Help” -> “Edit Custom VM Options”来编辑虚拟机参数。在打开的文件中,我们可以更改-Xmx参数来设置Goland能够使用的最大堆内存大小

image-20240516120254567

5.去掉注释下波浪线

setting->Editor->Color Scheme-->General-->Errors and Warnning

image-20240613111322700

6.插件

image-20250303213851587

image-20250303213937692

image-20250303214006236

  • makefile

  • CamelCase

CamelCase 驼峰命名和下划线命名转换插件

这几种风格的命名方式,用快捷键 ⇧ + ⌥ + U / Shift + Alt + U 可以进行快速转换,当我们需要修改大量变量名称的时候很方便。

  • Codota 代码智能提示插件

7.配置

image-20250303214335417

7.2 设置字体

点击菜单 File -> Settings/Preferences -> Editor -> Font

  • Font : 选择字体;
  • Size : 字体大小;
  • Line height : 字体行高;

点击 Apply 即可实时查看字体大小效果,点击 OK 关闭弹框。

image-20250416165111060

7.3鼠标滚轮动态设置字体大小

点击菜单 File -> Settings/Preferences -> Editor -> General, 勾选上 Change font size with Ctrl + Mouse Wheel in 应用后,即可通过 ⌘+鼠标滚轮(Mac)/ Ctrl+鼠标滚轮 (Windows&Linux) 来更改窗口字体的大小了:

image-20250416170016360

7.4 关闭代码提示区分大小写

Settings -> Editor -> General -> Code Completion , 取消 Match case 勾选即可取消代码提示区分大小写:

image-20250416170837974

7.5 配置git

Version Control -> Git, 在 Path to Git executable 中配置 Git 的启动路径,启动路径为 Git 安装目录中的 /cmd/git.exe

image-20250416171756790

8. 导出配置

下次重装系统也不用担心重新配置了

点击菜单 File -> Manage IDE Settings -> Export Settings

image-20250416171446564