Create vimfinity keyboard bindings for Talon voice control following project conventions - use when adding keyboard shortcuts, integrating editor actions, or setting up modal keybindings
Vimfinity is a modal keyboard system for Talon that uses vim-like key sequences. This skill helps create bindings following the project's conventions.
Location: plugins/vimfinity/vimfinity.py
This is where vimfinity_bind_keys() is implemented. Read this file if you need to understand:
Choose the appropriate location based on scope:
Add bindings inline in the relevant module file using a context:
# In apps/generic/code_editor.py
code_editor_context = Context()
code_editor_context.matches = r"""
tag: user.code_editor
"""
vimfinity_bind_keys(
{
"g": "Git",
"g g": actions.user.git_ui,
"g c": actions.user.git_commit,
"g s": actions.user.git_stage_file,
},
code_editor_context,
)
For cross-cutting bindings, use misc/vimfinity_user/vimfinity_bindings.py:
vimfinity_bind_keys(
{
"f": "File",
"f f": user.open_file,
}
)
g g, f f, w wg g, g c, g s (all git)Direct function reference:
"g s": user.git_stage_file, # Calls action directly
Lambda for delayed execution:
"up": ShiftDelayed(user.maximize), # Waits for key release
Tuple with description:
"o T": (ShiftDelayed(user.open_talon_repl), "Open Talon REPL"),
code_editor_context.matches = r"""
tag: user.code_editor
"""
ide_context.matches = r"""
tag: user.jetbrains
tag: user.emacs
app: vscode
"""
browser_context.matches = r"""
tag: user.browser
"""
Prefixes in use:
o = "Open" (applications, files)g = "Git" (source control)f = "File" (file operations)w = "Windows" (window management)m = "Mic/Macros" (Talon control)e = "Emacs" (Emacs-specific)k = "Program-Specific" (override per app)i = "Insert" (snippets, templates)p = "App-specific" (per-app actions)= = "Utils" (utilities, debugging)Reserved/Special:
backspace/delete = Special functions? = Google searchq/Q = ChatGPT integrationAlways import at the top of the file:
from user.plugins.vimfinity.vimfinity import vimfinity_bind_keys
For module-level bindings, also need:
from talon import Context
vimfinity_bind_keys(
{
"g": "Git",
"g g": actions.user.git_ui,
"g c": actions.user.git_commit,
"g s": actions.user.git_stage_file,
},
code_editor_context,
)
vimfinity_bind_keys(
{
"f": "File",
"f f": user.open_file,
}
)
vimfinity_bind_keys(
{
"k": user.rango_toggle_keyboard_clicking,
"h": user.rango_disable,
"r": user.rango_enable,
},
browser_context,
)
Use ShiftDelayed when the binding uses shift and the action should wait for key release:
class ShiftDelayed:
"""Performs action after a short delay, to allow user to release shift key."""
def __init__(self, action):
self.action = action
def __call__(self, *_, **__):
sleep("200ms")
return self.action(*_, **__)
# Usage
"?": ShiftDelayed(google_that),
"Q": user.chatgpt_switch_start,
After creating bindings:
apps/generic/code_editor.py # Editor-wide bindings
misc/vimfinity_user/vimfinity_bindings.py # Global bindings
apps/vscode.py # VSCode-specific bindings
Choose the most specific location that makes sense for your binding.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer