mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-24 20:13:00 +03:00
Merge remote-tracking branch 'JJK96/xml'
This commit is contained in:
commit
d5f2744e59
@ -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> } }
|
||||
}
|
||||
|
||||
]
|
||||
|
1
test/indent/html/indent-on-new-line/cmd
Normal file
1
test/indent/html/indent-on-new-line/cmd
Normal file
@ -0,0 +1 @@
|
||||
i<ret><esc>
|
3
test/indent/html/indent-on-new-line/in
Normal file
3
test/indent/html/indent-on-new-line/in
Normal file
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<div>%( )</div>
|
||||
</div>
|
4
test/indent/html/indent-on-new-line/out
Normal file
4
test/indent/html/indent-on-new-line/out
Normal file
@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
3
test/indent/html/indent-on-new-line/rc
Normal file
3
test/indent/html/indent-on-new-line/rc
Normal file
@ -0,0 +1,3 @@
|
||||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/html.kak"
|
||||
set buffer filetype html
|
Loading…
Reference in New Issue
Block a user