jiangmiao / auto-pairs

Vim plugin, insert or delete brackets, parens, quotes in pair
http://www.vim.org/scripts/script.php?script_id=3599
4.09k stars 373 forks source link

Insert new indented line after return, for html? #293

Open jesseleite opened 4 years ago

jesseleite commented 4 years ago

So this functionality is mentioned in the readme...

Insert new indented line after Return

something: {|} (press <CR> at |)

something: {
    |
}

Unfortunately this doesn't work for HTML tags. Ideally I'd like this...

<div class="something">|</div> (press <CR> at |)

<div class="something">
    |
</div>

Instead, I get...

<div class="something">
|</div>

Anyone have a solution to this auto-indent-after-return solution that would work for html?

zexi commented 3 years ago
autocmd FileType html let b:AutoPairs = AutoPairsDefine({'>' : '<'}, [])