Change keyboard shortcut to “Run Script” in Atom IDE

岁酱吖の 提交于 2019-12-22 00:15:48

问题


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.



来源:https://stackoverflow.com/questions/43164532/change-keyboard-shortcut-to-run-script-in-atom-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!