Commands#

Enter command mode with :. All commands can be used by their full name or any listed alias.

File#

CommandAliasesDescription
writewWrite changes to disk. Accepts an optional path
write!w!Force write, creating necessary subdirectories. Accepts an optional path
write_allwrite-all, waWrite changes from all buffers to disk
write-all!wa!Forcefully write all buffers, creating necessary subdirectories
write_quitwrite-quit, wq, exit, x, xitWrite changes and close the current view. Accepts an optional path
write-quit!wq!, exit!, x!, xit!Write and close the current view forcefully. Accepts an optional path
write_quit_allwrite-quit-all, wqa, xaWrite all buffers and close all views
write-quit-all!wqa!, xa!Forcefully write all buffers, creating necessary subdirectories, and close all views
write_buffer_closewrite-buffer-close, wbcWrite changes and close the buffer. Accepts an optional path
write-buffer-close!wbc!Force write and close the buffer, creating necessary subdirectories. Accepts an optional path
updateuWrite changes only if the file has been modified
openo, edit, eOpen a file from disk into the current view
newnCreate a new scratch buffer
reloadrlDiscard changes and reload from the source file
reload_allreload-all, rlaDiscard changes and reload all documents from the source files
movemvMove the current buffer and its corresponding file to a different path
move!mv!Move the current buffer and file, creating necessary subdirectories
readrLoad a file into buffer at the cursor

Buffer#

CommandAliasesDescription
buffer_closebuffer-close, bc, bcloseClose the current buffer
buffer_close_forcebuffer-close!, bc!, bclose!Close the current buffer forcefully, ignoring unsaved changes
buffer_close_othersbuffer-close-others, bco, bcloseotherClose all buffers but the currently focused one
buffer_close_allbuffer-close-all, bca, bcloseallClose all buffers without quitting
buffer_nextbuffer-next, bn, bnextGoto next buffer
buffer_previousbuffer-previous, bp, bprevGoto previous buffer

Window#

CommandAliasesDescription
vsplitvsVertical right split
spliths, spHorizontal bottom split
vsplit_newvnewVertical right split scratch buffer
hsplit_newhnewHorizontal bottom split scratch buffer
transpose_viewTranspose splits
wclosewcClose window
wclose!wc!Force close window
wonlywoClose windows except current

Quit#

CommandAliasesDescription
quitqClose the current view
quit!q!Force close the current view, ignoring unsaved changes
quit_allquit-all, qaClose all views
quit-all!qa!Force close all views ignoring unsaved changes
cquitcqQuit with exit code (default 1)
cquit!cq!Force quit with exit code (default 1) ignoring unsaved changes
CommandAliasesDescription
gotogGoto line number

Directory#

CommandAliasesDescription
change_directorychange-current-directory, cdChange the current working directory
show_directoryshow-directory, pwdShow the current working directory
show_directory_stackshow-directory-stackShow the directory stack as a space delimited string
push_directorypush-directory, pushdSave and then change the current directory
pop_directorypop-directory, popdRemove the top entry from the directory stack and cd to the new top directory

Config#

CommandAliasesDescription
get_optionget-option, getGet the current value of a config option
set_optionset-option, setSet a config option at runtime
toggle_optiontoggle-option, toggleToggle a config option at runtime
config_openconfig-openOpen the user config.toml file
config_open_workspaceconfig-open-workspaceOpen the workspace config.toml file
config_reloadconfig-reloadRefresh user config
themeChange the editor theme (show current theme if no name specified)
log_openlog-openOpen the editor log file

Workspace Trust#

CommandAliasesDescription
workspace_trustworkspace-trustAdd current workspace to the list of trusted workspaces
workspace_untrustworkspace-untrustRemove current workspace from the list of trusted workspaces

Session#

CommandAliasesDescription
save_sessionsave-sessionSave session to the workspace session file
restore_sessionrestore-sessionRestore session from the workspace session file

Format#

CommandAliasesDescription
formatfmtFormat the file using an external formatter or language server
reflowHard-wrap the current selection of lines to a given width. Accepts an optional width argument (defaults to editor.text-width)
sortSort ranges in selection. Flags: -r/--reverse, -i/--insensitive

LSP#

CommandAliasesDescription
goto_declarationGoto declaration
goto_definitionGoto definition
goto_type_definitionGoto type definition
goto_implementationGoto implementation
goto_referenceGoto references
select_references_to_symbol_under_cursorSelect symbol references
code_actionPerform code action
hoverShow docs for item under cursor
rename_symbolRename symbol
signature-helpShow signature help
symbol_pickerOpen symbol picker
workspace_symbol_pickerOpen workspace symbol picker
lsp-restartRestart language servers for the current document
lsp-stopStop language servers for the current document
lsp-workspace-commandExecute a language server workspace command

Clipboard#

CommandAliasesDescription
yankclipboard-yankYank selection
paste_afterPaste after selection
paste_beforePaste before selection
replace_with_yankedReplace with yanked text
yank_to_clipboardYank selections to clipboard
yank_main_selection_to_clipboardYank main selection to clipboard
paste_clipboard_afterclipboard-paste-afterPaste clipboard after selections
paste_clipboard_beforeclipboard-paste-beforePaste clipboard before selections
clipboard_paste_replaceclipboard-paste-replaceReplace selections by clipboard content
yank_joined_to_clipboardyank-joinYank joined selections. Accepts an optional separator argument
yank_to_primary_clipboardprimary-clipboard-yankYank selections to primary clipboard
paste_primary_clipboard_afterprimary-clipboard-paste-afterPaste primary clipboard after selections
paste_primary_clipboard_beforeprimary-clipboard-paste-beforePaste primary clipboard before selections
primary_clipboard_paste_replaceprimary-clipboard-paste-replaceReplace selections by primary clipboard
clear_registerclear-registerClear given register. If no argument is given, clear all registers
show_clipboard_providershow-clipboard-providerShow clipboard provider name in status bar
CommandAliasesDescription
search_forwardSearch for regex pattern (forward)
search_backwardReverse search for regex pattern
search_nextSelect next search match
search_prevSelect previous search match
search_selection_wordUse current selection as search pattern, word bounded
make_search_word_boundedModify current search to make it word bounded
search_selectionUse current selection as search pattern

Support#

CommandAliasesDescription
character_infocharacter-info, charGet info about the character under the primary cursor
echoPrints the given arguments to the statusline
redrawClear and re-render the whole UI