diff options
| author | Frank LENORMAND <lenormf@gmail.com> | 2019-10-22 11:02:06 +0200 |
|---|---|---|
| committer | Frank LENORMAND <lenormf@gmail.com> | 2019-10-22 11:02:06 +0200 |
| commit | 21614cb06ea4f7a7349c628e5b8a754f730b2f0d (patch) | |
| tree | a5a65ba0f4489808cf312a2db9e0d5699874ff40 /rc/filetype/lua.kak | |
| parent | 3c34de7fe7db607fe2c0519471b8d3c4935ce717 (diff) | |
src: Create a <semicolon> named key
This commit allows using the <semicolon> expansion in commands, instead
of `\;`.
It makes commands look more elegant, and prevents new-comers from
falling into the trap of using <a-;> without escaping the semicolon.
Diffstat (limited to 'rc/filetype/lua.kak')
| -rw-r--r-- | rc/filetype/lua.kak | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/filetype/lua.kak b/rc/filetype/lua.kak index 64a5a5a2..7e9c0657 100644 --- a/rc/filetype/lua.kak +++ b/rc/filetype/lua.kak @@ -78,8 +78,8 @@ define-command lua-alternative-file -docstring 'Jump to the alternate file (impl define-command -hidden lua-indent-on-char %{ evaluate-commands -no-hooks -draft -itersel %{ # align middle and end structures to start and indent when necessary, elseif is already covered by else - try %{ execute-keys -draft <a-x><a-k>^\h*(else)$<ret><a-\;><a-?>^\h*(if)<ret>s\A|\z<ret>)<a-&> } - try %{ execute-keys -draft <a-x><a-k>^\h*(end)$<ret><a-\;><a-?>^\h*(for|function|if|while)<ret>s\A|\z<ret>)<a-&> } + try %{ execute-keys -draft <a-x><a-k>^\h*(else)$<ret><a-semicolon><a-?>^\h*(if)<ret>s\A|\z<ret>)<a-&> } + try %{ execute-keys -draft <a-x><a-k>^\h*(end)$<ret><a-semicolon><a-?>^\h*(for|function|if|while)<ret>s\A|\z<ret>)<a-&> } } } |
