Change keyboard shortcut to “Run Script” in Atom I

2020-07-24 03:35发布

问题:

In the "Script" package, The keyboard shortcut to "Run Script" is shift+ctrl+b. Does anyone know how to change this to a custom shortcut?

I have script 3.14.1 installed in Atom (with Windows 10 64bit)

回答1:

go to "Settings", "Packages", find the "script" package and click "Settings".

at the top, select "View Code" button.

In the new window that pops up, expand the "keymaps" folder and open the "script.cson" file.

Find the shortcut for 'script:run' (line 15) and type in your preferred shortcut.

Save the file.

That's it!



回答2:

The previous answer didn't work for me. What worked is using the keymap.cson of the atom editor:

An there just add, e.g. (to run with Alt-R):

'atom-text-editor':
    'alt-r': 'script:run'

Then it was working just fine. You can similarly modify any other Atom shortcuts here too.