mattn / emmet-vim

emmet for vim: http://emmet.io/
http://mattn.github.io/emmet-vim
MIT License
6.42k stars 411 forks source link

Config for new line per tag #378

Open BlackCatXJ opened 7 years ago

BlackCatXJ commented 7 years ago

This issue has been risen before, which has the serial number #362, and it has been solved. But I find that that doesn't work for me and I'm really confused about that. I use Vundle to manage my vim plugins and I just install the plugin without any configuration like that

Plugin 'mattn/emmet-vim'

when I try to expand the line below:

div>form[method=post]>label>div{Title}+input[type=text][name=title]

It comes out like that, some tags start in a new line while others not:

what I want is to make each tag start in a new line like that:

So I'm wondering that if there are still some bugs uncovered. Or what can I do to make this works? A lot thanks.

noscript commented 7 years ago

I have a similar problem. Let's say I have a list:

1. First
2. Second
3. Third

Then I do visual select (line wise) and emmet-wrap-with-abbreviation with li* and the result is:

<li>1. First</li>
<li>2. Second</li>
<li>3. Third</li>

But instead I would like to see each wrapping tag on a separate line:

<li>
  1. First
</li>
<li>
  2. Second
</li>
<li>
  3. Third
</li>

The funny thing is that I get the wanted behavior when I do emmet-wrap-with-abbreviation on each line separately.

mattn commented 7 years ago

set configration like below.

\  'html': {
\      'block_all_childless' : 1,
\  },
fredrivett commented 4 years ago

For clarity for those new to emmet, this is how to set the config as above in your .vimrc:

let g:user_emmet_settings = {
\  'html' : {
\    'block_all_childless' : 1,
\  },
\}
faruzzy commented 2 years ago

@mattn Thanks for replying but the solution you provided above is not working for me. Could you possibly look into this and provide a better solution please?