f / atom-bootstrap3

Twitter Bootstrap 3 Snippets for Atom
MIT License
80 stars 34 forks source link

ENTER inserts new line instead of selecting autocomplete suggestion in a tags #22

Open maxigaz opened 9 years ago

maxigaz commented 9 years ago

Let's say for example that I'm in an HTML file and I want to specify classes of an a tag, so the cursor is between the quotation marks:

<a class=""></a>

Now, the problem is that when I start typing the name of a Bootstrap class, like btn, the autosuggestion menu comes up and then hit ENTER, a new line is inserted rather than the class name is autocompleted.

I don't have this problem with div tags at all though.

nirmalrodrigo commented 9 years ago

If you have emmet installed, goto Emmet settings and turn off, "Format Line Breaks".

maxigaz commented 9 years ago

That solved it. Thank you!

I wonder what that setting does.

maxigaz commented 9 years ago

Well, I've just found out what it does: when it's on, it inserts a new extra line and a tab when the cursor is between an opening and closing html tag with nothing between the two, which I find very useful.

Unfortunately, if I disable it, it will make things too complicated for me, so this is not the ultimate solution for me right now.