Norfeldt
Norfeldt

Reputation: 9658

Atom-editor customize autocompletes/suggestions

How can I change the autocomplete in Atom so input becomes

<input type="text" placeholder="{cursor here}">

instead of the default

<input type="{'button'|cursor here}" name="name" value="">

Upvotes: 1

Views: 177

Answers (1)

Richard Slater
Richard Slater

Reputation: 6378

Autocomplete as you describe it is called a snippet in GitHub Atom's terminology. You can change these by overriding the input snippet provided by the language-html package that ships with Atom.

User defined Snippets are stored in your Atom profile which you can access by going to File -> Snippets..., this will open the file in the editor you can then paste the following at end of the file

'.text.html':
  'Input':
    'prefix': 'input'
    'body': '<input type="text" name="${1:name}">$0'

Make sure you save the file before testing our your updated snippet in a document that has HTML Selected as it's language.

Upvotes: 1

Related Questions