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
| Command | Keys | What it does | Id |
|---|---|---|---|
| Save | Ctrl+S | Writes the file to disk atomically, keeping its permissions. A buffer with no name is asked for one. | save |
| Save as | Alt+S | Saves the buffer under another name. | save_as |
| Save all | Alt+A | Saves every modified file. | save_all |
| Save without formatting | no key | Saves once, skipping the formatter. | save_no_format |
| Save with encoding | no key | Converts the file to another encoding and saves it. | save_encoding |
| Reopen with encoding | no key | Reads the file again in another encoding, when the detection got it wrong. | reopen_encoding |
| Format document | Alt+Shift+F | Runs the formatter of the language (key format) on the document, without saving, and says which one it used. | format |
| New file | Ctrl+N | Opens an empty buffer with no name. In the file browser it creates a file in the selected folder. | new_file |
| Open file | Ctrl+O | Opens a file. | open |
| Quick open | Ctrl+P | Fuzzy search among the files of the project. | quick_open |
| Recent files | Alt+Shift+P | Lists the files opened last, in any folder, and reopens one where its cursor was. | recent_files |
| Recover files | no key | Lists the copies left after a crash: Enter opens the file, Del discards the copy. | recover_files |
| Quit | Ctrl+Q | Quits, asking first if files are not saved. | quit |
Buffers and panes
| Command | Keys | What it does | Id |
|---|---|---|---|
| List buffers | Ctrl+E | Filterable list of the open buffers, with name and path. | buffers |
| Close buffer | Ctrl+W | Closes the buffer, asking first if it has unsaved changes. | close_buffer |
| Next buffer | Alt+. or Ctrl+PgDn | Goes to the next buffer. | next_buffer |
| Previous buffer | Alt+, or Ctrl+PgUp | Goes to the previous buffer. | prev_buffer |
| Split pane vertically | Alt+\ | Splits the pane vertically. | split_v |
| Split pane horizontally | Alt+- | Splits the pane horizontally. | split_h |
| Resize panes | Alt+E | Enters resize mode: the arrow keys move the border. | resize_mode |
| Equalize panes | no key | Gives the panes the same size. | equalize_wins |
| Close pane | Alt+Q | Closes the active pane. | close_win |
| Next pane | Alt+O or Alt+Right or Ctrl+Tab | Moves to the next pane. | next_win |
| Previous pane | Alt+Left or Ctrl+Shift+Tab | Moves to the previous pane. | prev_win |
| Show/hide file browser | Ctrl+B | Shows or hides the file browser on the side. | toggle_tree |
Search and go to
| Command | Keys | What it does | Id |
|---|---|---|---|
| Find | Ctrl+F | Incremental search, with every match highlighted. | find |
| Replace | Ctrl+R | Replaces, asking at each match, also within the selection. | replace |
| Find in files | Alt+F | Searches the files of the project and lists the results. | find_files |
| Next match | F3 or Alt+N | Goes to the next match. | find_next |
| Previous match | Shift+F3 or Alt+P | Goes to the previous match. | find_prev |
| Go to line | Ctrl+G | Goes to a line, and to a column if you give one. | goto_line |
| Start of line | Home | Goes to the first non-blank character of the line, then to column 0. | line_start |
| End of line | End | Goes to the end of the line. | line_end |
| Start of file | Ctrl+Home | Goes to the start of the file. | file_start |
| End of file | Ctrl+End | Goes to the end of the file. | file_end |
| Go to symbol | Ctrl+T | Lists classes, functions, methods, properties and constants of the file and jumps to the one chosen. | symbols |
| Go to definition | F12 or Ctrl+click | Opens the definition of the name at the cursor, also in another file; Ctrl+click does it too. | goto_tag |
| Matching bracket | Alt+M | Jumps to the matching bracket. | match |
| Go back | Alt+Shift+Left | Goes back to where the last jump started. | jump_back |
| Go forward | Alt+Shift+Right | Goes forward again in the history of the jumps. | jump_forward |
Edit
| Command | Keys | What it does | Id |
|---|---|---|---|
| Undo | Ctrl+Z | Undoes the last change; the history is unlimited. | undo |
| Redo | Ctrl+Y | Redoes the change undone. | redo |
| Select all | Ctrl+A | Selects the whole text. | select_all |
| Select line | Alt+L | Selects the line. | select_line |
| Select word | Alt+W | Selects the word. | select_word |
| Select to line start | Shift+Home | Extends the selection to the start of the line. | select_home |
| Select to line end | Shift+End | Extends the selection to the end of the line. | select_end |
| Copy | Ctrl+C | Copies the selection, or the whole line when there is none. | copy |
| Cut | Ctrl+X | Cuts the selection, or the whole line when there is none. | cut |
| Paste | Ctrl+V | Pastes, also text copied in another application where the system clipboard allows it. | paste |
| Paste previous entry | Alt+V | Pastes the previous entry of the clipboard history instead. | paste_older |
| Clipboard history | Alt+Shift+V | The last 32 copies, filterable: Enter pastes, Del removes the entry. | clip_history |
| Clear clipboard history | no key | Removes every entry of the clipboard history. | clip_clear |
| Delete lines | Ctrl+K | Deletes the line, or the selected lines. | delete_lines |
| Join lines | Ctrl+J | Joins the lines. | join_lines |
| Delete previous word | Ctrl+Backspace or Alt+Backspace | Deletes the word before the cursor; at the edge of a line, joins the lines. | delete_word_left |
| Delete next word | Ctrl+Del | Deletes the word after the cursor. | delete_word_right |
| Upper case | Alt+Shift+U | Turns the selection or the word to upper case. | upper_case |
| Lower case | Alt+Shift+L | Turns the selection or the word to lower case. | lower_case |
| Capitalize words | no key | Gives each word an upper case initial. | title_case |
| Move line up | Alt+Up | Moves the line, or the selected lines, up. | move_up |
| Move line down | Alt+Down | Moves the line, or the selected lines, down. | move_down |
| Duplicate line above | no key | Duplicates the line above. | duplicate_up |
| Duplicate line below | Alt+Y | Duplicates the line below. | duplicate_down |
| Toggle comment | Alt+/ | Comments or uncomments the line or selection, as the language does. | comment |
| Filter through a command | Alt+K | Sends the selection to an external command and replaces it with the output. | filter |
| Insert snippet | no key | Lists the snippets and inserts the one chosen; a selection becomes $TM_SELECTED_TEXT. | snippet_insert |
| Snippet from selection | no key | Adds the selected text to your snippets, under a name. | snippet_from_selection |
| Edit snippets | no key | Opens the snippet file of a language, yours or the project's. | snippet_edit |
| Copy a built-in snippet | no key | Copies a built-in snippet into yours, so you can change it. | snippet_copy |
| Record macro | F9 | Starts recording the keys; again to stop. | macro_record |
| Play macro | Shift+F9 | Plays the macro back from the cursor. | macro_play |
| Play macro several times… | no key | Asks 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 line | no key | Runs the macro from the start of each selected line. | macro_lines |
| Save macro… | no key | Keeps the macro under a name. | macro_save |
| Macros… | no key | Lists the macros kept: Enter plays one, Del deletes it. | macro_list |
| Convert indentation to spaces | no key | Converts the indentation of the document to spaces. | indent_to_spaces |
| Convert indentation to tabs | no key | Converts the indentation of the document to tabs. | indent_to_tabs |
Cursors and blocks
| Command | Keys | What it does | Id |
|---|---|---|---|
| Add cursor at next occurrence | Ctrl+D | Adds a cursor at the next occurrence of the word. | cursor_next |
| Add cursors at all occurrences | Alt+D | Adds a cursor at every occurrence. | cursor_all |
| Add cursor above | Alt+Shift+Up | Adds a cursor on the line above. | cursor_above |
| Add cursor below | Alt+Shift+Down | Adds a cursor on the line below. | cursor_below |
| Fold/unfold block | Alt+Z | Folds or unfolds the block, by brackets or indentation. | fold |
| Fold all | no key | Folds every block. | fold_all |
| Unfold all | no key | Unfolds every block. | unfold_all |
Run
| Command | Keys | What it does | Id |
|---|---|---|---|
| Run command | Alt+R | Runs a shell command and shows its output in a pane. | run |
| Repeat last command | F5 | Runs the last command again. | run_again |
| Stop command | Shift+F5 | Stops the running command. | run_stop |
| Next error | F8 | Jumps to the next error in the output. | next_error |
| Previous error | Shift+F8 | Jumps to the previous error. | prev_error |
| Refresh Git markers | no key | Reads the Git markers of the margin again. | git_refresh |
| Who changed this line (Git blame) | Alt+Shift+B | Shows commit, author, date and subject of the last change to the line. | git_blame |
| Compare with the last commit (Git) | Alt+Shift+D | Opens the differences of the buffer, also unsaved, from the last commit. | git_diff |
AI
| Command | Keys | What it does | Id |
|---|---|---|---|
| Change with the AI… | F2 | Ask for a change to the selection or to the function at the cursor; it comes as differences to apply or discard. | ai_ask |
| AI chat | Shift+F2 | Opens or closes the pane of the conversation with the AI. | ai_chat |
| Explain with the AI | no key | Sends the selection or the function at the cursor to the chat to be explained. | ai_explain |
| Document with the AI | no key | Proposes documentation comments in the style of the language. | ai_document |
| Fix the error with the AI | no key | Asks to fix the last error reached with F8. | ai_fix |
| New AI chat | no key | Forgets the conversation and starts a new one. | ai_new_chat |
| Stop the AI | no key | Stops the answer in progress. | ai_stop |
| AI model… | no key | Chooses, adds, changes or removes the models of the [ai] section. | ai_model |
| AI chat beside the textoff by default | F4 | Moves the open chat beside the text or back below it (key ai_chat). | ai_chat_side |
Other
| Command | Keys | What it does | Id |
|---|---|---|---|
| Help | F1 | Opens the help page, with commands, current shortcuts and files used. | help |
| About xted | no key | Shows version and credits. | about |
| Check JSON | no key | Moves the cursor to the first JSON error and says what it is. | json_check |
| Format JSON | no key | Rewrites the JSON one key per line, with the indentation of the file. | json_format |
| Compact JSON | no key | Puts the JSON on one line. | json_compact |
| Command palette | Alt+X | Opens the palette with every command. | palette |
| Menu bar: open | F10 | Opens the menu bar on the menu used last. | menu |
| Redraw screen | Ctrl+L | Redraws the screen. | redraw |
Markdown
| Command | Keys | What it does | Id |
|---|---|---|---|
| Markdown preview | Alt+U | Opens or closes the rendered preview of the Markdown document. | md_preview |
| Bold | Alt+B | Wraps in **, or removes the bold. | md_bold |
| Italic | Alt+I | Wraps in *, or removes the italic. | md_italic |
| Code | Alt+C | Inline code; on several lines, a fenced block. | md_code |
| Link | Ctrl+U | Inserts [selection](url) with url selected to be typed over. | md_link |
| Bulleted list | Alt+H | Turns the lines into a bulleted list, or back. | md_list |
| Heading 1 | Alt+1 | Makes the lines a level 1 heading. | md_h1 |
| Heading 2 | Alt+2 | Makes the lines a level 2 heading. | md_h2 |
| Heading 3 | Alt+3 | Makes the lines a level 3 heading. | md_h3 |
| Heading 4 | Alt+4 | Makes the lines a level 4 heading. | md_h4 |
| Heading 5 | Alt+5 | Makes the lines a level 5 heading. | md_h5 |
| Heading 6 | Alt+6 | Makes the lines a level 6 heading. | md_h6 |
| Normal text | Alt+0 | Removes the heading from the lines. | md_h0 |
Settings
| Command | Keys | What it does | Id |
|---|---|---|---|
| Toggle mouseon by default | no key | Uses or ignores the mouse. | toggle_mouse |
| Toggle autosuggeston by default | no key | Shows or hides the suggestions while you type. | toggle_autosuggest |
| Toggle auto-pairson by default | no key | Inserts or not the closing brackets and quotes. | toggle_autopair |
| Line numbersoff by default | Alt+G | Shows line numbers in the margin. | toggle_numbers |
| Overwrite modeoff by default | Ins | Typed characters go over the ones under the cursor; for the session. | toggle_overwrite |
| Wrap long linesoff by default | Alt+Shift+Z | Continues lines wider than the pane on the rows below; on for Markdown and plain text. | toggle_wrap |
| Show invisible charactersoff by default | Alt+J | Shows line ends, tabs and trailing spaces. | toggle_invisibles |
| Toggle Git markerson by default | no key | Shows or hides the Git markers in the margin. | toggle_git |
| Current function in the status baron by default | no key | Shows which class or function the cursor is in. | toggle_scope |
| Menu baron by default | no key | Shows or hides the menu bar at the top. | toggle_menubar |
| Crash recovery copieson by default | no key | Writes or not the copies for recovery after a crash. | toggle_recover |
| Toggle system clipboardon by default | no key | Sends copies to the system clipboard too, or not. | toggle_clipboard |
| Indentation: tab | no key | Indents with tabs. | indent_tabs |
| Indentation: 2 spaces | no key | Indents with 2 spaces. | indent_spaces_2 |
| Indentation: 4 spaces | no key | Indents with 4 spaces. | indent_spaces_4 |
| Indentation: 8 spaces | no key | Indents with 8 spaces. | indent_spaces_8 |
| Detect indentation style | no key | Detects from the text whether the file uses tabs or spaces. | indent_detect |
| Change themedefault value: dark | Alt+T | Opens the list of themes, previewing the highlighted one. | theme |
| Edit theme | no key | Edits the colors of the theme live and saves the result. | theme_edit |
| Colorsdefault value: auto | no key | Chooses the colors: auto, truecolor, 256, 16 or none. | colors |
| Glyphsdefault value: unicode | no key | Chooses the symbols of the interface: unicode, windows or ascii. | glyphs |
| Key bardefault value: message | no key | Chooses where the keys of the context go: message row, their own row or hidden. | keybar |
| Languagedefault value: auto | no key | Switches to the next interface language. | language |
| Keyboard shortcuts… | no key | Lists and changes the shortcuts, writing them to the configuration. | keyboard_shortcuts |
| Save settings… | no key | Writes your choices to the user file, to .xted or to .editorconfig. | save_settings |
Command line
| Command | What 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 directory | Opens the file browser on that directory. |
xted -h, --help | Prints a short help and exits. |
xted --version, -V | Prints 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
| Key | What it does |
|---|---|
| Alt+C | Case sensitivity. |
| Alt+W | Whole words only. |
| Alt+R | Regular expression (POSIX ERE; not on Windows). |
| Enter | Accept. |
| Esc | Cancel. |
| y n a Esc | While 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
| Key | What it does |
|---|---|
| Up Down | Choose the item. |
| Enter | Opens the palette; in the palette keeps the color. |
| Left Right | Change hue, saturation or lightness; with Shift in bigger steps. |
| Tab | Chooses which of the three to change. |
| # | Types the color as #rrggbb. |
| Del | Takes the item back to its starting color. |
| Ctrl+Z | Undoes the last change. |
| Space | On the background, uses the terminal's own. |
| Ctrl+S | Saves the theme under a name. |
| Esc | Leaves 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.
| Key | Result |
|---|---|
| Alt+U | Preview in a pane beside. |
| Alt+B | Bold **…** |
| Alt+I | Italic *…* |
| Alt+C | Inline code; on several lines a ``` block |
| Ctrl+U | Link [selection](url) |
| Alt+1 … Alt+6 | Heading, level 1 to 6 |
| Alt+0 | Removes the heading |
| Alt+H | Bulleted list, or removes it |
Mouse
| Action | What it does |
|---|---|
| Click, double click, triple click | Cursor, word, line. |
| Drag | Selects; on the borders of panes and browser, resizes. |
| Wheel | Scrolls. |
| Alt+click | Adds a cursor. |
| Ctrl+click | Goes to the definition of the name. |
| Click on menus, tabs, lists, key bar | Same as the matching key. |
| Click on a line number | Selects the line; dragging, several lines. |
| Click on the encoding in the status bar | Saves 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
| Key | Values | Default | What it does |
|---|---|---|---|
theme | a built-in theme or yours | dark | Color theme. |
language | auto, en, it, a catalog code | auto | Interface language. |
mouse | on, off | on | Use of the mouse. |
menubar | on, off | on | Menu bar. |
keybar | message, line, off | message | Where the keys of the context go. |
colors | auto, truecolor, 256, 16, none | auto | Terminal colors. |
glyphs | unicode, windows, ascii | unicode | Interface symbols. |
git | on, off | on | Git markers in the margin. |
clipboard | on, off | on | Copies also go to the system clipboard. |
current_function | on, off | on | Current function in the status bar. |
single_instance | on, off | on | The first xted receives the files of --remote and --desktop. |
keep_unsaved | on, off | on | Unnamed buffers kept between sessions. |
recover | on, off | on | Copies for crash recovery. |
recent_files | on, off | on | List of recent files. |
terminal | a command, e.g. kitty | chosen by xted | Terminal opened by the icon and "Open with". |
ai | a command or a name from [ai] | none | AI program; user file only. |
ai_context | a number of lines | 2000 | Most lines of the file sent to the AI. |
ai_chat | below, side | below | Where 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.
| Key | Values | Default | What it does |
|---|---|---|---|
tab_width | 1 to 16 | 8 | Width of a tab. |
indent_width | 1 to 16 | as tab_width | Spaces of one level. |
expand_tab | on, off | off | Tab inserts spaces. |
trim_trailing_space | on, off | off | Removes trailing spaces on save. |
final_newline | keep, always | keep | Newline at end of file. |
autosuggest | on, off | on | Suggestions while typing. |
autopair | on, off | on | Automatic pairs. |
suggest_min | 1 to 10 | 2 | Letters typed before the popup appears. |
line_numbers | on, off | off | Line numbers. |
show_invisibles | on, off | off | Line ends, tabs and trailing spaces shown. |
wrap | on, off | off; on for Markdown and text | Visual wrapping. |
format | off, auto, a command | off | Format on save. |
Sections
[Language], such as[Python]: keys for that language, case insensitive.[keys]: shortcuts,key = command.[ai]: named models,name = command.