Skip to content

Instantly share code, notes, and snippets.

@dmerejkowsky
Last active January 18, 2025 18:18
Show Gist options
  • Save dmerejkowsky/37fdb9dd5e70540057273c8e21099be5 to your computer and use it in GitHub Desktop.
Save dmerejkowsky/37fdb9dd5e70540057273c8e21099be5 to your computer and use it in GitHub Desktop.
Select first item in a kakoune menu
# Let's say I have a command like this
define-command fruits %{
menu apple %{echo apple} banana %{echo banana} peach %{echo peach}
}
# I want to call the fruits command and select the first entry in a kakoune script
# This is what I've tried:
execute-keys : fruits <ret> <ret>
# But I get:
# No such item:
# as an error message
# How to programmaticaly call the fruits command and select the first option ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment