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

Can't accept code hints with Enter or Tab if using Emmet plugin #12222

Open
core-ai-bot opened this issue Aug 31, 2021 · 12 comments
Open

Can't accept code hints with Enter or Tab if using Emmet plugin #12222

core-ai-bot opened this issue Aug 31, 2021 · 12 comments

Comments

@core-ai-bot
Copy link
Member

Issue by ujjaval
Sunday Dec 30, 2012 at 07:24 GMT
Originally opened as adobe/brackets#2455


Started using Emmet plugin in Brackets (Sprint 18) and noticed that intellisense gets affected by the plugin.

As I type <sc for <script>, options show below for matching tags. But when I selected one by the down arrow key and pressed Enter,
instead of completing <sc, it inserted new line in the code, without completing <script. Happened with other tags too.

Auto completion using Tab key also doesn't work, as Emmet plugin inserts tag for incomplete word. That is, type <sc and press tab key, instead of inserting <script, it inserts <<sc></sc> due to Emmet plugin.

Removed the Emmet plugin and tags started to auto complete again using Enter/Tab.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Monday Jan 07, 2013 at 20:03 GMT


This is a related case of issue reported in #2353.

The preferred fix would be for CodeHintManager to get the key event before the Editor. Otherwise, I think we'd need an API call that Commands could use to determine if Code Hints are displayed (or more generically, if they can execute command).

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Friday Jan 11, 2013 at 05:41 GMT


@redmunds - with the fix for #2353 should we nominate this for sprint 19?

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Friday Jan 11, 2013 at 16:11 GMT


I don't think this is important for sprint 19. It needs some research.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Saturday Jan 19, 2013 at 01:44 GMT


@redmunds: It seems like CodeHintManager would have to get the key not just before the Editor, but before KeyBindingManager too (otherwise it'll still get fed to the command Emmett registered, and then swallowed). That's way trickier since KBM's listener gets called so early (capture on document, I think).

@core-ai-bot
Copy link
Member Author

Comment by ahmetus
Tuesday Jan 22, 2013 at 13:39 GMT


@sergeche has a strong suggestion about issue: emmetio/emmet#146 (comment)

@core-ai-bot
Copy link
Member Author

Comment by ahmetus
Tuesday Jan 22, 2013 at 13:50 GMT


I installed Bracket Sprint 19, issue still there.

@core-ai-bot
Copy link
Member Author

Comment by sergeche
Tuesday Jan 22, 2013 at 15:15 GMT


OK, I made a few updated for Brackets plugin:

  1. Since GitHub disabled uploads, the Brackets plugin now lives here: https://github.com/emmetio/brackets-emmet
  2. The plugin code base is more “requirejsy”: the Emmet core is separated from plugin controller and editor proxy so it’s easier to test, contribute and update plugin.
  3. I made sure that action handler returns deferred object in all cases (“Find” dialog should work fine)
  4. Added hack for formatted line break insertion: if it detects opened code hint dialog it won’t work (code suggestions should work fine).

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Jan 22, 2013 at 18:16 GMT


@sergeche Thanks for workaround and the suggestion about contexts for keybindings. We'll take a look at that.

@core-ai-bot
Copy link
Member Author

Comment by ahmetus
Wednesday Jan 23, 2013 at 07:42 GMT


@sergeche I forked your work and tested. It works by all means, even with tab key and did not break intellisense or finding replacing. Issue solved. Thank you for your great effort and all interest.

@core-ai-bot
Copy link
Member Author

Comment by WebsiteDeveloper
Tuesday Mar 05, 2013 at 17:49 GMT


@ujjaval is this fixed?

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Jun 06, 2013 at 00:21 GMT


It looks like #4110 might make it so@sergeche can remove the hack in the Emmet plugin--that change basically makes it so we're doing what@peterflynn suggests above (getting the key event before the default key binding handling).@sergeche, if you feel like checking out that pull request and seeing if it makes it you can remove the hack, that's great, otherwise you can wait until we've merged it to try that out.

@core-ai-bot
Copy link
Member Author

Comment by sirme87
Wednesday Nov 18, 2015 at 15:30 GMT


Using Release 1.5 build 1.5.0-16538 and latest Emmet 1.2.2 and this issue is still existing. Any ideas for the workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant