Indent problem


#1

Hi

I’m new on Atom, I love it but I have a problem with the indent.

Here a video with the issue, I expend with Emmet, but with or without the problem is here.

https://www.dropbox.com/playlist/sharing/indent.mp4?_subject_uid=19348716

I have trash my Atom folder with all settings, plug-in and all of Atom settings, but the issue is already here.

Have you an idea ?

Thanks


#2

That video is not playing for me.


#3

This is a Dropbox link


#4

I think the problem is Emmet. When I expand, Emmet not indent code.

When I write full code like <div class="container" and close the > it’s ok, Atom indent and write the </div>
I don’t know why I doesn’t work with a clean Atom.

Is it possible to indent and close tag with Emmet ?


#5

I’m going to post on Emmet GitHub project page


#6

Yeah, this is mostly an Emmet issue. I think the best solution would be for the Emmet snippet expander function to listen for an enter immediately after expanding (when the cursor is between > and <) and, if so, to create two newlines and place the cursor at the end of the first one.


#7

There no solution actualy ?


#8

Oh, you could always hack something into your init.coffee that turns enter into a double newline with the cursor at the end of the first one. Or you could write a snippet like

'.text.html':
  'Open tag and indent':
    prefix: 'nn'
    body: """

    \t$1

    """

#9

Ho thanks, but if it’s possible I would like an automatic solution, and I don’t write an hack like this


#10

I told you what the automatic solution would be and you weren’t happy with that.


#11

I’m not happy because I can’t do that :frowning:

But thanks for your support :thumbsup: