Sublime Forum

How to press enter in command palete parameter?

#1

Try to disable/enable Package with multiple command.
I used for multiple command: https://packagecontrol.io/packages/Chain%20of%20Command

{ "command": "chain",  "caption": "Packages: Enable Column select",
    "args": {
        "commands": [
{"command": "enable_package"},
{"command": "insert", "args": {"characters": "Column Select"}},
//{"command": "enter",},????????
        ]}},

How to press enter to activate it?

0 Likes

Enable/Disable multiple package s with command or hotkey
#2

Try "command": "select",

0 Likes

#3

nope dosnt do anything, command palette stay on selecting item.

still need how to press enter)

0 Likes

#4

Thanks its work in other multiple command plugin Multicommand

but has error in console

I creater new POST

thank you for help

0 Likes

#5

Notice that you are not using the Chain of Command syntax properly. You should not use {"command": "enable_package"},, but ["enable_package"],. Also, you should not not have "args":.

0 Likes

#6

For what it’s worth, if you’re using ST4 the chain command is built in, so you don’t need to have a package installed to do this.

Note also that the errors in your second post are related to the WordCount package, but your key binding isn’t trying to do anything with that package, so I would suggest you verify wether that package is just generally made at you on general principles because the two things seem unrelated.

0 Likes

#7

{“command”: “select”,}

its only way to pocess Enter or Return key?

for example the key move down is shown in console

{“command”: “move”, “args”: {“by”: “lines”, “forward”: true} },

but enter show

key evt: enter

and try this and its not working to…

{“command”: “insert”, “args”: {“characters”: “\n”}},

0 Likes

#8

Yeah I’m pretty sure select is the only way to do this; \n is just a newline, which in ST4 is just going to put a newline into the input widget most likely.

People that overrode the whole of the default key bindings in ST3 and then upgraded to ST4 lose the ability to press enter in various places to trigger commands because they’re blocking the new default key bindings that generate select from happening.

0 Likes