2025-08-19 08:06:37 -04:00

86 lines
2.2 KiB
Plaintext

# Compound of action(select, clear, copy, cut, paste, etc.) and modifier(word,
# line, etc.) commands for editing text.
# eg: "select line", "clear all"
# For overriding or creating aliases for specific actions, this function will
# also accept strings, e.g. `user.edit_command("delete", "wordLeft")`.
# See edit_command_modifiers.py to discover the correct string for the modify argument,
# and `edit_command_actions.py` `simple_action_callbacks` to find strings for the action argument.
<user.edit_action> <user.edit_modifier>: user.edit_command(edit_action, edit_modifier)
# Zoom
zoom in: edit.zoom_in()
zoom out: edit.zoom_out()
zoom reset: edit.zoom_reset()
# Searching
find it: edit.find()
next one: edit.find_next()
# Navigation
# The reason for these spoken forms is that "page up" and "page down" are globally defined as keys.
scroll up: edit.page_up()
scroll down: edit.page_down()
# go left, go left left down, go 5 left 2 down
# go word left, go 2 words right
go <user.navigation_step>+: user.perform_navigation_steps(navigation_step_list)
go line start | head: edit.line_start()
go line end | tail: edit.line_end()
go way left:
edit.line_start()
edit.line_start()
go way right: edit.line_end()
go way up: edit.file_start()
go way down: edit.file_end()
go top: edit.file_start()
go bottom: edit.file_end()
go page up: edit.page_up()
go page down: edit.page_down()
# Indentation
indent [more]: edit.indent_more()
(indent less | out dent): edit.indent_less()
# Copy
copy that: edit.copy()
# Cut
cut that: edit.cut()
# Paste
(pace | paste) (that | it): edit.paste()
(pace | paste) enter:
edit.paste()
key(enter)
paste match: edit.paste_match_style()
# Duplication
clone that: edit.selection_clone()
clone line: edit.line_clone()
# Insert new line
new line above: edit.line_insert_up()
new line below | slap: edit.line_insert_down()
# Insert padding with optional symbols
padding: user.insert_between(" ", " ")
(pad | padding) <user.symbol_key>+:
insert(" ")
user.insert_many(symbol_key_list)
insert(" ")
# Undo/redo
undo that: edit.undo()
redo that: edit.redo()
# Save
file save: edit.save()
file save all: edit.save_all()
[go] line mid: user.line_middle()