Skip to content

multiple_cursors

This directory contains files that add support for multiple cursors to Talon.

The multiple_cursors tag is defined in multiple_cursors.py. This file defines the multiple_cursors tag and the actions it exposes. The actions themselves do not perform any operations, but instead, other files can implement them (e.g. in an editor-specific file). For example, a file for VS Code could define multi_cursor_enable to enable multiple cursors in VS Code. The actions defined are:

  • multi_cursor_enable: Enables multi-cursor mode
  • multi_cursor_disable: Disables multi-cursor mode
  • multi_cursor_add_above: Adds a cursor to the line above the current cursor
  • multi_cursor_add_below: Adds a cursor to the line below the current cursor
  • multi_cursor_select_fewer_occurrences: Removes the last cursor and selection
  • multi_cursor_select_more_occurrences: Adds a cursor to the next occurrence of the selection
  • multi_cursor_skip_occurrence: Skips adding a cursor at the next occurrence of the selection
  • multi_cursor_select_all_occurrences: Adds a cursor to every occurrence of the current selection
  • multi_cursor_add_to_line_ends: Adds a cursor to the end of every selected line

multiple_cursors.talon binds voice commands to the actions in multiple_cursors.py. This file enables the user to control multiple cursors with their voice. For example, saying "cursor multiple" will call the user.multi_cursor_enable() action, while saying "cursor up" will call user.multi_cursor_add_above().