Can't get Text Replacement to work in my mac

Hello. Related question

I have configured some text replacements in my local machine, via Preferences > Keyboard > Text, including a lot of code shortcuts, including shortcuts for my own developed system urls, that are not by-default suggested by Atom, such as:

apj -> application/json
epc -> events/panels/criteria
hurl -> http://my.home.url/

But I can’t get them to work in Atom. Any ideas? Is this already implemented in Atom?

Looks like the application requires some special code to interact with that feature. Unless the devs decide to add it or someone submits a PR for it, the snippets feature is what you want. To get your examples, just set up a block like so:

'*':
  'application.json':
    prefix: 'apj'
    body: 'application.json'
  'EPC':
    prefix: 'epc'
    body: 'events/panels/criteria'
  'My URL':
    prefix: 'hurl'
    body: 'http://my.home.url/'
1 Like

From System Preferences you can do some drag and drop to extract all text replacements into a .plist file, like explained here. Using this file and a find & replace methode you prefer, you can implement this into your snippets.cson file like explained above.

To make Atom behave similar to how your text replacements behave in other Mac applications, add the following line to your keymap.cson:

    ‘atom-text-editor:not([mini])’:
        ‘space’: ‘snippets:expand’