Skip to content
xted GitHub
ITEN

Commands

All 148 commands of xted, grouped as in the command palette. The names are the ones you see in the editor: type part of one in Alt+X to run it.

This page also has the command line options, the keys of lists and search, the Markdown shortcuts, the mouse, how to remap and every configuration key.

Command palette Alt+X

On settings, means on with no configuration and off; a word is the default value. The last column is the id to use in the [keys] section.

File

CommandKeysWhat it doesId
SaveCtrl+SWrites the file to disk atomically, keeping its permissions. A buffer with no name is asked for one.save
Save asAlt+SSaves the buffer under another name.save_as
Save allAlt+ASaves every modified file.save_all
Save without formattingno keySaves once, skipping the formatter.save_no_format
Save with encodingno keyConverts the file to another encoding and saves it.save_encoding
Reopen with encodingno keyReads the file again in another encoding, when the detection got it wrong.reopen_encoding
Format documentAlt+Shift+FRuns the formatter of the language (key format) on the document, without saving, and says which one it used.format
New fileCtrl+NOpens an empty buffer with no name. In the file browser it creates a file in the selected folder.new_file
Open fileCtrl+OOpens a file.open
Quick openCtrl+PFuzzy search among the files of the project.quick_open
Recent filesAlt+Shift+PLists the files opened last, in any folder, and reopens one where its cursor was.recent_files
Recover filesno keyLists the copies left after a crash: Enter opens the file, Del discards the copy.recover_files
QuitCtrl+QQuits, asking first if files are not saved.quit

Buffers and panes

CommandKeysWhat it doesId
List buffersCtrl+EFilterable list of the open buffers, with name and path.buffers
Close bufferCtrl+WCloses the buffer, asking first if it has unsaved changes.close_buffer
Next bufferAlt+. or Ctrl+PgDnGoes to the next buffer.next_buffer
Previous bufferAlt+, or Ctrl+PgUpGoes to the previous buffer.prev_buffer
Split pane verticallyAlt+\Splits the pane vertically.split_v
Split pane horizontallyAlt+-Splits the pane horizontally.split_h
Resize panesAlt+EEnters resize mode: the arrow keys move the border.resize_mode
Equalize panesno keyGives the panes the same size.equalize_wins
Close paneAlt+QCloses the active pane.close_win
Next paneAlt+O or Alt+Right or Ctrl+TabMoves to the next pane.next_win
Previous paneAlt+Left or Ctrl+Shift+TabMoves to the previous pane.prev_win
Show/hide file browserCtrl+BShows or hides the file browser on the side.toggle_tree
CommandKeysWhat it doesId
FindCtrl+FIncremental search, with every match highlighted.find
ReplaceCtrl+RReplaces, asking at each match, also within the selection.replace
Find in filesAlt+FSearches the files of the project and lists the results.find_files
Next matchF3 or Alt+NGoes to the next match.find_next
Previous matchShift+F3 or Alt+PGoes to the previous match.find_prev
Go to lineCtrl+GGoes to a line, and to a column if you give one.goto_line
Start of lineHomeGoes to the first non-blank character of the line, then to column 0.line_start
End of lineEndGoes to the end of the line.line_end
Start of fileCtrl+HomeGoes to the start of the file.file_start
End of fileCtrl+EndGoes to the end of the file.file_end
Go to symbolCtrl+TLists classes, functions, methods, properties and constants of the file and jumps to the one chosen.symbols
Go to definitionF12 or Ctrl+clickOpens the definition of the name at the cursor, also in another file; Ctrl+click does it too.goto_tag
Matching bracketAlt+MJumps to the matching bracket.match
Go backAlt+Shift+LeftGoes back to where the last jump started.jump_back
Go forwardAlt+Shift+RightGoes forward again in the history of the jumps.jump_forward

Edit

CommandKeysWhat it doesId
UndoCtrl+ZUndoes the last change; the history is unlimited.undo
RedoCtrl+YRedoes the change undone.redo
Select allCtrl+ASelects the whole text.select_all
Select lineAlt+LSelects the line.select_line
Select wordAlt+WSelects the word.select_word
Select to line startShift+HomeExtends the selection to the start of the line.select_home
Select to line endShift+EndExtends the selection to the end of the line.select_end
CopyCtrl+CCopies the selection, or the whole line when there is none.copy
CutCtrl+XCuts the selection, or the whole line when there is none.cut
PasteCtrl+VPastes, also text copied in another application where the system clipboard allows it.paste
Paste previous entryAlt+VPastes the previous entry of the clipboard history instead.paste_older
Clipboard historyAlt+Shift+VThe last 32 copies, filterable: Enter pastes, Del removes the entry.clip_history
Clear clipboard historyno keyRemoves every entry of the clipboard history.clip_clear
Delete linesCtrl+KDeletes the line, or the selected lines.delete_lines
Join linesCtrl+JJoins the lines.join_lines
Delete previous wordCtrl+Backspace or Alt+BackspaceDeletes the word before the cursor; at the edge of a line, joins the lines.delete_word_left
Delete next wordCtrl+DelDeletes the word after the cursor.delete_word_right
Upper caseAlt+Shift+UTurns the selection or the word to upper case.upper_case
Lower caseAlt+Shift+LTurns the selection or the word to lower case.lower_case
Capitalize wordsno keyGives each word an upper case initial.title_case
Move line upAlt+UpMoves the line, or the selected lines, up.move_up
Move line downAlt+DownMoves the line, or the selected lines, down.move_down
Duplicate line aboveno keyDuplicates the line above.duplicate_up
Duplicate line belowAlt+YDuplicates the line below.duplicate_down
Toggle commentAlt+/Comments or uncomments the line or selection, as the language does.comment
Filter through a commandAlt+KSends the selection to an external command and replaces it with the output.filter
Insert snippetno keyLists the snippets and inserts the one chosen; a selection becomes $TM_SELECTED_TEXT.snippet_insert
Snippet from selectionno keyAdds the selected text to your snippets, under a name.snippet_from_selection
Edit snippetsno keyOpens the snippet file of a language, yours or the project's.snippet_edit
Copy a built-in snippetno keyCopies a built-in snippet into yours, so you can change it.snippet_copy
Record macroF9Starts recording the keys; again to stop.macro_record
Play macroShift+F9Plays the macro back from the cursor.macro_play
Play macro several times…no keyAsks how many times; with 0 it goes on as long as the cursor moves to a later line.macro_repeat
Play macro on each selected lineno keyRuns the macro from the start of each selected line.macro_lines
Save macro…no keyKeeps the macro under a name.macro_save
Macros…no keyLists the macros kept: Enter plays one, Del deletes it.macro_list
Convert indentation to spacesno keyConverts the indentation of the document to spaces.indent_to_spaces
Convert indentation to tabsno keyConverts the indentation of the document to tabs.indent_to_tabs

Cursors and blocks

CommandKeysWhat it doesId
Add cursor at next occurrenceCtrl+DAdds a cursor at the next occurrence of the word.cursor_next
Add cursors at all occurrencesAlt+DAdds a cursor at every occurrence.cursor_all
Add cursor aboveAlt+Shift+UpAdds a cursor on the line above.cursor_above
Add cursor belowAlt+Shift+DownAdds a cursor on the line below.cursor_below
Fold/unfold blockAlt+ZFolds or unfolds the block, by brackets or indentation.fold
Fold allno keyFolds every block.fold_all
Unfold allno keyUnfolds every block.unfold_all

Run

CommandKeysWhat it doesId
Run commandAlt+RRuns a shell command and shows its output in a pane.run
Repeat last commandF5Runs the last command again.run_again
Stop commandShift+F5Stops the running command.run_stop
Next errorF8Jumps to the next error in the output.next_error
Previous errorShift+F8Jumps to the previous error.prev_error
Refresh Git markersno keyReads the Git markers of the margin again.git_refresh
Who changed this line (Git blame)Alt+Shift+BShows commit, author, date and subject of the last change to the line.git_blame
Compare with the last commit (Git)Alt+Shift+DOpens the differences of the buffer, also unsaved, from the last commit.git_diff

AI

CommandKeysWhat it doesId
Change with the AI…F2Ask for a change to the selection or to the function at the cursor; it comes as differences to apply or discard.ai_ask
AI chatShift+F2Opens or closes the pane of the conversation with the AI.ai_chat
Explain with the AIno keySends the selection or the function at the cursor to the chat to be explained.ai_explain
Document with the AIno keyProposes documentation comments in the style of the language.ai_document
Fix the error with the AIno keyAsks to fix the last error reached with F8.ai_fix
New AI chatno keyForgets the conversation and starts a new one.ai_new_chat
Stop the AIno keyStops the answer in progress.ai_stop
AI model…no keyChooses, adds, changes or removes the models of the [ai] section.ai_model
AI chat beside the textoff by defaultF4Moves the open chat beside the text or back below it (key ai_chat).ai_chat_side

Other

CommandKeysWhat it doesId
HelpF1Opens the help page, with commands, current shortcuts and files used.help
About xtedno keyShows version and credits.about
Check JSONno keyMoves the cursor to the first JSON error and says what it is.json_check
Format JSONno keyRewrites the JSON one key per line, with the indentation of the file.json_format
Compact JSONno keyPuts the JSON on one line.json_compact
Command paletteAlt+XOpens the palette with every command.palette
Menu bar: openF10Opens the menu bar on the menu used last.menu
Redraw screenCtrl+LRedraws the screen.redraw

Markdown

CommandKeysWhat it doesId
Markdown previewAlt+UOpens or closes the rendered preview of the Markdown document.md_preview
BoldAlt+BWraps in **, or removes the bold.md_bold
ItalicAlt+IWraps in *, or removes the italic.md_italic
CodeAlt+CInline code; on several lines, a fenced block.md_code
Bulleted listAlt+HTurns the lines into a bulleted list, or back.md_list
Heading 1Alt+1Makes the lines a level 1 heading.md_h1
Heading 2Alt+2Makes the lines a level 2 heading.md_h2
Heading 3Alt+3Makes the lines a level 3 heading.md_h3
Heading 4Alt+4Makes the lines a level 4 heading.md_h4
Heading 5Alt+5Makes the lines a level 5 heading.md_h5
Heading 6Alt+6Makes the lines a level 6 heading.md_h6
Normal textAlt+0Removes the heading from the lines.md_h0

Settings

CommandKeysWhat it doesId
Toggle mouseon by defaultno keyUses or ignores the mouse.toggle_mouse
Toggle autosuggeston by defaultno keyShows or hides the suggestions while you type.toggle_autosuggest
Toggle auto-pairson by defaultno keyInserts or not the closing brackets and quotes.toggle_autopair
Line numbersoff by defaultAlt+GShows line numbers in the margin.toggle_numbers
Overwrite modeoff by defaultInsTyped characters go over the ones under the cursor; for the session.toggle_overwrite
Wrap long linesoff by defaultAlt+Shift+ZContinues lines wider than the pane on the rows below; on for Markdown and plain text.toggle_wrap
Show invisible charactersoff by defaultAlt+JShows line ends, tabs and trailing spaces.toggle_invisibles
Toggle Git markerson by defaultno keyShows or hides the Git markers in the margin.toggle_git
Current function in the status baron by defaultno keyShows which class or function the cursor is in.toggle_scope
Menu baron by defaultno keyShows or hides the menu bar at the top.toggle_menubar
Crash recovery copieson by defaultno keyWrites or not the copies for recovery after a crash.toggle_recover
Toggle system clipboardon by defaultno keySends copies to the system clipboard too, or not.toggle_clipboard
Indentation: tabno keyIndents with tabs.indent_tabs
Indentation: 2 spacesno keyIndents with 2 spaces.indent_spaces_2
Indentation: 4 spacesno keyIndents with 4 spaces.indent_spaces_4
Indentation: 8 spacesno keyIndents with 8 spaces.indent_spaces_8
Detect indentation styleno keyDetects from the text whether the file uses tabs or spaces.indent_detect
Change themedefault value: darkAlt+TOpens the list of themes, previewing the highlighted one.theme
Edit themeno keyEdits the colors of the theme live and saves the result.theme_edit
Colorsdefault value: autono keyChooses the colors: auto, truecolor, 256, 16 or none.colors
Glyphsdefault value: unicodeno keyChooses the symbols of the interface: unicode, windows or ascii.glyphs
Key bardefault value: messageno keyChooses where the keys of the context go: message row, their own row or hidden.keybar
Languagedefault value: autono keySwitches to the next interface language.language
Keyboard shortcuts…no keyLists and changes the shortcuts, writing them to the configuration.keyboard_shortcuts
Save settings…no keyWrites your choices to the user file, to .xted or to .editorconfig.save_settings

Command line

CommandWhat it does
xted [file[:line[:column]] ...]Opens one or more files; several files become several buffers. With no arguments it restores the folder's session.
xted -Reads the text from standard input.
xted directoryOpens the file browser on that directory.
xted -h, --helpPrints a short help and exits.
xted --version, -VPrints version and credits and exits.
xted --remote file ...Opens the files in the xted already open and exits; when there is none, starts as usual.
xted --desktop [file ...]What the icon and "Open with" run: files go to the open xted, otherwise a terminal is started with xted in it.

xt is a short name for the same program.

Keys in lists and bars

Palette, buffers, symbols, quick open

Type to filter. Up, Down, PgUp and PgDn move, Enter chooses, Esc closes. In the clipboard history, recent files, recovery and macro lists Del removes the entry.

Search bar and replace

KeyWhat it does
Alt+CCase sensitivity.
Alt+WWhole words only.
Alt+RRegular expression (POSIX ERE; not on Windows).
EnterAccept.
EscCancel.
y n a EscWhile replacing: yes, no, all, done.

File browser

Enter opens, Ctrl+N creates a file in the selected folder, F7 a folder, F2 renames or moves, Del deletes a file or an empty folder.

Suggestions and snippets

In the popup: Up and Down choose, Tab or Enter accept, Esc closes. Inside a snippet Tab goes to the next field (it accepts a suggestion only after you chose one with the arrows); on a choice field, Enter or Tab takes the item.

Theme editor

KeyWhat it does
Up DownChoose the item.
EnterOpens the palette; in the palette keeps the color.
Left RightChange hue, saturation or lightness; with Shift in bigger steps.
TabChooses which of the three to change.
#Types the color as #rrggbb.
DelTakes the item back to its starting color.
Ctrl+ZUndoes the last change.
SpaceOn the background, uses the terminal's own.
Ctrl+SSaves the theme under a name.
EscLeaves the palette, or closes the editor, asking if there are changes.

Markdown shortcuts

Only in Markdown files. With a selection they put the markup around it (or take it off); with none, they insert the pair with the cursor in it.

KeyResult
Alt+UPreview in a pane beside.
Alt+BBold **…**
Alt+IItalic *…*
Alt+CInline code; on several lines a ``` block
Ctrl+ULink [selection](url)
Alt+1 … Alt+6Heading, level 1 to 6
Alt+0Removes the heading
Alt+HBulleted list, or removes it

Mouse

ActionWhat it does
Click, double click, triple clickCursor, word, line.
DragSelects; on the borders of panes and browser, resizes.
WheelScrolls.
Alt+clickAdds a cursor.
Ctrl+clickGoes to the definition of the name.
Click on menus, tabs, lists, key barSame as the matching key.
Click on a line numberSelects the line; dragging, several lines.
Click on the encoding in the status barSaves with another encoding.

mouse = off or Toggle mouse turns it off.

How to remap

In the editor: Keyboard shortcuts… (Options menu or palette) lists the commands with their keys, searched by name or by key. Enter waits for the new key and puts it in place of the old ones, Ins adds one, Del takes one away, Ctrl+R gives back the defaults. The first item, "Test a key…", says how each key arrives and what it does.

By hand, in the [keys] section of the config: key = command id, or none to remove a shortcut.

[keys]
ctrl+shift+d = duplicate_down
alt+y = none

Key names: ctrl+s, alt+x, shift+f3, alt+shift+up, alt+left, pgdn, tab, enter.

Configuration keys

In the file ~/.config/xted/config. Yes/no values accept on/off, yes/no, true/false, 1/0. Unknown keys and invalid values are reported at start.

Global

KeyValuesDefaultWhat it does
themea built-in theme or yoursdarkColor theme.
languageauto, en, it, a catalog codeautoInterface language.
mouseon, offonUse of the mouse.
menubaron, offonMenu bar.
keybarmessage, line, offmessageWhere the keys of the context go.
colorsauto, truecolor, 256, 16, noneautoTerminal colors.
glyphsunicode, windows, asciiunicodeInterface symbols.
giton, offonGit markers in the margin.
clipboardon, offonCopies also go to the system clipboard.
current_functionon, offonCurrent function in the status bar.
single_instanceon, offonThe first xted receives the files of --remote and --desktop.
keep_unsavedon, offonUnnamed buffers kept between sessions.
recoveron, offonCopies for crash recovery.
recent_fileson, offonList of recent files.
terminala command, e.g. kittychosen by xtedTerminal opened by the icon and "Open with".
aia command or a name from [ai]noneAI program; user file only.
ai_contexta number of lines2000Most lines of the file sent to the AI.
ai_chatbelow, sidebelowWhere the chat opens; under 81 columns it goes below anyway.

Per language

They apply globally or inside a [Language] section; [Text] is for files with no language.

KeyValuesDefaultWhat it does
tab_width1 to 168Width of a tab.
indent_width1 to 16as tab_widthSpaces of one level.
expand_tabon, offoffTab inserts spaces.
trim_trailing_spaceon, offoffRemoves trailing spaces on save.
final_newlinekeep, alwayskeepNewline at end of file.
autosuggeston, offonSuggestions while typing.
autopairon, offonAutomatic pairs.
suggest_min1 to 102Letters typed before the popup appears.
line_numberson, offoffLine numbers.
show_invisibleson, offoffLine ends, tabs and trailing spaces shown.
wrapon, offoff; on for Markdown and textVisual wrapping.
formatoff, auto, a commandoffFormat on save.

Sections

  • [Language], such as [Python]: keys for that language, case insensitive.
  • [keys]: shortcuts, key = command.
  • [ai]: named models, name = command.