Categories
Tools & Generators

Making Emmet Work in PHP

If you’re in a PHP file, the Emmet shortcuts don’t initially work.

To make them work, however, we just need to edit an Atom configuration file.

  • Open the command palette: command-shift-p.
  • Type in the following to search for the file: keymap.cson
  • Press Return when that result shows up.
  • After the commented out section, paste the following:
'atom-text-editor[data-grammar="text html php"]':
    'tab': 'emmet:expand-abbreviation-with-tab'

In a PHP file, test an Emmet shortcut. If it doesn’t work, restart Atom and try again.