Y
Y
Yan Aleksandrov2020-07-17 13:23:38
atom
Yan Aleksandrov, 2020-07-17 13:23:38

How to add your own hotkeys?

Tell me how to add hotkeys to the Atom editor?
In keymap.cson I add:

# 'atom-text-editor':
#   'enter': 'editor:newline'
#   'ctrl-alt-d': 'custom:addDiv'

In init.coffee:
# atom.commands.add 'atom-text-editor', 'custom:addDiv', ->
#   atom.workspace.getActiveTextEditor()?.insertText('<div class=""></div>')
#   atom.workspace.getActiveTextEditor()?.moveLeft(6)

Reloading the editor. There is no effect.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question