Intellij idea Intellij IDEA,控制向上翻页、向下翻页滚动大小

Intellij idea Intellij IDEA,控制向上翻页、向下翻页滚动大小,intellij-idea,intellij-13,intellij-14,Intellij Idea,Intellij 13,Intellij 14,我不满意intellij中向上翻页和向下翻页的滚动行为。感觉不对。我总觉得自己好像被排除在外了 是否可以调整向上翻页和向下翻页的滚动大小?可能是半页或类似的 无法通过设置来控制这一点。你可以做的是编写一个插件,以你喜欢的方式执行滚动。这相当简单:您只需复制现有的/类以及它们调用的方法(.moveCaretPageUp/Down)即可按您的意愿滚动。我已经采纳了@yole的答案,并实现了他在单独插件中描述的所有操作: 无法通过设置来控制这一点。你可以做的是编写一个插件,以你喜欢的方式执行滚动。这相

我不满意intellij中向上翻页和向下翻页的滚动行为。感觉不对。我总觉得自己好像被排除在外了


是否可以调整向上翻页和向下翻页的滚动大小?可能是半页或类似的

无法通过设置来控制这一点。你可以做的是编写一个插件,以你喜欢的方式执行滚动。这相当简单:您只需复制现有的/类以及它们调用的方法(.moveCaretPageUp/Down)即可按您的意愿滚动。

我已经采纳了@yole的答案,并实现了他在单独插件中描述的所有操作:


无法通过设置来控制这一点。你可以做的是编写一个插件,以你喜欢的方式执行滚动。这相当简单:您只需复制现有的 PageUpAction/PageDownAction类及其调用的方法 (EditorActionUtil.moveCaretPageUp/Down)以按需要滚动

这个插件实现了新的动作“部分向上翻页”和“部分向下翻页”,允许用户在常用的IDEA设置对话框中滚动可配置大小的屏幕


在中有一个插件的可安装版本。

因为很多人都在询问这个问题,对于mac用户来说,这可以通过使用karabiner应用程序在页面上下滚动并添加以下复杂规则来进行全局控制:

{
    "description": "mmm.karabiner.page.up.down.to.scroll",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "page_up"
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": -51
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_invoked": [
                    {
                        "pointing_button": "button1"
                    }
                ]
            },
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": {
                "key_code": "page_up"
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": -51
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "up_arrow",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": -51
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_invoked": [
                    {
                        "pointing_button": "button1"
                    }
                ]
            },
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": {
                "key_code": "up_arrow",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": -51
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "page_down"
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": 51
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_invoked": [
                    {
                        "pointing_button": "button1"
                    }
                ]
            },
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": {
                "key_code": "page_down"
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": 51
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "down_arrow",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": 51
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_invoked": [
                    {
                        "pointing_button": "button1"
                    }
                ]
            },
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^net.java.openjdk.cmd",
                        "^com.jetbrains.intellij"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": {
                "key_code": "down_arrow",
                "modifiers": {
                    "mandatory": [
                        "fn"
                    ]
                }
            },
            "to": [
                {
                    "mouse_key": {
                        "vertical_wheel": 51
                    }
                }
            ],
            "type": "basic"
        }
    ]
},

也请注意,要获得平滑滚动,请考虑下载<强> MOS应用< /强>,并根据需要调整首选项。


这可能会对您的Mac电脑产生其他影响,因此您可能需要调整其他内容,因为您的页面上下不再是页面上下,而是鼠标滚动。

谢谢,我现在正在使用Intellij 14,如何创建新插件?在新项目窗口中看不到。太好了,谢谢。我还要强调与此有关的另一个问题。向上翻页时,指针会移动到文件的开头。向下翻页会导致指针不在正确的位置。因此,如果在文档开头向下滚动一点,然后向上翻页,查找某个内容,然后向下翻页,则会失去原来的位置。非常烦人。@momomo你最终创建了那个插件吗?我会对它感兴趣的;)@javadba不,我没有。不过,我的做法有点不同。我成功地在mac上全局上下操作了页面,使鼠标滚动到我想要的大小(也很平滑!),因此解决了全局性问题,而不仅仅是intellij。我发出了上下滚动半页的功能请求。如果你也错过了,请投它一票:@Rotareti谢谢你!这仍然很烦人,我正在考虑为此开发一个插件。如果你在mac上,你可以在全球范围内获得这种行为,而不仅仅是在Intellij上,这是我最终得到的解决方案。太光滑了。@AaronV-Karabiner。添加一个复杂的规则以在页面向下滚动。@AaronV这里有一个用于页面向下滚动的规则。。。注意,我随机点击后,因为它是滚动。。对于全局使用,您不需要单击。所以其他的规则,除非bundle_identifiers.Great,但是如果你在mac上,你可以在全球范围内获得这种行为,而不仅仅是在Intellij中,这是我最终得到的解决方案。这应该是公认的答案,或者问题应该改变,以反映它是关于改变macOS的行为,而不是Intellij开发界面。因为它是公认的答案,而预期的问题更适合:superuser.com这并没有回答如何在Intellij上实现这一点的问题。将此答案设置为问题的可接受答案是误导性的。@AndréC.Andersen现在有一个用于此的插件。