两个JB IDE(PyCharm/IDEA)问题的处理

问题一

最近经常发生在PyCharm关闭项目的时候,卡死在“Closing prject”窗口上,只能kill之。

解决

搜了一下,说是因为它在关闭时会等待所有后台任务结束,但大多数时候也没有什么后台任务,所以禁用这个功能吧。

参考PyCharm 2023.1 issue - closing project window stuck (PyPIPackageUtil.lambda$parsePyPIListFromWeb):

Lejia Chen
Commented 7 months ago

@Haiqiang Wang Hi, as a workaround, you could try to select Help | Find Action from the main menu, type Registry..., select it and in the opened list, find and disable the ide.await.scope.completion options here to workaround this issue.
When closing, the IDEA will wait for all other background tasks to be finished, and enabling that flag can let the IDEA not wait for them and exit directly.
This may lead to other errors because the shutdown will not be graceful, but it might still be better to bail rather than to hang forever.

禁用ide.await.scope.completion以后秒关。虽然说这样不怎么graceful,但是总比kill更graceful一点。

问题二

因为之前用了很多年macOS,所以有些热键比较习惯,所以在PyCharm上我都加上了mac式的热键。但是InteliJ IDEA有个问题:

不能使用win键(相当于mac下的cmd键)作组合键。

解决

解决方案在此:Unable to use Windows as a modifier key in keymap

Vassiliy Kudryashov
Commented almost 8 years ago
Unfortunately the feature wouldn't be enabled by default because of 'native' bugs with <Windows> key when we just lose events under both Windows and Linux and then get 'dead keyboard'. It's very annoying and clashes even with the default and widely-used Win8/Win10 shortcut Win+Space (switch keyboard layout).

But you're still welcome to set this custom flag on your own risk:
Help –> Edit Custom Properties... –> keymap.windows.as.meta=true

实测能用,那就行了。

事实证明这种情况还得是放狗搜索,AI基本没用。

推送到[go4pro.org]