vimscript
The community/lang/vimscript
directory contains files that add support for the Vimscript language to Talon.
The core logic is in vimscript.py
. This file defines a Talon Context
that activates when the code language is set to "vimscript". It defines two lists: vimscript_functions
which contains common Vimscript functions and their spoken forms, and vimscript_scope
which contains the different scoping prefixes used in Vimscript. It also defines a number of actions under the user
namespace that are used to insert operators, comments, and control flow statements.
The file vimscript.talon
provides the spoken commands to trigger the functionality defined in vimscript.py
. It tags the context with user.code_imperative
, user.code_operators_assignment
, user.code_operators_math
, and user.code_comment_line
, providing common code editing features. It also sets the formatting rules for variable and function names to SNAKE_CASE
. There are voice commands for inserting variable declarations, functions, and control flow keywords.