Sublime Forum

Auto show the "more" info in completions list

#1

Is there a way to auto show the more info, in completions list?

I will click the more button very time now.

0 Likes

#2

You can bind a key to do “move down” + “open More” such as

// ...

    {
        "keys": ["WAHTEVER"], // sure, you can bind it to "down"
        "command": "chain",
        "args": {
            "commands": [
                ["move", { "by": "lines", "forward": true }],
                ["auto_complete_open_link"],
            ]
        },
        "context": [{ "key": "auto_complete_visible" }],
    },

A friendly warning, “open More” can potentially execute arbitrary Python codes. Say if a plugin author design “open More” = visit a website, then this keybinding equivalently auto open that website while you may just want to move down.

0 Likes

#3

Thanks, works fine~ :+1:

{
    "keys": ["down"], // sure, you can bind it to "down"
    "command": "chain",
    "args": {
        "commands": [
            ["move", { "by": "lines", "forward": true }],
            ["auto_complete_open_link", { "by": "lines", "forward": true }],
        ]
    },
    "context": [{ "key": "auto_complete_visible" }],
},
{
    "keys": ["up"], // sure, you can bind it to "down"
    "command": "chain",
    "args": {
        "commands": [
            ["move", { "by": "lines", "forward": false }],
            ["auto_complete_open_link", { "by": "lines", "forward": true }],
        ]
    },
    "context": [{ "key": "auto_complete_visible" }],
},

And could this auto open when completion list popup?

0 Likes

#4

Maybe a plugin with on_post_text_command hook. I am not sure.


Update: Nope. auto_complete is not fired unless it’s explicitly triggered by the user with a keybinding.

0 Likes