Last active
October 7, 2021 09:41
-
-
Save martpie/532134a7390eea142792 to your computer and use it in GitHub Desktop.
Get emmet-atom working fine with Atom and autocomplete-plus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Will make autocomplete trigger with 'enter' instead of 'tab' | |
'atom-text-editor:not(mini) .autocomplete-plus.autocomplete-suggestion-list': | |
'tab': 'unset!' | |
'enter': 'autocomplete-plus:confirm' | |
# Use 'expand-abbreviation' instead of 'expand-abbreviation-with-tab' for tab keybinding | |
'.pane .editor:not(.mini)': | |
'tab': 'emmet:expand-abbreviation' |
So, I tried this and it actually disables the tab key altogether unless there's an abbreviation to be had...
It works great! Thank you for this solution.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to use Tab with Autocomplete and Emmet, this is what I do.
Install autocomplete-plus and autocomplete-snippets (and whatever other autocomplete-plus provider packages you want):
Next, edit your keymap.cson file (File > Open Your Keymap) and paste this at the bottom:
This allows you to still use Tab with Emmet, but only when the autocomplete popup is not open.
The reason you need to install autocomplete-snippets is because Emmet takes precedence over snippets, but if you have an autocomplete popup open and this keymapping in place, then the snippet will take precedence.
The best of both worlds.