Sublime Forum

Command "Select" not working in ST3

#1

Cant press enter(select) with command in ST3 to activate.
When i manually pressing enter its working, but with command doesn’t work.

            {"command": "select"},
            {"command": "select", "args": {"select": true}},
            {"command": "select", "context": "window"},
            {"command": "select", "args": {"select": true}, "context": "window"},

No-one from this doesnt work in ST3 but work in ST4 normally.
Seams in ST3 is other args or context…
Is there are other option how press select? Or maybe somebody knows options?

What i used:
ImprovedMacros that give ability to use delay in multiple commands
and plugin selectuntil

    {   "caption": "multiple_commands:  Fold 1-2",
        //"keys": "ctrl+alt+s",
        "command": "run_multiple_commands",
        "args": {
          "commands":[ 
            {"command": "unfold_all"},
            {"command": "move",  "args":  {"by": "lines", "forward": true}},
            {"command": "goto_indentation",  "args":  {"before": 0, "type": "lesser"}},
            {"command": "select_until",  "args": {"extend": true },"delay":200},
            {"command": "insert_snippet","args": {"contents": "-/^(\\s{2}|\\s{1})([^\\s].*)\\$/"}, "context": "window","delay":200},
            {"command": "select", "args": {"select": true}, "context": "window","delay":1000},


        ]}},

0 Likes

#2

In ST3 the select command only works to pick items from the command palette, and selecting items in other places/submitting input is hard coded to use the enter key.

In ST4 this was altered so that the select command works in more places, and the default key bindings bind it to enter so that the same keys that used to work still do, but it’s possible to change them if you want to.

This is, incidentally, why people upgrading to ST4 from ST3 that have completely overridden all of the key bindings lose the ability to press Enter in a variety of places.

0 Likes

#3

Thanks.

Maybe there is a way to call Select via arguments?
SelectUntil.py

like:

{“command”: “select_until”, “args”: {“extend”: true, “on_done”: true },“delay”:2000},
{“command”: “select”,“args”: { “by”: “lines”, “forward”: true, }
or
{“command”: “select”,
“args”: {“select”: “true”},
“context”:
[

                 { "key": "panel_visible", "operator": "equal", "operand": true },
                 { "key": "overlay_visible", "operator": "equal", "operand": true },
                 { "key": "auto_complete_visible", "operator": "equal", "operand": true },
                 "window"
            ]},

This command works to hide input_panel

{“command”: “hide_panel”, “args”: {“cancel”: true}, “context”: “window”,“delay”:2000},

0 Likes