Skip to content

Actions ​

Every built-in action, by the name Fresh reads it under. The same names are used everywhere an action is written down:

  • a keybinding's "action" in config.json (see Keyboard);
  • a macro step in init.ts — what Macro: Save to init.ts writes as editor.defineMacro(...);
  • a step passed to editor.executeActions from a plugin.

Step format ​

In init.ts and plugins, each step is an object with the action's name, an optional count, and args for the few actions that carry data:

typescript
{ action: "move_word_right" }                  // no args
{ action: "move_down", count: 3 }              // repeated 3 times
{ action: "insert_char", args: { char: "x" } } // with args

In config.json, a keybinding takes the same args object next to its "action".

A name that isn't listed here is treated as a plugin action — the name of a handler a plugin registered with registerHandler (or init.ts did). That is what lets you bind keys to plugin commands, and it is also why a misspelled built-in name raises no error: it becomes a plugin action nothing handles, and does nothing when run.

Actions that take args ​

ActionArgsExample
clear_bookmark{ char: "x" }Clear bookmark 'x'
copy_with_theme{ theme: "dracula" }Copy with dracula theme
insert_char{ char: "x" }Insert character 'x'
jump_to_bookmark{ char: "x" }Jump to bookmark 'x'
menu_open{ name: "File" }Open File menu
play_macro{ char: "x" }Play macro 'x'
plugin_next_key{ key: "x" }Key for a plugin (x)
prompt_confirm_with_text{ text: "hello" }Confirm prompt (hello)
set_bookmark{ char: "x" }Set bookmark 'x'
show_macro{ char: "x" }Show macro 'x' in buffer
switch_keybinding_map{ map: "emacs" }Switch to 'emacs' keybindings
toggle_macro_recording{ char: "x" }Toggle macro recording for 'x'

All actions ​

ActionDescription
add_cursor_aboveAdd cursor above
add_cursor_belowAdd cursor below
add_cursor_next_matchAdd cursor at next match
add_cursors_to_line_endsAdd cursors to line ends
add_rulerAdd ruler
block_select_downBlock select down
block_select_leftBlock select left
block_select_rightBlock select right
block_select_upBlock select up
calibrate_inputCalibrate keyboard input
cancel_markCancel mark (soft exit, keeps anchor)
clear_bookmarkClear bookmark 'x' (args: { char: "x" })
clear_markClear mark (hard exit, removes anchor)
clear_searchClear Search Highlights
clear_warningsClear warnings
closeClose file
close_settingsClose settings
close_splitClose split
close_tabClose tab
close_terminalClose terminal
command_paletteCommand palette
completion_acceptAccept completion
completion_dismissDismiss completion popup
composite_next_hunkNext Hunk (Side-by-Side Diff)
composite_prev_hunkPrevious Hunk (Side-by-Side Diff)
copyCopy
copy_file_pathCopy file path
copy_relative_file_pathCopy relative file path
copy_with_themeCopy with dracula theme (args: { theme: "dracula" })
cutCut
cycle_live_grep_providerCycle Live Grep provider (git-grep → rg → ag → ack → grep)
dabbrev_expandExpand abbreviation (dabbrev)
decrease_split_sizeDecrease split size
dedent_selectionDedent selection
delete_backwardDelete backward
delete_forwardDelete forward
delete_lineDelete line
delete_to_line_endDelete to end of line
delete_to_line_startDelete to start of line
delete_vi_word_endDelete word forward
delete_word_backwardDelete word backward
delete_word_forwardDelete word forward
detachDetach from daemon
dump_configDump config to file
dump_ui_treeDump UI tree
duplicate_lineDuplicate line
duplicate_line_aboveDuplicate line above
ensure_final_newlineEnsure file ends with a newline
event_debugDebug keyboard events
expand_line_selectionExpand line selection
expand_selectionExpand selection
extract_tab_to_new_workspaceExtract tab to new workspace
file_browser_toggle_detect_encodingToggle encoding auto-detection
file_browser_toggle_hiddenToggle hidden files visibility
file_explorer_collapseFile explorer: collapse directory
file_explorer_copyFile explorer: copy
file_explorer_copy_full_pathFile explorer: copy full path
file_explorer_copy_relative_pathFile explorer: copy relative path
file_explorer_cutFile explorer: cut
file_explorer_deleteFile explorer: delete
file_explorer_downFile explorer: navigate down
file_explorer_duplicateFile explorer: duplicate
file_explorer_expandFile explorer: expand directory
file_explorer_extend_selection_downFile explorer: extend selection down
file_explorer_extend_selection_upFile explorer: extend selection up
file_explorer_new_directoryFile explorer: new directory
file_explorer_new_fileFile explorer: new file
file_explorer_openFile explorer: open file
file_explorer_page_downFile explorer: page down
file_explorer_page_upFile explorer: page up
file_explorer_pasteFile explorer: paste
file_explorer_refreshFile explorer: refresh
file_explorer_renameFile explorer: rename
file_explorer_search_backspaceFile explorer: delete search character
file_explorer_search_clearFile explorer: clear search
file_explorer_select_allFile explorer: select all
file_explorer_toggle_gitignoredFile explorer: toggle gitignored files
file_explorer_toggle_hiddenFile explorer: toggle hidden files
file_explorer_toggle_selectFile explorer: toggle selection
file_explorer_upFile explorer: navigate up
find_in_selectionSearch within selection
find_nextFind next search match
find_previousFind previous search match
find_selection_nextFind next occurrence of selection
find_selection_previousFind previous occurrence of selection
focus_editorFocus editor
focus_file_explorerFocus file explorer
focus_next_sidebar_sectionFocus next sidebar section
focus_prev_sidebar_sectionFocus previous sidebar section
focus_terminalFocus terminal
force_quitQuit editor (discard unsaved changes)
format_bufferFormat buffer with configured formatter
goto_lineGo to line number
goto_matching_bracketGo to matching bracket
increase_split_sizeIncrease split size
init_checkCheck init.ts
init_editEdit init.ts
init_reloadReload init.ts
insert_charInsert character 'x' (args: { char: "x" })
insert_newlineInsert newline
insert_tabInsert tab
inspect_theme_at_cursorInspect theme at cursor
jump_to_bookmarkJump to bookmark 'x' (args: { char: "x" })
jump_to_next_errorJump to next error/diagnostic
jump_to_previous_errorJump to previous error/diagnostic
keyboard_shortcutsShow keyboard shortcuts
list_bookmarksList all bookmarks
list_macrosList all recorded macros
load_plugin_from_bufferLoad Plugin from Buffer
lsp_code_actionsLSP: Show code actions
lsp_completionLSP: Show completion suggestions
lsp_goto_definitionLSP: Go to definition
lsp_hoverLSP: Show hover documentation
lsp_implementationLSP: Go to implementation
lsp_referencesLSP: Find references
lsp_renameLSP: Rename symbol
lsp_restartLSP: Start/restart server for current language
lsp_signature_helpLSP: Show signature help
lsp_stopLSP: Stop a running server
lsp_toggle_for_bufferLSP: Toggle LSP for current buffer
menu_activateActivate menu bar
menu_closeClose menu
menu_downNavigate to next menu item
menu_executeExecute selected menu item
menu_leftNavigate to previous menu
menu_openOpen File menu (args: { name: "File" })
menu_rightNavigate to next menu
menu_upNavigate to previous menu item
move_document_endMove to document end
move_document_startMove to document start
move_downMove cursor down
move_leftMove cursor left
move_left_in_lineMove cursor left
move_line_downMove line down
move_line_endMove to line end
move_line_startMove to line start
move_line_upMove line up
move_page_downMove page down
move_page_upMove page up
move_rightMove cursor right
move_right_in_lineMove cursor right
move_to_paragraph_downMove to next empty line
move_to_paragraph_upMove to previous empty line
move_upMove cursor up
move_word_endMove to word end
move_word_leftMove word left
move_word_rightMove word right
navigate_backNavigate back in history
navigate_forwardNavigate forward in history
newNew file
next_bufferNext buffer
next_paneNext pane
next_splitNext split
next_windowNext window
noneAlias of noop. No action
noopNo action
openOpen file
open_keybinding_editorKeybinding Editor
open_lineOpen line below
open_live_grepLive Grep (Find in Files)
open_settingsOpen settings
open_terminalOpen terminal
open_terminal_belowOpen terminal below
open_terminal_in_dockOpen terminal in Utility Dock
open_terminal_rightOpen terminal to the right
open_update_logShow update output
pastePaste
play_last_macroPlay last recorded macro
play_macroPlay macro 'x' (args: { char: "x" })
plugin_next_keyKey for a plugin (x) (args: { key: "x" })
popup_cancelPopup cancel
popup_confirmPopup confirm
popup_focusFocus popup
popup_page_downPopup page down
popup_page_upPopup page up
popup_select_nextPopup select next
popup_select_prevPopup select previous
prev_bufferPrevious buffer
prev_panePrevious pane
prev_splitPrevious split
prev_windowPrevious window
prompt_accept_suggestionPrompt accept suggestion
prompt_backspacePrompt backspace
prompt_cancelCancel prompt
prompt_confirmConfirm prompt
prompt_confirm_with_textConfirm prompt (hello) (args: { text: "hello" })
prompt_copyPrompt copy
prompt_cutPrompt cut
prompt_deletePrompt delete
prompt_delete_to_line_endPrompt delete to end of line
prompt_delete_word_backwardPrompt delete word backward
prompt_delete_word_forwardPrompt delete word forward
prompt_jump_to_bookmarkJump to bookmark (prompts for register)
prompt_move_endPrompt move to end
prompt_move_end_selectingPrompt move to end selecting
prompt_move_home_selectingPrompt move to start selecting
prompt_move_leftPrompt move left
prompt_move_left_selectingPrompt move left selecting
prompt_move_rightPrompt move right
prompt_move_right_selectingPrompt move right selecting
prompt_move_startPrompt move to start
prompt_move_word_leftPrompt move word left
prompt_move_word_rightPrompt move word right
prompt_page_downPrompt page down
prompt_page_upPrompt page up
prompt_pastePrompt paste
prompt_play_macroPlay macro (prompts for register)
prompt_promote_macroPromote macro to an init.ts command (prompts for register)
prompt_record_macroRecord macro (prompts for register)
prompt_save_macro_to_initSave macro to init.ts (prompts for register)
prompt_select_allPrompt select all
prompt_select_nextPrompt select next
prompt_select_prevPrompt select previous
prompt_select_word_leftPrompt select word left
prompt_select_word_rightPrompt select word right
prompt_set_bookmarkSet bookmark (prompts for register)
query_replaceInteractive replace (y/n/!/q for each match)
quick_openQuick Open (files, commands, buffers)
quick_open_buffersQuick Open Buffers
quick_open_filesQuick Open Files
quitQuit editor
recenterRecenter view on cursor
redoRedo
redraw_screenRedraw screen
reload_with_encodingReload file with specific encoding
remove_rulerRemove ruler
remove_secondary_cursorsRemove secondary cursors
replaceReplace text in buffer
reset_buffer_settingsReset buffer settings to config
restart_terminalRestart terminal process
resume_live_grepResume Live Grep
revertRevert to saved file
review_interrupted_savesReview copies kept by interrupted saves
saveSave file
save_allSave all files
save_asSave file as...
scan_line_indexScan line index
scroll_downScroll down
scroll_tabs_leftScroll tabs left
scroll_tabs_rightScroll tabs right
scroll_upScroll up
searchSearch for text in buffer
select_allSelect all
select_cursor_styleSelect cursor style
select_document_endSelect to document end
select_document_startSelect to document start
select_downSelect down
select_keybinding_mapSelect keybinding map
select_leftSelect left
select_lineSelect current line
select_line_endSelect to line end
select_line_startSelect to line start
select_localeSelect locale
select_page_downSelect page down
select_page_upSelect page up
select_rightSelect right
select_themeSelect theme
select_to_paragraph_downSelect to next empty line
select_to_paragraph_upSelect to previous empty line
select_upSelect up
select_wordSelect word under cursor
select_word_endSelect to word end
select_word_leftSelect word left
select_word_rightSelect word right
send_selection_to_terminalSend selection to terminal
set_backgroundSet ANSI background file
set_background_blendSet background blend ratio
set_bookmarkSet bookmark 'x' (args: { char: "x" })
set_compose_widthAlias of set_page_width. Set page width (compose width)
set_encodingSet text encoding (UTF-8, Latin-1, etc.)
set_languageSet language/syntax highlighting
set_line_endingSet line ending format (LF/CRLF)
set_markSet mark (start selection)
set_page_widthSet page width (compose width)
set_tab_sizeSet tab size for current buffer
settings_activateActivate setting
settings_decrementDecrement value
settings_helpShow settings help
settings_incrementIncrement value
settings_inheritInherit value (unset override)
settings_resetReset setting to default
settings_saveSave settings
settings_searchSearch settings
settings_toggle_focusToggle settings panel focus
shell_commandRun shell command on buffer/selection
shell_command_replaceRun shell command and replace
show_helpShow manual
show_lsp_statusShow LSP status
show_macroShow macro 'x' in buffer (args: { char: "x" })
show_read_only_menuShow read-only menu
show_remote_indicator_menuShow remote authority menu
show_status_logShow status message log
show_warningsShow warnings
smart_homeSmart home (toggle line start / first non-whitespace)
sort_linesSort lines
split_horizontalSplit horizontally
split_verticalSplit vertically
start_macro_recordingStart macro recording
stop_macro_recordingStop macro recording
suspend_processSuspend editor process (resume with fg)
switch_keybinding_mapSwitch to 'emacs' keybindings (args: { map: "emacs" })
switch_projectSwitch project
switch_to_previous_tabSwitch to previous tab
switch_to_tab_by_nameSwitch to tab by name
terminal_escapeExit terminal mode
terminal_pastePaste into terminal
to_lower_caseConvert to lowercase
to_upper_caseConvert to uppercase
toggle_auto_revertToggle auto-revert mode (current buffer)
toggle_caseConvert to uppercase
toggle_commentToggle comment
toggle_compose_modeAlias of toggle_page_view. Toggle page view (compose)
toggle_current_line_highlightToggle current line highlight
toggle_current_line_highlight_current_bufferToggle current line highlight (current buffer)
toggle_debug_highlightsToggle debug highlight mode (show byte ranges)
toggle_dock_focusToggle orchestrator dock focus
toggle_file_explorerToggle file explorer
toggle_file_explorer_sideToggle file explorer side (left/right)
toggle_foldToggle fold
toggle_fold_indicators_current_bufferToggle folding indicators (current buffer)
toggle_horizontal_scrollbarToggle horizontal scrollbar visibility
toggle_indentation_guide_current_bufferToggle indentation guides (current buffer)
toggle_indentation_styleToggle indentation style: spaces/tabs (current buffer)
toggle_inlay_hintsToggle inlay hints
toggle_keyboard_captureToggle keyboard capture (terminal)
toggle_line_numbersToggle line numbers
toggle_line_numbers_current_bufferToggle line numbers (current buffer)
toggle_line_wrapToggle line wrap
toggle_line_wrap_current_bufferToggle line wrap (current buffer)
toggle_macro_recordingToggle macro recording for 'x' (args: { char: "x" })
toggle_maximize_splitToggle maximize split
toggle_menu_barToggle menu bar visibility
toggle_mouse_captureToggle mouse support
toggle_mouse_hoverToggle LSP hover on mouse
toggle_occurrence_highlightToggle occurrence highlight
toggle_occurrence_highlight_current_bufferToggle occurrence highlight (current buffer)
toggle_page_viewToggle page view (compose)
toggle_prompt_lineToggle prompt line visibility
toggle_read_onlyToggle read-only mode (current buffer)
toggle_scroll_syncToggle scroll sync
toggle_search_case_sensitiveToggle search case sensitivity
toggle_search_confirm_eachToggle confirm each replacement
toggle_search_regexToggle search regex mode
toggle_search_whole_wordToggle search whole word matching
toggle_status_barToggle status bar visibility
toggle_tab_barToggle tab bar visibility
toggle_tab_indicatorsToggle tab indicator visibility (current buffer)
toggle_utility_dockToggle Utility Dock
toggle_vertical_scrollbarToggle vertical scrollbar visibility
toggle_virtual_space_current_bufferToggle virtual space (current buffer)
toggle_whitespace_indicatorsToggle whitespace indicator visibility (current buffer)
transpose_charsTranspose characters
trigger_wave_animationWave animation
trim_trailing_whitespaceRemove trailing whitespace from all lines
undoUndo
update_freshUpdate fresh
vi_move_downMove cursor down
vi_move_upMove cursor up
vi_move_word_endMove to word end
vi_select_word_endSelect to word end
workspace_trust_blockBlock Process Execution
workspace_trust_promptWorkspace Trust…
workspace_trust_restrictRestrict This Folder
workspace_trust_trustTrust This Folder
yank_to_line_endYank to end of line
yank_to_line_startYank to start of line
yank_vi_word_endYank word forward
yank_word_backwardYank word backward
yank_word_forwardYank word forward

Released under the GNU General Public License v3.0 or later