Reputation: 1367
I have disabled the default Atom IDE keybinding for the combination alt + f (In my keymap.cson):
'atom-text-editor':
'alt-f': 'unset!'
How to make it to show [ character when I click alt + f?
Upvotes: 1
Views: 686
Reputation: 54517
Here's how to do this, based on this forum entry:
init.coffee
script file (Menu: Atom > Init Script...
)Insert the following text (make sure to use the right indentation:
atom.commands.add 'atom-text-editor',
'custom:insert-bracket': ->
atom.workspace.getActiveTextEditor()?.insertText('[')
Save the file.
Atom > Keymap...
)Add the following mapping (replacing yours) to call the new command:
'atom-text-editor':
'alt-f': 'custom:insert-bracket'
Save the file.
This worked for me, pressing Alt+f now inserts an opening bracket (which is automatically completed with a closing bracket by Atom).
Upvotes: 1