Mac 上的 IntelliJ Find Action 错误打开终端应用程序

IntelliJ Find Action on Mac opens terminal app by error

当我在 IntelliJ 中按下 Cmd + Shift + A 时,它应该会打开 "Find Action..." 对话框。相反,它使用 apropos 命令打开 Terminal.app。

我该如何解决这个问题?

似乎在 MacOs 10.14.4 中启用了一个新的默认快捷方式 - 服务 -> 在终端中搜索手册页索引。它使用与 Find Action - Cmd+Shift+A 相同的快捷方式。因此,在 IDE 中使用 Find Action 有时会打开终端 window 并显示 apropos <smth> 命令输出。

显式位置:系统偏好设置>键盘>快捷方式>服务(左侧)>(取消选中)在终端中搜索手册页索引

这是一个脚本 (hosted in gist),它将通过命令行执行此操作,这对于想要为大量用户推出此更改的组织可能很有用。

TEMP_SETTINGS_FILE=$(mktemp -t 'man-shortcuts-off.json')
cat > $TEMP_SETTINGS_FILE <<EOF
{
  "NSServicesStatus": {
    "com.apple.Terminal - Open man Page in Terminal - openManPage": {
      "presentation_modes": {
        "ContextMenu": false,
        "ServicesMenu": false
      },
      "enabled_context_menu": false,
      "enabled_services_menu": false
    },
    "com.apple.Terminal - Search man Page Index in Terminal - searchManPages": {
      "presentation_modes": {
        "ContextMenu": false,
        "ServicesMenu": false
      },
      "enabled_context_menu": false,
      "enabled_services_menu": false
    }
  }
}
EOF
# Settings are stored in the pbs domain. Other settings in this domain will not be overwritten. I’ve included the settings to change in JSON for brevity. They are converted to XML (which `defaults import` expects) before being imported.
plutil -convert xml1 -o - ${TEMP_SETTINGS_FILE} | defaults import pbs -
rm ${TEMP_SETTINGS_FILE}