You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While experimenting with Kakoune I created a one-line hook to modify the text in *scratch* buffer which appears automatically when you start kak without parameters.
Here is the text:
*** this is a *scratch* buffer which won't be automatically saved ***
*** use it for notes or open a file buffer with the :edit command ***
For testing purposes I'm replacing the *** with yyy.
Here is the hook:
hook global BufCreate '^\*scratch\*$' %{
execute-keys -buffer *scratch* '%s\*\*\*<ret>cyyy<esc>'
}
Everything works as expected. Here is the output:
But if I split execute-keys into two lines, the output is different and wrong:
Question
Hi!
While experimenting with Kakoune I created a one-line hook to modify the text in
*scratch*
buffer which appears automatically when you startkak
without parameters.Here is the text:
For testing purposes I'm replacing the
***
withyyy
.Here is the hook:
Everything works as expected. Here is the output:
But if I split
execute-keys
into two lines, the output is different and wrong:Output:
Why this happens?
The text was updated successfully, but these errors were encountered: