Closed RyanDwyer closed 7 years ago
I discovered this is caused by something else in my config. I had an inoremap </
which effectively runs <C-X><C-O>
to autocomplete the tag. This meant the >
key is never pressed, which is what the Blade indent file uses to trigger the indent. So it wouldn't trigger the reindent until I hit Enter afterwards, and removing the *<Return>
from indentkeys stopped this from working.
FWIW, I think that with the changes from #60, *<Return>
can be added back again.
Steps to reproduce:
Open a new file with a .blade.php filename.
Enter insert mode and type the following:
Upon pressing the first
<CR>
, line 2 (which is empty apart from the cursor) will be indented. This makes sense so far.Upon pressing the second
<CR>
, line 2 (now containing an indent +</div>
) remains indented. It should be outdented.Bisected to the following commit:
Specifically, adding
*<Return>
back to the indentkeys line fixes it for me.@adriaanzon Thoughts?