mom*_*omo 5 intellij-idea intellij-13 intellij-14
我对intellij中向上翻页,向下翻页的滚动行为不满意。感觉不对。总是感觉好像我超出了范围。
是否可以调整上一页,下一页的滚动大小?也许到半页或类似的页面。
我已经接受了@yole 的回答并实现了他在一个单独的插件中描述的所有操作:
没有办法通过设置来控制它。您可以做的是编写一个插件,以您喜欢的方式执行滚动。这相当简单:您需要做的就是复制现有的 PageUpAction/PageDownAction 类和它们调用的方法 (EditorActionUtil.moveCaretPageUp/Down) 以根据需要滚动。
这个插件实现了新的动作“Partial Page Up”和“Partial Page Down”,允许滚动一个可在通常的 IDEA 设置对话框中定义的可配置屏幕大小。
官方 JetBrains 存储库中有该插件的可安装版本。
由于许多人都在询问这一点,对于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"
}
]
},
Run Code Online (Sandbox Code Playgroud)
另请注意,为了实现平滑滚动,请考虑下载Mos 应用程序并根据需要调整首选项。
这可能会对您的 Mac 产生其他后果,因此您可能需要调整其他内容,因为您的 page_up/down 不再是 page_up/down而是鼠标滚动。
| 归档时间: |
|
| 查看次数: |
1187 次 |
| 最近记录: |