Create custom key binding for Atom editor snippet
Asked Answered
E

1

7

I want to create a custom key binding for an Atom snippet. I've added the following snippet into my snippets.cson file (Atom → Open Your Snippets):

'.text.latex':
  'emph':
    'prefix': 'em'
    'body': '\\\\emph{$1}'

The snippet works just fine. Now I want to add a custom key command to my keymap.cson (Atom → Open Your Keymap), which triggers this snippet. I tried naive variations of the following addition, but so far none worked:

'atom-text-editor:not(.mini)':
  'cmd-i': 'latex:emph'

The Atom Flight Manual keymaps section is not helpful for me regarding this problem.

Can someone help with the proper command?

Emilie answered 4/11, 2015 at 16:28 Comment(0)
A
0

The keyboard localization package might solve your problem. It allows you to generate an entirely custom keymap. https://atom.io/packages/keyboard-localization

Ardor answered 12/4, 2016 at 7:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.