Merge remote-tracking branch 'hugomg/lua-comment-insert-indent'
This commit is contained in:
commit
8a7f8f67be
|
@ -112,7 +112,7 @@ define-command -hidden lua-indent-on-new-line %{
|
|||
define-command -hidden lua-insert-on-new-line %[
|
||||
evaluate-commands -no-hooks -draft -itersel %[
|
||||
# copy -- comment prefix and following white spaces
|
||||
try %{ execute-keys -draft k<a-x>s^\h*\K--\h*<ret> y gh j P }
|
||||
try %{ execute-keys -draft k<a-x>s^\h*\K--\h*<ret> y gh j <a-x><semicolon> P }
|
||||
# wisely add end structure
|
||||
evaluate-commands -save-regs x %[
|
||||
try %{ execute-keys -draft k<a-x>s^\h+<ret>"xy } catch %{ reg x '' } # Save previous line indent in register x
|
||||
|
|
Loading…
Reference in New Issue
Block a user