You need to install the emmet
package in Sublime Text. In order to install packages you need to install Package Control .
Open the Sublime Text console (View -> Show Console) and paste the following:
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Hit enter and wait for it to install. Once done, restart Sublime Text. To install packages, open the command palette (Tools -> Command Palette ... or use the shortcut ctrl + shift + p). Write install
, select the first option, and then write the package you want to install, in this case emmet
:
Once installed, you will have the autocompletion you want to obtain. But now, by default, the emmet autocomplete is configured to work with the%% shortcut%. If you want to change it by ctrl+e
you just need to add this in your personal shortcuts (Preferences -> Keybindings - User):
[
{
"keys": [
"tab"
],
"args": {
"action": "expand_abbreviation"
},
"command": "run_emmet_action",
"context": [
{
"key": "emmet_action_enabled.expand_abbreviation"
}
]
},
]
Restart Sublime Text one more time, and you have already configured the autocomplete of tab
in the% key% of Sublime Text.
Greetings.