Skip to main content

Configuration

There are three configuration files for Yazi:

You can find the default configuration files on the shipped tag https://github.com/sxyazi/yazi/tree/shipped/yazi-config/preset.

To override any of the defaults, begin by creating the corresponding file (from the directory linked above) to:

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

For example, to change the visible status of hidden files, start by creating a yazi.toml file to:

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

Then copy the required part into it, here is show_hidden:

# yazi.toml
[manager]
show_hidden = true

Yazi has already preset these default configurations in the release, so you don't need to copy the entire file unless you want to completely overwrite them.

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 (See keymap.toml for details):

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

They are also available for open, icon, previewer, and preloader rules.

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.