Merge remote-tracking branch 'JJK96/xml'

This commit is contained in:
Maxime Coste 2019-11-07 20:16:58 +11:00
commit d5f2744e59
5 changed files with 13 additions and 2 deletions

View File

@ -80,8 +80,8 @@ define-command -hidden html-indent-on-new-line %{
try %{ execute-keys -draft <semicolon> K <a-&> }
# filter previous line
try %{ execute-keys -draft k : html-trim-indent <ret> }
# indent after lines ending with opening tag
try %{ execute-keys -draft k <a-x> <a-k> <lt>(?!area)(?!base)(?!br)(?!col)(?!command)(?!embed)(?!hr)(?!img)(?!input)(?!keygen)(?!link)(?!menuitem)(?!meta)(?!param)(?!source)(?!track)(?!wbr)(?!/)(?!>)[a-zA-Z0-9_-]+[^>]*?>$ <ret> j <a-gt> } }
# indent after lines ending with opening tag except when it starts with a closing tag
try %{ execute-keys -draft k <a-x> <a-k> <lt>(?!area)(?!base)(?!br)(?!col)(?!command)(?!embed)(?!hr)(?!img)(?!input)(?!keygen)(?!link)(?!menuitem)(?!meta)(?!param)(?!source)(?!track)(?!wbr)(?!/)(?!>)[a-zA-Z0-9_-]+[^>]*?>$ <ret>j<a-x><a-K>^\s*<lt>/<ret><a-gt> } }
}
]

View File

@ -0,0 +1 @@
i<ret><esc>

View File

@ -0,0 +1,3 @@
<div>
<div>%( )</div>
</div>

View File

@ -0,0 +1,4 @@
<div>
<div>
</div>
</div>

View File

@ -0,0 +1,3 @@
source "%val{runtime}/colors/default.kak"
source "%val{runtime}/rc/filetype/html.kak"
set buffer filetype html