How to prevent/change 'class_selector' auto-complete in Ruby Haml?

I feel like such a noob asking this… I’ve been using Atom for 2 years now and I love it, except when I’m trying to simply write code in any file using Ruby Haml grammar.

Every time I reach the end of a sentence, if I type a period and then press Enter I get this annoying auto-complete:


Unfortunately I can’t ‘power through’ it by continuing to type because even though the ‘class_selector’ text is replaced, my cursor doesn’t advance to the next line.

I like the behavior if I’m actually trying to enter a class name, but it would be great if the ‘suggestions’ didn’t start appearing until I’ve typed a period followed immediately by something other than Space or Enter

If anyone has any suggestions I’d be forever grateful!

Thank you

Please open the Keybinding Resolver with ctrl-. and take a screenshot of what appears when you trigger the snippet.

Haha easier said than done! Key presses to take the screenshot disrupt the resolver :slight_smile: However, I took a video of the screen and then took the following screenshot from the video:

The “class_selector” text actually appears when I push “.”, but the resolver doesn’t seem to ‘notice’ it - only when I push Enter does the bad effect happen.

Thank you!

Only if the Atom screen is in focus. You can click on your desktop to lose focus without moving another window in front of Atom. If you’re on Windows, I highly recommend using the open-source ShareX to take screenshots; it also provides a taskbar icon which you can right-click to access an extensive menu of actions without pressing any keyboard buttons.

The easiest solution is to tweak the settings for the autocomplete-plus package (Settings -> Packages -> autocomplete-plus). I like the fourth option, which means that enter only works when you have interacted with the popup.

1 Like

Perfect! You solved my problem :smile:

Thank you SO MUCH - you changed my life!

No problem. :slight_smile: