Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Jan-Jaap Korpershoek edited this pageNov 12, 2020 ·7 revisions

Auto closing tags upon entering '</'

Based onhttps://github.com/JJK96/kakoune-config/blob/master/autoload/html.kak

define-command -hidden html-auto-close-tag %{    evaluate-commands -draft -itersel -save-regs '"^' %{        try %{            # Check if last entered characters are "</"            execute-keys -draft hH<a-k><lt><ret>            # Get tag            execute-keys -save-regs '' Z[            execute-keys -with-maps t            execute-keys -save-regs '' ey            # Paste tag            execute-keys -save-regs '' zh<a-p>            # Close tag            execute-keys -with-hooks a<gt>        }    }}hook global WinSetOption filetype=(xml|html|php) %{    # Credits to mawww for this mapping    map -docstring "xml tag object" global object t %{c<lt>([\w.]+)\b[^>]*?(?<lt>!/)>,<lt>/([\w.]+)\b[^>]*?(?<lt>!/)><ret>}    hook window InsertChar '/' html-auto-close-tag}
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp