Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everything just stop working #50

Closed
vellkan opened this issue Aug 23, 2020 · 41 comments
Closed

Everything just stop working #50

vellkan opened this issue Aug 23, 2020 · 41 comments

Comments

@vellkan
Copy link

vellkan commented Aug 23, 2020

Today I get update and everything just stop worked :/

  1. TAB key didn't work as always, I read about that and change this to Ctrl+E, but it's gonna change all my workflow
  2. When I write header.header it's print - why?
  3. When I write in CSS file m:0-a-64 I get margin: 0 auto -64px; Why -64px, not only 64px?
  4. When I get color shortcut in CSS I can edit all value, with # - why? Before update I was edit only hex value, after # sign.
  5. I lost all my snippets shortcuts for CSS
  6. Plugin for generate lipsum text stops working

For now I need uninstall everything and try to re-configure everything again.

I now You've done great job, but for me - it ruined my day and all my workflow. Seriously, I just want to back to earlier version...

@sergeche
Copy link
Member

sergeche commented Aug 23, 2020

  1. Yes, Tab now works better with native ST snippets. Can you describe use cases where it doesn’t work as expected?
  2. Please be more specific: what you type and what you get in which syntax?
  3. in a-64, a is a keyword, followed by a number, so number is extracted as value. The - symbol is used as delimiter after number values (e.g. p10-20padding: 10px 20px) and/or as negative sign. So, in your case correct syntax is m0-a64
  4. Lots of people (including me) found that it’s inconvenient to edit value that way. Also, Emmet provides additional syntax for color values so you write something like #f.4 to get rgba(255, 255, 255, 0.4). Anyways, you can always update Emmet snippets and for desired behaviour, e.g. "c": "color: #{1:000}"
  5. I’ve changed config format for snippets, check out Preferences > Package Settings > Emmet > Settings menu item, config key example. I’ll add docs about configuring Emmet a bit later. In you case, to add custom snippets for CSS, config should look like this:
{
  "config": {
    "stylesheet": {
      "snippets": {
        // Your custom snippets here
        "foo": "foo-bar"
      }
    }
  }
}
  1. Fixed in v2.1.1 version, a single lorem should work now

@sergeche
Copy link
Member

Added README with custom snippets examples: https://github.com/emmetio/sublime-text-plugin#adding-custom-emmet-snippets

@vellkan
Copy link
Author

vellkan commented Aug 23, 2020

  1. I've tried to fixed this, but few things doesn't work as expected.
    Emmet shortcuts work, but when I write php and hit tab - nothing happen.

  2. When I write header.header it's print: <header id="header" class="header"></header>

  3. OK, now it's working but it isn't easy.

  4. I found that but I added few own snippets and they don't work.

I found few others changes or bugs, but I left this behind me - it is just too much to change workflow all this years...

@vellkan
Copy link
Author

vellkan commented Aug 23, 2020

Last thing - in CSS/SASS files abbrevation works only after I hit SPACE.
When I write:
.header {} and write db (for display: block) inside bracket - it won't work.
When I write:
.header { } and write db (for display: block) inside bracket and hit SPACE after first bracket - now it work.

@Mandras
Copy link

Mandras commented Aug 23, 2020

Same here, everything stop working since last update
On Windows 10, with ST 3.2.2, with default emmet configuration

@Mandras
Copy link

Mandras commented Aug 23, 2020

ok i just understood that you had to use the TAB key

@sergeche
Copy link
Member

Emmet shortcuts work, but when I write php and hit tab - nothing happen.

Just tried with PHP syntax: wrote php then hit Tab and got <?php ?>

When I write header.header it's print:

Works fine for me. Maybe you created custom snippet for header?

I found that but I added few own snippets and they don't work.

Can you show me your Emmet.sublime-settings file?

.header {} and write db (for display: block) inside bracket - it won't work.

Fixed in v2.1.2

@mrcsmcln
Copy link

I'm noticing that Emmet is now super overzealous about tab completion. php + Tab turns to <php></php> every time.

@sergeche
Copy link
Member

@mrcsmcln please check your keybindings, did you changed Tab key handler for emmet_expand_abbreviation action for previous Emmet version? If so, please remove it

@mrcsmcln
Copy link

After uninstalling and reinstalling, Emmet works great. Not sure why that needed to happen, as I didn't modify any other settings.

@sergeche
Copy link
Member

Maybe old version wasn’t correctly unloaded. Anyway, new version should work better with native snippets

@cheestudio
Copy link

@sergeche I concur, so many things stopped working since this update, mostly all the key bindings. I don't have ANY custom key bindings, they are all default. The biggest ones I use nearly on the hour no longer work:

  1. Wrap with Abbreviations (CTRL + SHIFT + G)
  2. Jump to Matching Tag (CTRL + ,)

Do I need to define these myself now? Or what else can I check?

@sergeche
Copy link
Member

@cheestudio Yes, you have to specify your own shortcuts: https://github.com/emmetio/sublime-text-plugin#more-actions

@cheestudio
Copy link

Sigh. OK. Do you happen to have a default set of those defined that I can copy/paste of the ones you removed? Kind of frustrating to have to map those myself when they've been defined all along...

@sergeche
Copy link
Member

@cheestudio Lots of people were complaining that Emmet redefined default ST actions or actions from another extension. I'll add sample file with shortcuts later

@cheestudio
Copy link

Totally, I see why you made the change. Painful in the meantime, but a good change in the long run. But a sample file would be absolutely awesome!

@rchl
Copy link
Contributor

rchl commented Aug 24, 2020

The example key bindings could just be included in the default included key bindings configuration, just commented out. That would make it easy to just copy them to user keybindings and uncomment.

@vellkan
Copy link
Author

vellkan commented Aug 24, 2020

@cheestudio Lots of people were complaining that Emmet redefined default ST actions or actions from another extension. I'll add sample file with shortcuts later

Yeah, that's true and Your work is amazing. But after this years and stable configuration it's really hard to change habits in one second.

@sergeche
Copy link
Member

@vellkan it’s not about changing habits, it‘s about spending a few minutes to tweak package for your needs

@sergeche
Copy link
Member

Check out v2.1.3, there’s new menu item Preferences > Package Settings > Emmet > Key Bindings with shortcuts from previous version, which you can copy and uncomment

@craigerskine
Copy link

it’s not about changing habits, it‘s about spending a few minutes to tweak package for your needs

I think it is about changing habits, because TAB no longer works as it did before. I now have to really pay attention to what syntax mode I'm in and use a combination of TAB, CTRL + ., and CTRL + E where I could just use TAB in the previous release.

I added back all the previous key binding snippets but TAB still does not work in .xsl files. I used to be able to type:
xsl:if + TAB and it would auto complete... now TAB does not work with Emmet in .xsl files. I have to use CTRL + . or CTRL + E. I changed the default CTRL + E to just TAB and I can partially get it to work like before, but then I can't tab to (un)indent, where I could in the previous release.

So, yes, I do have to change my coding habits. Or is there a way to install the previous version and prevent it from being autoupdated?

@sergeche
Copy link
Member

I added back all the previous key binding snippets but TAB still does not work in .xsl files.

It was a bug, fixed it in v2.1.8.

You can mimic Tab key behaviour from previous version with the following keybinding:

{
    "keys": ["tab"],
    "command": "emmet_expand_abbreviation",
    "args": { "tab": true },
    "context": [
        { "key": "emmet_capture_abbreviation" },
        { "key": "selection_empty" },
        { "key": "has_next_field", "operand": false },
        { "key": "auto_complete_visible", "operand": false },
        { "key": "selector", "operand": "source.css, source.sass, source.less, source.scss, source.stylus, source.postcss, source.jade, text.jade, source.pug, text.pug, text.slim, text.xml, text.html - source, text.haml, text.scala.html, source string" }
    ]
}

But it’s not recommended, please report bugs you struggle with

@vellkan
Copy link
Author

vellkan commented Aug 27, 2020

I appreciate Your work and last updates, but I can't back to previous workflow.
New features are really cool, but I lost many snippets, especially in CSS/SCSS, own snippets didn't work.

I've even try to install ST and plugins from the beginning, but it didn't help.

@sergeche
Copy link
Member

@vellkan Emmet config format has been changed, everything is available in README. If you have issues with snippets, you can send me your old config and I will help you

@vellkan
Copy link
Author

vellkan commented Aug 27, 2020

@vellkan Emmet config format has been changed, everything is available in README. If you have issues with snippets, you can send me your old config and I will help you

I know, I've read them. Some of snippets works, some of them - don't work. And everyday I found more things which works differently.

Now I'm testing Visual Studio Code, I'm considering to switch to another app.

@sergeche
Copy link
Member

@vellkan

I found more things which works differently.

Please report things that doesn't work as expected

@craigerskine
Copy link

Something I've noticed over the past couple days:
If I open a blank document, change the syntax mode to HTML, none of my custom HTML snippets work anymore. For example, I have a TailwindCSS/Vue starter snippet tw-html + tab, when I type that it outputs <tw-html></tw-html>

Here's the Snippet

@sergeche
Copy link
Member

@craigerskine native snippets should not be affected. Maybe you have custom Tab key binding that expands Emmet abbreviation?

@craigerskine
Copy link

@sergeche Here's my key bindings. Is there something wrong with this?

@sergeche
Copy link
Member

@craigerskine Oh, got it: Emmet detected that tw-html looks like Web Component name so it expands it. There are several options:

  1. Remove dash from your snippet (e.g. twhtml)
  2. After typing tw-html press Esc to clear Emmet abbreviation then Tab to expand native snippet
  3. I can add option to disable CamelCased and kebab-case words for abbreviation capturing

@craigerskine
Copy link

@sergeche AWESOME! Thanks for your help.

@vellkan
Copy link
Author

vellkan commented Aug 27, 2020

  1. Many snippets stops working.
    For example:
    bdn was: border: none;
    ti- was text-indent: -9999px;
    bg+ was background: url() left top no-repeat;

It's just a few of them. I remove all my CSS/SCSS plugins with snippets, reload them, nothing helps.

  1. tag-preview: true doesn't work, I can't get this preview even on clean install only with Emmet

  2. When I'm typing something long, for example:
    .header>.row>ul.main>li*4>lorem app does not recognise lorem and disable TAB action. I need to write partial code, I can't just hit TAB without underline text, because that did't call Emmet action.

  3. When I'm typing : I get :;

@kirkegaard
Copy link

kirkegaard commented Aug 28, 2020

Im seeing the same issues as above. Im using emmet 2.1.14 with JavaScript (Babel). I can get the expansion to work with a < prefix but my ctrl+e doesnt work anymore. I havent added anything in my configuration. Im using the plugin with standard configuration.

This is my simple test case

const foo = () => {
  return (
    div.foo>div.bar>h1{THIS DOESNT WORK}
  );
};
const foo = () => {
  return (
    <div.foo>div.bar>h1{THIS WORKS}
  );
};

@sergeche
Copy link
Member

@kirkegaard you should add key binding manually, see https://github.com/emmetio/sublime-text-plugin#more-actions
Ctrl-e overrides default Go to End of Line action

@sergeche
Copy link
Member

sergeche commented Aug 30, 2020

@vellkan

Many snippets stops working.
For example:
bdn was: border: none;

Works for me, please check again with latest version

ti- was text-indent: -9999px;
bg+ was background: url() left top no-repeat;

All snippets with operators like - or + are prohibited now: it’s very hard to parse them properly (e.g. ensure that + should be a part of the snippet, not a chaining operator). There’s no sane reason to use them in snippets, they can be easily replaced with other characters

It's just a few of them. I remove all my CSS/SCSS plugins with snippets, reload them, nothing helps.

Please provide more examples of snippets that doesn’t work

tag-preview: true doesn't work, I can't get this preview even on clean install only with Emmet

Should work with HTML syntaxes. If it still doesn’t please restart ST, open ST console and send me it’s contents

When I'm typing something long, for example:
.header>.row>ul.main>li*4>lorem app does not recognise lorem and disable TAB action. I need to write partial code, I can't > just hit TAB without underline text, because that did't call Emmet action.

Works for me:
image

Please ensure you have the most recent Emmet version

When I'm typing : I get :;

It’s a default ST behaviour

@guimadaleno
Copy link

Hi @sergeche.
Thank you for your effort on this amazing project and as well as your patience with the community.

I've been having some issues with the latest 2.1.16 as well.
I'm still unsure if it's something with my ST3 settings or a possible Emmet bug.
So I just wanted to show, in practice, what's going on with my ST3.

Emmet bug

If that's a possible bug, hope this could help.

SublimeText 3.2.2 Build 3211
Emmet 2.1.16 with empty settings
Packages I'm using: Emmet, Hasher, Material Theme, Open Folder, Package Control, PyV8, Sublime Git

@sergeche
Copy link
Member

@guimadaleno thanks for the report, looks like a bug. Could you create a separate issue so we can discuss it there?

@gladisihor
Copy link

gladisihor commented Aug 31, 2020

Hi @sergeche !
Please help me to deal with my CSS/HTML snippets.

Before Emmet update:

  • "bd1" => "border:1px solid #|;";
  • "c1" => "color:Ctrl + E Binding Gone? #111;";
  • "cf" => "color:#fff;";
  • "lh20" => "line-height:20px;";
  • "after" => "display:block;\ncontent:"";\nclear:both;"

After Emmet update:

  • "bd1" => "border: 1px;";
  • "c1" => "color: 1px;";
  • "cf" => NOTHING;
  • "lh20" => "line-height: 20;";
  • "after" => NOTHING

... and a lot of such examples I've got. Also I can't find how to manage css.valueSeparator option. Previously it was "css.valueSeparator": ":" (without spaces after ":"), but now it doesn't work as well. Another question is how to create HTML snippet with caret position after abbreviation expanding? Sequence of caret position or highlight some code after expanding? For example:
"js": "<script src=\"js/${1:main.js}\">${2}</script>${3}"

My old snippets and preferences:
emmet-st3.zip

Thank you in advance :)

@vellkan
Copy link
Author

vellkan commented Aug 31, 2020

@sergeche Thanks for respond - now I understand why some behaviors didn't work like I expect.
I will find new snippets to fill that way.

But I've got same problem like @guimadaleno on his gif. I've try to describe this before, but visualisation is better :)

@vfonic
Copy link

vfonic commented Sep 2, 2020

I'm probably also in this camp. Ever since Emmet upgraded automatically, so many things broke in my ST3.

I'm using TabNine AI-based code completion: https://www.tabnine.com/

Now it's not working well anymore. Emmet and TabNine are fighting for priority and I never know which one will complete when I press . Many other keyboard shortcuts are also broken and I'm not sure if this is related or not.

Is there any way to revert, at least temporarily, to the previous verison?

Thanks!

@sergeche
Copy link
Member

sergeche commented Sep 2, 2020

@vfonic by default, Emmet now expands captured abbreviations only (they are underlined): https://github.com/emmetio/sublime-text-plugin#expanding-abbreviation
You can clear abbreviation with Esc key so Tab will be handled by other plugin.

And please, create new issue with detailed description where it’s not working anymore

@emmetio emmetio locked as too heated and limited conversation to collaborators Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests