emmetio / emmet-atom

Emmet support for Atom
MIT License
764 stars 181 forks source link

Return key is extremely slow in large files #440

Open clessg opened 8 years ago

clessg commented 8 years ago

Given a 4,000-line file (sorry), in this case PHP (even more sorry), the return key causes long hanging. It seems to be caused by:

'atom-pane atom-text-editor[data-grammar~="html"]:not([mini]):not(.autocomplete-active), atom-pane atom-text-editor[data-grammar~="xml"]:not([mini]):not(.autocomplete-active)':
  'enter': 'emmet:insert-formatted-line-break-only'

Unsetting the binding resolves the issue for me.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

levymetal commented 8 years ago

+1. I've been having this issue since I started using Atom a couple weeks ago. Assumed Atom was the cause, but you're right, it's emmet.

Can you let us know how you unset the keybinding? I tried copying that keybinding to keymap.cson, but a blank string still causes it to hang, and unset! prevents the enter key from working at all. Quite a bit of Googling and Atom keybindings seem far from trivial.

clessg commented 8 years ago

My bad. I fixed it by changing it to:

'enter': 'editor:newline'

You might need to restart Atom for it to work.

levymetal commented 8 years ago

Ah, nice. I feel like I tried everything except that. Cheers mate!

almadsen commented 8 years ago

+1, and can't make the enter editor:newline work either.

sanarena commented 6 years ago

I was almost changed to vscode due to this issue and returned back looking for a solution. Atom must scan file size and if somebody open a large file, ask them if they want to keep emmet keymap or not.