Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 + Emmet - not expanding correctly

I have installed emmet for Sublime Text 2... And it works - kind a strange way When I enter d it starts showing possibilities, but as soon as I press: : emmet shows completely different tip:

b (bottom)

So I need to press esc to close fuzzysearch box and press tab to allow Emmet do what it is used to do.

Dow, if I don't press esc before the tab key the resould is: d:bottom:, is I press esc, it desoults in correct: display:block.

Do you have an idea how can i fix that?

like image 815
Marcin Bobowski Avatar asked Mar 20 '14 14:03

Marcin Bobowski


Video Answer


2 Answers

This happens because Emmet tries to respect default ST completions and due to lack of API support to properly handle built-in snippets: https://github.com/sergeche/emmet-sublime#tab-key-handler

By default, Emmet will not expand abbreviations by Tab if there’s autocomplete popup visible to allow users to work with default ST completions and snippets. You can override this behavior:

  1. Go to Preferences > Settings — User
  2. Add "disable_tab_abbreviations_on_auto_complete": false option. Make sure this file contains valid JSON.

After that everything should work fine, but you’ll no longer able to complete items from autocomplete popup with Tab key, use Enter key instead.

like image 155
Sergey Chikuyonok Avatar answered Sep 23 '22 06:09

Sergey Chikuyonok


I had a similar issue but my fix was different to that of the accepted answer.

I had to go to Preferences > Settings — User and remove "emmet" from the ignored packages and everything started working again!

like image 21
Wander Avatar answered Sep 22 '22 06:09

Wander