Dilip Suthar
Dilip Suthar

Reputation: 65

How to make Custom autocomplete in Atom?

how can we create custom snippet for PHP-Language in atom?

example:

if i write class then it shows my custom snippet.

Upvotes: 2

Views: 4132

Answers (1)

Hum4n01d
Hum4n01d

Reputation: 1370

Make a snippet in your snippets file!

First, open your snippets file. I use cmd-shift-p to search all actions and then type snippets and then select Application: Open Your Snippets to open the snippets file. Then you can use the snip snippet to create a new snippet! For example:

'.text.html.php':
  'Class':
    'prefix': 'class'
    'body': 'Your template'

Atom uses the cson format for the snippets and other editor files. (CSON is CoffeeScript JSON)

Upvotes: 9

Related Questions