问题描述
当使用 IdeaVim 编辑折叠的 Python 代码时,如果插入符号/光标接触由 ...
(或 region_name
如果使用 #region
标签),折叠部分立即展开.我想禁用此行为,以便不会展开折叠,除非使用特定命令明确告知这样做.
When editing folded Python code with IdeaVim, if the caret/cursor touches a folded zone represented by ...
(or region_name
if using a #region
tag), the folded section immediately unfolds.I'd like to disable this behavior so that no fold ever unfolds unless specifically told to do so with a specific command.
注意事项:
- 我在 Windows 10 上使用 PyCharm Community 2018.3.7 和 IdeaVim 0.57.
- 当我不在 IdeaVim 模式下时不会出现这个问题(所以这不是 PyCharm 的故障").
- 这个问题在 Neovim 0.4.3 中不会出现,我猜它不会在其他 *Vims 中出现
- 这不会影响所有折叠区域.主要是
#region
/#endregion
折叠和长注释,但不是折叠函数. - 这种行为似乎有点随意.有时,只有当插入符号位于
...
区域时,如果我向右或向左走,该区域才会展开,有时即使我只是通过",它也会展开.向上或向下.
- I use PyCharm Community 2018.3.7, with IdeaVim 0.57, on Windows 10.
- This problem doesn't occur when I'm not in IdeaVim mode (so it's not PyCharm's "fault").
- This problem doesn't occur in Neovim 0.4.3, I guess it doesn't in other *Vims
- This doesn't affect all folded zones. Chiefly
#region
/#endregion
folds and long comments, but not folded functions. - This behavior seems a little random. Sometimes the zone will only unfold if I go right or left when the caret is on the
...
zone, sometimes it unfolds even if I'm just "passing through" with up or down.
编辑(基于下面@Feedforward 的评论):
此错误在 jetBrain 的错误跟踪器上发出信号:https://youtrack.jetbrains.com/issue/VIM-629
This bug was signaled here on jetBrain's bug tracker: https://youtrack.jetbrains.com/issue/VIM-629
它被驳回,因为问题是不可重现的".我会看看有没有办法安排它,但显然这个问题短期内没有解决的希望.
It was dismissed because the problem was "non-reproducible". I'll see if there's a way to arrange that, but apparently there's no hope of solving this problem anytime soon.
推荐答案
不幸的是,没有办法禁用它,因为它更像是 IdeaVim 中的一个错误.您可以在错误跟踪器上提交问题:https://youtrack.jetbrains.com/issues/VIM
Unfortunately, there is no way to disable it because it's more like a bug in IdeaVim. You can file an issue on the bug tracker: https://youtrack.jetbrains.com/issues/VIM
这篇关于PyCharm + IdeaVim:如何禁用插入符号触摸时的自动展开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!