Sublime Forum

Page Down and Page Up in Popup lists and Overlay lists

#1

The popup lists and overlay lists such as Goto Anything, Command Palette should support Page Down and Page Up keys. Currently they do not. I mean, nothing happens when either Page Down or Page Up is pressed.
Though, in case of long lists, such as Goto Anything and Command Palette, the ability to go through items by pages rather than item by item is fishing for existence. Just because it’s handy and faster.
There are at least two existing topics already created:

Why it is not supported yet?

0 Likes

#2

Feature requests and bug reports are primarily tracked via Github.

Corresponding feature requests to extend navigation within panels are pending at:

1 Like

#3

Here is a temporary solution. It is a little bit ugly since it does not take into account the number of visible items in an overlay. (I’m not sure whether it is possible at all to obtain and use the number of visible items in an overlay within the key bindings).

// Page Down and Page Up in overlays
{
    "keys": ["pagedown"],
    "command": "chain",
    "args": {
        "commands": [
            ["move", {"by": "lines", "forward": true}],
            ["move", {"by": "lines", "forward": true}],
            ["move", {"by": "lines", "forward": true}],
            ["move", {"by": "lines", "forward": true}],
            ["move", {"by": "lines", "forward": true}],
            ["move", {"by": "lines", "forward": true}]
        ]
    },
    "context": [
        { "key": "overlay_has_focus", "operator": "equal", "operand": true }
    ]
},
{
    "keys": ["pageup"],
    "command": "chain",
    "args": {
        "commands": [
            ["move", {"by": "lines", "forward": false}],
            ["move", {"by": "lines", "forward": false}],
            ["move", {"by": "lines", "forward": false}],
            ["move", {"by": "lines", "forward": false}],
            ["move", {"by": "lines", "forward": false}],
            ["move", {"by": "lines", "forward": false}]
        ]
    },
    "context": [
        { "key": "overlay_has_focus", "operator": "equal", "operand": true }
    ]
},
0 Likes