YAZI-CONFIG(1)

πŸ“¦ version 26.9.1, in nixos 26.05, nixpkgs unstable

✨ NAME ✨

yazi-config β€” the config bible for the yazi terminal file manager, live from the General Commands Manual πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

bestie, this is where you learn how to make yazi look and act exactly how you want. configuration options for the yazi terminal file manager. There are three config files in total:

  • yazi.toml β€” General Configuration.
  • keymap.toml β€” Keybindings Configuration.
  • theme.toml β€” Color scheme Configuration.

You can find the default configuration files on the latest tag https://github.com/sxyazi/yazi/tree/latest/yazi-config/preset πŸ”—

To override any of the defaults, begin by creating the corresponding file at:

  • ~/.config/yazi/ on Unix-like systems.
  • C:\Users\USERNAME\AppData\Roaming\yazi\config\ on Windows.

so yes, you literally just make the file and yazi's like "say less" 🫢


πŸ¦‹ CONFIGURATION MIXING πŸ¦‹

The options from your configuration file will be used to override the default. However, for key bindings, if you don't want to override the default directly:

# keymap.toml
[manager]
keymap = [
  # ...
]

and instead want to customize your keys upon the default, you can use prepend_* or append_* directories to prepend or append them to the default ✨

# keymap.toml
[manager]
prepend_keymap = [
  # ...
]
append_keymap = [
  # ...
]

They are also available for open, icon, previewer, and preloader rules πŸ‘‘

ngl this is the iconic way to do it β€” you keep all the default vibes and just sprinkle yours on top, no cap πŸ’–

🌸 CUSTOM CONFIG DIRECTORY 🌸

You can change the Yazi configuration directory by exporting the YAZI_CONFIG_HOME environment variable. For example:

env "YAZI_CONFIG_HOME=~/.config/yazi-alt" yazi

will start Yazi with ~/.config/yazi-alt as the configuration directory, and can have its own yazi.toml , keymap.toml , init.lua , etc. files within it. like, a whole separate personality for yazi, obsessed πŸ˜­πŸ’œ


πŸ”₯ GENERAL CONFIG (yazi.toml) πŸ”₯

⭐ [manager] ⭐

  • ratio β€” Manage layout by ratio, 3-element array.
    • [1,4,3] β€” 1/8 width for parent, 4/8 width for current, 3/8 width for preview
  • sort_by β€” File sorting method. your options are:
    • "none" β€” Don't sort
    • "modified" β€” Sort by last modified time
    • "created" β€” Sort by creation time (Due to a Rust bug, this is not available at the moment)
    • "extension" β€” Sort by file extension
    • "alphabetical" β€” Sort alphabetically, e.g. 1.md < 10.md < 2.md
    • "natural" β€” Sort naturally, e.g. 1.md < 2.md < 10.md
    • "size" β€” Sort by file size
  • sort_sensitive β€” Sort case-sensitively.
    • "true" β€” Case-sensitive
    • "false" β€” Sort by last modified time
yes, that's genuinely what the "false" line says 😭 keeping it 100% faithful because that's what's written, periodt.
  • sort_reverse β€” Display files in reverse order.
    • "true" β€” Reverse order
    • "false" β€” Normal order
  • sort_dir_first β€” Display directories first.
    • "true" β€” Directories first
    • "false" β€” Respects sort_by and sort_reverse only
  • sort_translit β€” Transliterate filenames for sorting (i.e. replaces Γ‚ as A, Γ† as AE, etc.), only available if sort_by = "natural".

This is useful for files that contain Hungarian characters. (Currently requires nightly builds) 🌈

  • "true" β€” Enabled
  • "false" β€” Disabled
  • linemode β€” Display information associated with the file on the right side of the file list row.
    • "none" β€” No line mode.
    • "size" β€” Display the size in bytes of the file. Since file sizes are only evaluated when sorting by size, it only works after sort_by = "size" set, and this behavior might change in the future.
    • "permissions" β€” Display the permissions of the file, only available on Unix-like systems.
    • "mtime" β€” Display the last modified time of the file.
    • "owner" β€” Display the owner of the file, only available on Unix-like systems. (Nightly version of Yazi required atm)
  • show_hidden β€” Show hidden files
    • "true" β€” Show
    • "false" β€” Do not show
  • show_symlink β€” Show the path of the symlink file point to, after the filename.
    • "true" β€” Show
    • "false" β€” Do not show
  • scrolloff β€” The number of files to keep above and below the cursor when moving through the file list.

If the value is larger than half the screen height (e.g. 200), the cursor will be centered. 🎯

  • mouse_events β€” Array of strings, the types of mouse events can be received by the plugin system, available values:
    • "true" β€” Show
    • "false" β€” Do not show
    • "click" β€” Mouse click
    • "scroll" β€” Mouse vertical scroll
    • "touch" β€” Mouse horizontal scroll
    • "move" β€” Mouse move
    • "drag" β€” Mouse drag (Some terminals do not support this)
  • mouse_events β€” Array of strings, the types of mouse events can be received by the plugin system, available values:
    • "true" β€” Show
    • "false" β€” Do not show
    • "click" β€” Mouse click
    • "scroll" β€” Mouse vertical scroll
    • "touch" β€” Mouse horizontal scroll
    • "move" β€” Mouse move
    • "drag" β€” Mouse drag (Some terminals do not support this)
not me listing mouse_events twice πŸ’€ the original literally has it twice, so here it is twice. we don't skip, we don't merge, we stay faithful fr fr 🫢

🧚 [preview] 🧚

  • tab_size β€” Tab width.
  • max_width β€” Maximum preview width for images. Run a yazi --clear-cache to take effect after changing this.

This value is also used for preloading images; the larger it is, the larger the image cache generated, which consumes more CPU. πŸ”₯

  • max_height β€” Maximum preview height for images. Run a yazi --clear-cache to take effect after changing this.

This value is also used for preloading images; the larger it is, the larger the image cache generated, which consumes more CPU. πŸ”₯

  • cache_dir β€” The system cache directory is used by default, and the cached files will go away on a reboot automatically.

If you want to make it more persistent, you can specify the cache directory manually as an absolute path. πŸ’Ύ

  • image_filter β€” The filter used on image downscaling, available values:
    • "nearest" β€” Nearest Neighbor
    • "triangle" β€” Linear Triangle
    • "catmull-rom" β€” Catmull-Rom
    • "lanczos3" β€” Lanczos with window 3

They are arranged in order from fast to slow, and from poor to good quality β€” Lanczos3 provides the highest quality but is also the slowest. βš–οΈ

  • image_quality β€” Quality on pre-caching images, range 50-90.

The larger value, the better image quality, but slower with more CPU consumption, and generates larger cache files that occupy more storage space. so like, gorgeous but expensive πŸ’…

  • sixel_fraction β€” Sixel is a very old image format that only supports 256 colors. For better image preview, Yazi trains a neural network for each image to find the most representative colors. 🧠✨

This value determines the number of samples used during the training, range 10-20. A smaller value produces better results but is also slower.

  • ueberzug_scale / ueberzug_offset
    • ueberzug_scale (Float): Ueberzug image scaling ratio, scale>1 for enlargement, scale<1 for reduction. For example, 0.5 indicates a reduction to half.
    • ueberzug_offset ([x, y, width, height]): Ueberzug image offset, in cell units. For example, [0.5, 0.5, -0.5, -0.5] indicates that the image is offset by half a cell in both directions, and the width and height are reduced by half a cell.

This is useful for solving a bug of Überzug++ image size calculation. πŸ›

If your monitor has a 2.0 scale factor, and is running on Wayland under Hyprland, you may need to set ueberzug_scale: 0.5, and adjust the value of ueberzug_offset according to your case, to offset this issue.


πŸ‘‘ [opener] πŸ‘‘

[opener]
edit = [
  { run = 'nvim "$@"', block = true },
]
play = [
  { run = 'mpv "$@"', orphan = true, for = "unix" },
]
open = [
  { run = 'xdg-open "$@"', desc = "Open" },
]
# ...

Available options are as follows:

  • run β€” The command to open the selected files, with the following variables available:
    • $n (Unix) / %n (Windows): The N-th selected file, starting from 1. e.g. $2 represents the second selected file.
    • $@ (Unix) / %* (Windows): All selected files, i.e. $1, $2, ..., $n.
    • $0 (Unix) / %0 (Windows): The hovered file.
  • block β€” Open in a blocking manner. After setting this, Yazi will hide into a secondary screen and display the program on the main screen until it exits. During this time, it can receive I/O signals, which is useful for interactive programs. πŸ–₯️
  • orphan β€” Keep the process running even if Yazi has exited, once specified, the process will be detached from the task scheduling system. πŸ•ŠοΈ
  • desc β€” Description of the opener, display in interactive components, such as "Open with" and help menu.
  • for β€” The opener is only available on this system; if not specified, it's available on all systems. Available values:
    • unix β€” Linux and macOS
    • windows β€” Windows
    • linux β€” Linux
    • macos β€” macOS

[open] β€” rules for opening files, periodt πŸ’…

This is where you tell Yazi how to open specific files. You can prepend or append rules to the defaults through prepend_rules and append_rules (see Configuration mixing for the deets, bestie):

[open]
prepend_rules = [
  { name = "*.json", use = "edit" },
  # Multiple openers for a single rule
  { name = "*.html", use = [ "open", "edit" ] },
]
append_rules = [
  { name = "*", use = "my-fallback" },
]

If your append_rules contains wildcard rules, they will always take precedence over the default wildcard rules as the fallback (currently requires nightly builds).

Heads up, bestie: that wildcard fallback thing is a nightly-builds situation right now. Don't come for me if stable acts different πŸ’€

Or, use rules to rewrite the entire default rules:

[open]
rules = [
  { mime = "text/*", use = "edit" },
  { mime = "video/*", use = "play" },

  # { mime = "application/json", use = "edit" },
  { name = "*.json", use = "edit" },

  # Multiple openers for a single rule
  { name = "*.html", use = [ "open", "edit" ] },
]

Available rule options are as follows:

  • name β€” glob expression for matching the file name. Case insensitive by default; add to the beginning to make it sensitive.
  • mime β€” glob expression for matching the mime-type. Case insensitive by default; add to the beginning to make it sensitive.
  • use β€” opener name corresponding to the names in the [opener] section.

With that:

  • If you're using the default mime-type preloader, it retrieves the mime-type of a file through the file -bL --mime-type /path/to/file command.
  • If use is an array containing multiple openers, all commands in these openers will be merged. open will run the first of these commands; open --interactive will list all of these commands in the "open with" menu.

[tasks] β€” task-manager vibes 🧚

  • micro_workers β€” maximum number of concurrent micro-tasks.
  • macro_workers β€” maximum number of concurrent macro-tasks.
  • bizarre_retry β€” maximum number of retries when a bizarre failure occurs.
  • suppress_preload β€” exclude the preload tasks created by the system from the task list, do not report their progress, and do not consider them on app exit confirming.
  • image_alloc β€” maximum memory allocation limit in bytes for decoding a single image, 0 for unlimited.
  • image_bound β€” an array of [width, height], maximum image size (in pixels) for decoding a single image, and 0 for unlimited.

[plugin] β€” plugins, previewers, preloaders, the whole cute little ecosystem πŸ¦‹

previewers (prepend_previewers & append_previewers)

You can prepend or append new preview rules to the default previewers under [plugin] by prepend_previewers and append_previewers. See Configuration mixing for details. Here are the available options for a single rule:

  • name (String) β€” glob expression for matching the file name. Case insensitive by default; add \s to the beginning to make it sensitive.
  • mime (String) β€” glob expression for matching the mime-type. Case insensitive by default; add \s to the beginning to make it sensitive.
  • run (String) β€” the name of the Lua plugin to be ran.
  • sync (Boolean) β€” whether to run in the sync context, default is false.
[plugin]
prepend_previewers = [
  # HEIC previewer
  { mime = "image/heic", run = "heic" },
]

append_previewers = [
  # My fallback previewer
  { name = "*" , run = "binary" },
]

If your append_previewers contains wildcard name rules ("*" or "*/"), they will always take precedence over the default wildcard rules as the fallback.

Yazi comes with these previewer plugins:

  • folder β€” bridge between the Yazi file system and the preview
  • code β€” bridge between built-in code highlighting and the preview, providing async concurrent rendering
  • json β€” bridge between jq and the preview, providing async concurrent rendering
  • noop β€” no operation
  • image β€” presentation layer of built-in image preview, offering mixed preview capabilities
  • video β€” bridge between ffmpegthumbnailer and the preview, offering mixed preview capabilities
  • pdf β€” bridge between pdftoppm and the preview, offering mixed preview capabilities
  • archive β€” bridge between unar and the preview, offering mixed preview and concurrent rendering capabilities

If you want to create your own previewer, see Previewer API (https://yazi-rs.github.io/docs/plugins/overview#previewer).

preloaders (prepend_preloaders & append_preloaders)

You can prepend or append new preview rules to the default preloaders under [plugin] by prepend_preloaders and append_preloaders. See Configuration mixing for details. Here are the available options for a single rule:

  • name (String) β€” glob expression for matching the file name. Case insensitive by default; add \s to the beginning to make it sensitive.
  • mime (String) β€” glob expression for matching the mime-type. Case insensitive by default; add \s to the beginning to make it sensitive.
  • cond (String) β€” conditional expression. Only rules that meet this condition and satisfy either the name or mime will be applied. For example, A & B means A and B, and A | !B means A or not B. Here are the available factors:
    • mime β€” this file has a mime-type.
  • run (String) β€” the name of the Lua plugin to be ran.
  • multi (Boolean) β€” whether to preload multiple files at once.
  • prio (String) β€” preload priority, low, normal or high. The default is normal if not specified.
[plugin]
prepend_preloaders = [
  # HEIC preloader
  { mime = "image/heic", run = "heic" },
]

Yazi comes with these preloader plugins:

  • mime β€” preloads mime-type of files in chunks
  • noop β€” no operation
  • image β€” preloads and caches images
  • video β€” preloads and caches videos
  • pdf β€” preloads and caches PDFs.

If you want to create your own preloader, see Preloader API (https://yazi-rs.github.io/docs/plugins/overview#preloader).


[input] β€” input boxes, but make them cute πŸŽ€

You can customize the title and position of each input. As for position, it consists of two parts: Origin and Offset.

The origin is the top-left corner of the input, and the offset is the increment from this origin. Together, they determine the area of the input on the screen.

Origin

For the origin, the following values are available:

  • top-left
  • top-center
  • top-right
  • bottom-left
  • bottom-center
  • bottom-right
  • center
  • hovered (the cursor position of hovered file)

Offset

As for the offset, it's a 4-element tuple: (x, y, width, height).

Placeholder

Some inputs have special placeholders that will be replaced with actual content on display:

  • trash_title: String
    • {n}: Number of files to be trashed
    • {s}: "s" if n > 1, otherwise ""
  • delete_title: String
    • {n}: Number of files to be deleted
    • {s}: "s" if n > 1, otherwise ""
  • find_title: [String, String]

It's a tuple of 2-element: first for "Find next", second for "Find previous".

  • search_title: String
    • {n}: Name of the current search engine
  • shell_title: [String, String]

It's a tuple of 2-element: first for "Non-blocking shell", second for "Blocking shell".

  • quit_title: String
    • {n}: Number of tasks are running
    • {s}: "s" if n > 1, otherwise ""

[select] β€” same energy as [input] ✨

Same as the [input] section.


[which] β€” the which-key menu, sorted and slaying πŸ”₯

  • sort_by β€” candidate sorting method.
    • "none" β€” don't sort
    • "key" β€” sort by key
    • "desc" β€” sort by description
  • sort_sensitive β€” sort case-sensitively.
    • "true" β€” case-sensitive
    • "false" β€” sort by last modified time
  • sort_reverse β€” display files in reverse order.
    • "true" β€” reverse order
    • "false" β€” normal order

KEYBINDINGS CONFIGURATION (keymap.toml) πŸ”‘

[manager]

  • escape β€” cancel find, exit visual mode, clear selected, cancel filter, or cancel search.
  • --all β€” do all of the below, all at once, the whole sweep πŸ’…
  • --find β€” cancel find
  • --visual β€” exit visual mode
  • --select β€” clear selected
  • --filter β€” cancel filter
  • --search β€” cancel search

By default it just auto-detects what you probably meant (main character energy tbh), and it'll only run the specific operation once you actually name the option β€” and yes bestie, you can stack multiple options together. Slay.

quit

Exit the process. That's it, that's the whole vibe. πŸšͺπŸ’¨

  • --no-cwd-file β€” don't write the current directory to the cwd-file

close

Close the current tab β€” but if it's the last tab, it exits the process instead. So it's giving "one more won't hurt" until it literally does 😭

arrow

  • [n] / [n%] β€” move the cursor up or down by n or n% lines. Negative values move up, positive values move down. Yes, percentages are a thing, we love a flexible queen ✨

leave

Go back to the parent directory of the hovered file β€” or, if nothing's hovered, the parent of the current working directory. Basically "take me up a level, idk where" 🫢

enter

Enter the child directory. Go πŸ‘ in πŸ‘ side πŸ‘ the πŸ‘ folder.

back

Go back to the previous directory.

forward

Go forward to the next directory. The duality of back and forward, we stan a pair of icons 🌈

seek

Scroll the contents in the preview panel.

  • [n] β€” negative values seek up, positive values seek down
Heads up: the default scroll keys are Alt + j and Alt + k, so make sure your terminal actually supports Alt key combos β€” or just change them in your keymap.toml, your call πŸ’…

cd

Change the current directory.

  • [path] β€” the path to change to
  • --interactive β€” use an interactive UI to input the path (for when you want the app to hold your hand, no judgement πŸ’–)

reveal

Change the current directory to the parent of the specified file, and hover on it. Like a little spotlight moment for one specific file πŸŽ€

  • [path] β€” the path to reveal

select

  • --state=true β€” select the current file
  • --state=false β€” deselect the current file
  • --state=none β€” default, toggle the selection state of the current file

select_all

Select all files in the current working directory.

  • --state=true β€” select all files
  • --state=false β€” deselect all files
  • --state=none β€” default, toggle the selection state of all files
Ngl this one trips people up: --state=false will deselect all files in the current working directory only.

So if you've got files selected across multiple directories and you want to nuke the whole selection, use escape --select instead. Different tool, different job 🧚

visual_mode

Enter visual mode (selection mode). Main character selection era πŸ‘‘

  • --unset β€” enter visual mode (unset mode)

open

Open the selected files using the rules in [open]. Your very own "idk, you pick" button for opening stuff πŸ”₯

  • --interactive β€” open the hovered/selected file(s) with an interactive UI to choose the opening method
  • --hovered β€” always open the hovered file regardless of the selection state

yank

Yank the selected files. Copied, bestie, it's in the clipboard of destiny ✨

  • --cut β€” cut the selected files

unyank

Cancel the yank status of files. Never mind, un-copied πŸ™ˆ

paste

Paste the yanked files.

  • --force β€” if the destination file already exists, overwrite it. no questions, no mercy πŸ’…
  • --follow β€” copy the file that a symbolic link points to, instead of the link itself. heads up: this only works during copying, bestie.

makes a symbolic link to whatever files you've yanked. and yeah, on Windows this is a privileged action β€” you gotta be running as an administrator or it's simply not happening, periodt.

  • --relative β€” use a relative path for the symbolic link.
  • --force β€” overwrite the destination file if it's already there.

remove πŸ—‘οΈ

moves your files to the trash/recycle bin on macOS/Windows. on Linux it follows The FreeDesktop.org Trash specification β€” the spec lives at https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html, iykyk.

tiny lil Android caveat: on the Android platform you can only use this with the --permanently option, because Android straight up doesn't have the concept of a trash bin. it's giving "no bin, no problem" 😭
  • --force β€” don't show the confirmation dialog, just trash/delete the files directly.
  • --permanently β€” permanently delete the files. they're gone-gone, fr fr.
  • --hovered β€” always remove the hovered file regardless of the selection state. (Nightly version of Yazi is required ATM)

create ✨

creates a file or a directory. the trick? end the name with / (Unix) or \ (Windows) and you get a directory. iconic behaviour tbh.

  • --force β€” overwrite the destination file directly if it exists, without showing the confirmation dialog.

rename πŸ¦‹

renames a file or directory β€” or does a bulk rename if multiple files are selected ($EDITOR is used to edit the filenames by default). chef's kiss 🌸

  • --hovered: always rename the hovered file regardless of the selection state. (Nightly version of Yazi is required ATM)
  • --force: overwrite the destination file directly if it exists, without showing the confirmation dialog.
  • --empty: empty a part of the filename. pick your fighter:
    • "stem": empty the stem. e.g. "foo.jpg" -> ".jpg".
    • "ext": empty the extension. e.g. "foo.jpg" -> "foo.".
    • "dot_ext": empty the dot and extension. e.g. "foo.jpg" -> "foo".
    • "all": empty the whole filename. e.g. "foo.jpg" -> "".
  • --cursor: specify the cursor position of the renaming input box.
    • "end": the end of the filename.
    • "start": the start of the filename.
    • "before_ext": before the extension of the filename.

you can also combo --cursor with --empty β€” for example, rename --empty=stem --cursor=start empties the file's stem and moves the cursor to the start. πŸ’«

which means the input box content for the filename foo.jpg becomes |.jpg, where | is the cursor position. so satisfying.


copy πŸ“‹

copies the path of the files or directories that are selected or hovered on. literally the easiest way to get a path into your clipboard-adjacent life.

  • path β€” copy the absolute path.
  • dirname β€” copy the path of the parent directory.
  • filename β€” copy the name of the file.
  • name_without_ext β€” copy the name of the file without the extension.

shell 🐚

runs a shell command. yes queen, go off.

  • [run] β€” optional, and it's the command template to be run.
  • --confirm β€” when the template is provided, run it directly, and no input UI is shown.
  • --block β€” open in a blocking manner. after you set this, Yazi hides into a secondary screen and displays the program on the main screen until it exits. during that time it can receive I/O signals, which is highkey useful for interactive programs.
  • --orphan β€” keep the process running even if Yazi has exited. once specified, the process gets detached from the task scheduling system. it's giving main character energy, living its own life 🧚

you can use the following shell variables in [run]:

  • $n (Unix) / %n (Windows): the N-th selected file, starting from 1. e.g. $2 represents the second selected file.
  • $@ (Unix) / %* (Windows): all selected files, i.e. $1, $2, ..., $n.
  • $0 (Unix) / %0 (Windows): the hovered file.

hidden πŸ™ˆ

sets the visibility of hidden files. do you see them or not, bestie.

  • show β€” show hidden files.
  • hide β€” hide hidden files.
  • toggle β€” default, toggles the hidden state.

linemode ⭐

set the line mode.

πŸŽ€ linemode arguments, bestie

So linemode takes one of these, and here's the whole menu:

  • none β€” no line mode at all, we're keeping it clean ✨
  • size β€” shows the file size in bytes. Heads up tho: file sizes only get evaluated when you're sorting by size, so this only actually works after you've set sort_by = "size". And this behavior might change in the future β€” so don't get too attached πŸ’€
  • permissions β€” shows the file's permissions. Unix-like systems only, sorry Windows girlies 🫢
  • mtime β€” shows the last modified time. Obsessed with a timestamp, honestly πŸ•
  • owner β€” shows the file's owner. Unix-like systems only. (Nightly version of Yazi required atm πŸ‘‘)

And here's the fun part: you can also specify any 1 to 20 characters, and then extend it inside a UI plugin. Which literally means you can build your own linemode by just overriding the Folder:linemode method β€” main character energy fr fr:

https://github.com/sxyazi/yazi/blob/latest/yazi-plugin/preset/components/folder.lua


  • [engine] β€” the search engine, and your options are: fd, rg, none (which cancels the search βœ‹)
  • --args β€” extra arguments passed straight to the engine you picked. Like, for example, search fd --args='-e -H' πŸ’… (Nightly version of Yazi required atm)
Fun trick, iykyk: you can search with an empty keyword ("") via fd to get that flat view. It's giving everything, all at once 🌈

πŸ•΅οΈ find

  • [query] β€” optional! The query you're finding for. If you don't give one, an interactive UI pops up so you can type it in πŸŽ€
  • --previous β€” find the previous occurrence instead. Going backwards bestie ⬅️
  • --smart β€” smart-case finding, meaning it's case-sensitive if your query has uppercase characters, otherwise it's case-insensitive ✨
  • --insensitive β€” case-insensitive find, periodt.

🏹 find_arrow

Moves the cursor to the next or previous occurrence β€” that's it, that's the whole vibe.

  • --previous β€” move to the previous occurrence instead of the next one.

🧺 filter

  • [query] β€” optional, the query you're filtering for. Don't pass one and an interactive UI shows up so you can type it πŸ¦‹
  • --smart β€” smart-case filtering: case-sensitive if the query contains uppercase characters, otherwise case-insensitive, no cap.
  • --insensitive β€” case-insensitive filter, periodt.

πŸ—‚οΈ sort

  • [by] β€” optional. If you don't provide it, the sort method stays exactly as it was, unchanged πŸ’œ

The values you can pass to [by] are:

  • "none" β€” don't sort. Chaos. We love her πŸ™ˆ
  • "modified" β€” sort by last modified time.
  • "created" β€” sort by creation time. (Due to a Rust bug, this is not available at the moment, see sxyazi/yazi#356 and rust-lang/rust#108277 😭)
  • "extension" β€” sort by file extension.
  • "alphabetical" β€” sort alphabetically, e.g. 1.md < 10.md < 2.md
  • "natural" β€” sort naturally, e.g. 1.md < 2.md < 10.md πŸ‘‘
  • "size" β€” sort by file size.

And the flags:

  • --reverse β€” display files in reverse order. --reverse or --reverse=yes to reverse, --reverse=no to cancel it out πŸ”„
  • --dir-first β€” display directories first. --dir-first or --dir-first=yes to enable, --dir-first=no to cancel.
  • --translit β€” transliterate filenames for sorting, see sort_translit for the details. --translit or --translit=yes to enable, --translit=no to cancel 🌸

πŸ†• tab_create

  • [path] β€” optional, creates a new tab using the path you specify.
  • --current β€” optional, creates a new tab using the current path.
And if you specify neither [path] nor --current, it'll use the startup directory to create the tab. Default behavior stays winning ✨

❌ tab_close

  • [n] β€” closes the tab at position n, counting from 0. Zero-indexed babies, that's just how it is πŸ’…

πŸ”€ tab_switch

  • [n] β€” switches to the tab at position n, starting from 0.
  • --relative β€” switch to the tab at a position relative to the current tab. With this parameter, n can totally be negative β€” go backwards, girl πŸ¦‹

πŸ” tab_swap

Okay so back to that tab-swap command from the last bit β€” its arg table is literally:

  • [n] β€” swap the current tab with the tab at position n, where negative values move the tab forward, and positive values move it backward. tab gymnastics, periodt πŸ’…

Then the rest of the manager-side commands:

  • tasks_show β€” show the task manager. task-manager main character moment ✨
  • help β€” open the help menu. 🫢
  • plugin β€” see yazi-plugin (7).

[tasks] 🧚

  • close β€” hide the task manager.
  • arrow β€” move the cursor in the task manager:
    • -1 β€” move the cursor up 1 line.
    • 1 β€” move the cursor down 1 line.
  • inspect β€” inspect the task (press q to exit the inspect view). πŸ”
  • cancel β€” cancel the task. πŸ’€
  • help β€” open the help menu.
  • plugin β€” see yazi-plugin (7).

[select] πŸ’…

  • close β€” cancel selection.
    • --submit β€” submit the selection. βœ…
  • arrow β€” move the cursor around:
    • [n] β€” move the cursor up or down n lines. Negative value for up, positive value for down.
  • help β€” open the help menu.
  • plugin β€” see yazi-plugin (7).

[input] πŸŽ€

  • close β€” cancel input.
    • --submit β€” submit the input. 🫑
  • escape β€” go back to normal mode, or cancel input.
  • move β€” move the cursor left or right.
    • [n] β€” move the cursor n characters left or right. Negative value for left, positive value for right.
    • --in-operating β€” move the cursor only if it’s currently waiting for an operation.
  • backward β€” move back to the start of the current or previous word.
  • forward β€” move forward to the start of the next word.
    • --end-of-word β€” move forward to the end of the current or next word.
  • insert β€” enter insert mode. This command is only available in normal mode.
    • --append β€” insert after the cursor.
  • visual β€” enter visual mode. This command is only available in normal mode.
  • delete β€” delete the selected characters. This command is only available in normal mode.
    • --cut β€” cut the selected characters into clipboard, instead of only deleting them.
    • --insert β€” delete and enter insert mode.
  • yank β€” copy the selected characters. This command is only available in normal mode.
  • paste β€” paste the copied characters after the cursor. This command is only available in normal mode.
    • --before β€” paste the copied characters before the cursor.
  • undo β€” undo the last operation. This command is only available in normal mode.
  • redo β€” redo the last operation. This command is only available in normal mode.
  • help β€” open the help menu. This command is only available in normal mode.
  • backspace β€” delete the character before the cursor. This command is only available in insert mode.
    • --under β€” delete the character under the cursor.
  • kill β€” kill the specified range of characters. This command is only available in insert mode.

okay so the argument table continues, and it’s giving precision πŸ’…:

  • bol β€” Kill backwards to the BOL.
  • eol β€” Kill forwards to the EOL.
  • backward β€” Kill backwards to the start of the current word.
  • forward β€” Kill forwards to the end of the current word.
  • plugin β€” See yazi-plugin (7). This command is only available in insert mode.

πŸŽ€ [completion] πŸŽ€

  • close β€” Hide the completion menu.
    • --submit β€” Submit the completion.
  • close_input β€” Close the input box. Arguments are the same as [input] close.
  • arrow β€” takes [n]: Move the cursor up or down n lines. Negative value for up, positive value for down.
  • help β€” Open the help menu.
  • plugin β€” See yazi-plugin (7).

πŸ¦‹ [help] πŸ¦‹

  • close β€” Hide the help menu.
  • escape β€” Clear the filter, or hide the help menu.
  • arrow β€” takes [n]: Move the cursor up or down n lines. Negative value for up, positive value for down.
  • filter β€” Apply a filter for the help items.
  • plugin β€” See yazi-plugin (7).

🎨 COLOR SCHEME CONFIGURATION (theme.toml) πŸ’…

okay so if you want ready-made themes and you do not wanna build one yourself, go check out the yazi-rs/flavors repository at https://github.com/yazi-rs/flavors β€” it’s giving pre-made slay ✨

🌈 Types

🎨 Color

A color can be in Hex format with RGB values, like '#484D66'. Or it can be one of these 17 values, no cap:

  • reset
  • black
  • white
  • red
  • lightred
  • green
  • lightgreen
  • yellow
  • lightyellow
  • blue
  • lightblue
  • magenta
  • lightmagenta
  • cyan
  • lightcyan
  • gray
  • darkgray

πŸ’… Style

Style shows up in a format similar to '{ fg = "#e4e4e4", bg = "black", ... }', and it supports these properties:

  • fg (Color) β€” Foreground color πŸ’–
  • bg (Color) β€” Background color πŸŽ€
  • bold (Boolean) β€” Bold
  • dim (Boolean) β€” Dim (not supported by all terminals, heads up 🫢)
  • italic (Boolean) β€” Italic
  • underline (Boolean) β€” Underline
  • blink (Boolean) β€” Blink
  • blink_rapid (Boolean) β€” Rapid blink
  • reversed (Boolean) β€” Reversed foreground and background colors
  • hidden (Boolean) β€” Hidden
  • crossed (Boolean) β€” Crossed out

🌸 [flavor]

πŸ—‚οΈ [manager]

  • cwd (Style) β€” CWD text style.

πŸ’– Hovered

  • hovered (Style) β€” Hovered file style.
  • preview_hovered (Style) β€” Hovered file style, in the preview pane.

πŸ” Find: The find feature

  • find_keyword (Style) β€” Style of the highlighted portion in the filename.
  • find_position (Style) β€” Style of current file location in all found files to the right of the filename.

πŸŽ€ Marker: Color block on the left side separator line in the filename

  • marker_selected (Style) β€” Selected file marker style.
  • marker_copied (Style) β€” Copied file marker style.
  • marker_cut (Style) β€” Cut file marker style.

πŸ¦‹ Tab: Tab bar

  • tab_active (Style) β€” Active tab style.
  • tab_inactive (Style) β€” Inactive tab style.
  • tab_width (Number) β€” Tab maximum width. When set to a value greater than 2, the remaining space will be filled with the tab name, which is current directory name.

⭐ Border

  • border_symbol (String) β€” Border symbol. e.g. "β”‚".
  • border_style (Style) β€” Border style.

🧚 Highlighting: The built-in syntax highlighting feature

  • syntect_theme (String) β€” For example, "~/Downloads/Dracula.tmTheme". Only available in the user's theme.toml and cannot be used in flavor.toml.

Yazi's builtin code highlighting themes, which are paths to .tmTheme files. You can find them on GitHub using "tmTheme" as a keyword πŸ”₯

πŸ’œ [status]

  • separator_open (String) β€” Opening separator symbol. e.g. "[".
  • separator_close (String) β€” Closing separator symbol. e.g. "]".
  • separator_style (Style) β€” Separator style.

🌟 Mode

  • mode_normal (Style) β€” Normal mode style.
  • mode_select (Style) β€” Select mode style.
  • mode_unset (Style) β€” Unset mode style.

πŸ“ Progress

  • progress_label (Style) β€” Progress label style.
  • progress_normal (Style) β€” Style of the progress bar when it is not in an error state.
  • progress_error (Style) β€” Style of the progress bar when an error occurs.

πŸ” Permissions

  • permissions_t (Style) β€” File type.
  • permissions_r (Style) β€” Read permission.
  • permissions_w (Style) β€” Write permission.
  • permissions_x (Style) β€” Execute permission.
  • permissions_s (Style) β€” - separator.

🫢 [select]

  • border (Style) β€” Border style.
  • active (Style) β€” Selected item style.
  • inactive (Style) β€” Unselected item style.

πŸ’Œ [input]

  • border (Style) β€” Border style.
  • title (Style) β€” Title style.
  • value (Style) β€” Value style.
  • selected (Style) β€” Selected value style.

✨ [completion]

  • border (Style) β€” Border style.
  • active (Style) β€” Selected item style.
  • inactive (Style) β€” Unselected item style.

🌈 Icons

  • icon_file (String) β€” File icon.
  • icon_folder (String) β€” Folder icon.
  • icon_command (String) β€” Command icon.

πŸ› οΈ [tasks]

  • border (Style) β€” Border style.
  • title (Style) β€” Title style.
  • hovered (Style) β€” Hovered item style.
  • cols (Number) β€” Number of columns. The value can be 1, 2, 3.
  • mask (Style) β€” Mask style.
  • cand (Style) β€” Candidate key style.
  • rest (Style) β€” Rest key style.
  • desc (Style) β€” Description style.
  • separator (String) β€” Separator symbol. e.g. " -> ".
  • separator_style (Style) β€” Separator style.

πŸ’‘ [help]

  • on (Style) β€” Key column style.
  • run (Style) β€” Command column style.
  • desc (Style) β€” Description column style.
  • hovered (Style) β€” Hovered item style.
  • footer (Style) β€” Footer style.

🎨 [filetype]

Set file list item display styles for specific file types, supporting matching by name and mime-type:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ [filetype]                                   β”‚
β”‚ rules = [                                    β”‚
β”‚   # Images                                   β”‚
β”‚   { mime = "image/*", fg = "yellow" },       β”‚
β”‚                                              β”‚
β”‚   # Videos                                   β”‚
β”‚   { mime = "video/*", fg = "magenta" },      β”‚
β”‚   { mime = "audio/*", fg = "magenta" },      β”‚
β”‚                                              β”‚
β”‚   # Empty files                              β”‚
β”‚   { mime = "inode/x-empty", fg = "cyan" },   β”‚
β”‚                                              β”‚
β”‚   # Orphan symbolic links                    β”‚
β”‚   { name = "*", is = "orphan", fg = "red" }, β”‚
β”‚                                              β”‚
β”‚   # ...                                      β”‚
β”‚                                              β”‚
β”‚   # Fallback                                 β”‚
β”‚   # { name = "*", fg = "white" },            β”‚
β”‚   { name = "*/", fg = "blue" }               β”‚
β”‚ ]                                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each rule supports complete Style properties. There are two special rule:

name = "*"    matches all files.
name = "*/"   matches all directories.

You can restrict the specific type of files through is, noting that it must be used with either name or mime. It accepts the following values:

  • block β€” Block device
  • char β€” Char device
  • exec β€” Executable
  • fifo β€” FIFO
  • link β€” Symbolic link
  • orphan β€” Orphan symbolic link
  • sock β€” Socket
  • sticky β€” File with sticky bit set

πŸ–ΌοΈ [icon]

Display icon based on the first matched rule.

You can prepend or append rules to the default through prepend_rules and append_rules See Configuration mixing for details.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ [icon]                                                          β”‚
β”‚ prepend_rules = [                                               β”‚
β”‚   { name = "*.rs"    , text = "icon_glyph_here" },              β”‚
β”‚   { name = "Desktop/", text = "icon_glyph_here" },              β”‚
β”‚   # ...                                                         β”‚
β”‚                                                                 β”‚
β”‚   # Icon with a color                                           β”‚
β”‚   { name = "*.lua", text = "icon_glyph_here", fg = "#51a0cf" }, β”‚
β”‚                                                                 β”‚
β”‚   # You can also use `is` rule, just like `[filetype]` section  β”‚
β”‚   # Orphan symbolic links                                       β”‚
β”‚   { name = "*", is = "orphan", text = "icon_glyph_here" },      β”‚
β”‚ ]                                                               β”‚
β”‚                                                                 β”‚
β”‚ append_rules = [                                                β”‚
β”‚   # My fallback icons                                           β”‚
β”‚   { name = "*" , text = "icon_glyph_here" },                    β”‚
β”‚   { name = "*/", text = icon_glyph_here" },                     β”‚
β”‚ ]                                                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Or, use rules to rewrite the entire default rules:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ [icon]            β”‚
β”‚ rules = [         β”‚
β”‚   # ...Some rules β”‚
β”‚ ]                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

End with / for directories, wildcard rule (* or */) can be used for fallback matching all files or directories.

If your append_rules contains wildcard rules, they will always take precedence over the default wildcard rules as the fallback. πŸ’€βœ¨


πŸ‘€ SEE ALSO

yazi-config(5), yazi-plugins(7)


okay bestie, that’s the whole YAZI-CONFIG(1) glow-up πŸ’– the source/version and date are serving footer realness at the very end, and they ate πŸ’…πŸ«Ά

πŸ“¦ where this page comes from