sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.

Home Page:https://yazi-rs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature requests

sxyazi opened this issue · comments

Bugs

  • Exit selection mode on leave
  • Exit selection mode on yank
  • Trigger Refresh manually when rename, create, in case notify-rs doesn't update in time
  • Precache n+1 pages of mimetype instead of n for the better experience
  • Image preview on node-pty based terminal, like Hyper canary and VSCode

Features

  • Forward / Backward
    No request

  • Find next/previous file (not the Search feature that's already existing)
    Requested by @teto, #81

  • Custom preloader / previewer
    Requested by @Neurognostic, #182

  • Filter files in real-time
    Requested by @musjj, #137

  • Vim-like H/M/L for scrolling (:help H in Vim for more info)
    Requested by @TD-Sky

  • Make the preview scrollable
    Requested by cg00@Discord

  • File chooser API used for Neovim plugin
    Requested by @Eric-Song-Nop

  • Git integration
    Requested by @g-plane, @cap153

  • Copy file path
    Requested by @Gajus84, #70

  • Mouse actions binding in keymap.toml
    Requested by @Gajus84, #70

  • macOS-like file tag
    Requested by @sxyazi

  • Transparent images and GIFs support
    No request

  • Customizable scroll offset and popup position improvement
    No request

  • Better borders style
    Requested by @sxyazi

  • Case-insensitive sorting
    No request

  • Emacs readline keybindings for Input component
    Requested by @teto

  • Auto-completion for Input component
    Requested by @maxzinkus

  • Custom manager layout
    Requested by @KeqiZeng, #71

  • Sort files naturally
    Requested by @asim215

  • Show all binding keymaps
    Requested by @hackers267, @maxzinkus, #79

  • Show file size after the filename
    Requested by @sxzz, #88 (comment)

  • Display of the number of currently selected/cut/copied files
    Requested by @Gajus84, #85

  • A floating window to glance at more information about this file (mime-type, atime/ctime/mtime, previewer, preloaders, EXIF for images/videos, etc.)
    Requested by @Gajus84, @teto, #85, #831 (comment)

  • Re-previewing in real-time when the file content changes
    Requested by @otakutyrant, #129

  • Shell command history
    Requested by @mbirth, #51 (comment)

  • Sorting by file type
    Requested by @v01dnu11, #51 (comment)

  • Hide specified files or directories
    Requested by @5ouma, #51 (comment)

  • Shell completion
    Requested by @MinaMatta98, #420

  • Remote file management
    Requested by @Xuanwo, #434, #611

  • Archives as directories
    Requested by @git-rz, #417

  • Auto-complete supports smart case
    Requested by @RioNight, #547

  • Natural sorting supports Hungarian letters
    Requested by @og900aero, #616

Thank you so much for this awesome project!!

A few feature requests:

  • Reset sorting to default after applying a sort
  • A '?' keymap to show all keymaps (agreeing with #79)
  • completion in the input field (for file/directory names)

Thanks again! Really cool and fast tool that will pretty much replace Finder for me.

I hope yazi support number, relative number, and the vim-like feature to jump to a specific number, e.g., the keymap support of gg and G.

Probably, we can add cache reading first, and then read rest files of directory. So workers on big dirrectories will not take long time to reanalyze files. Which lead to adding correct coloring to each file according to theme.toml, and mime types.
(feat/add-cache)

. should toggle whether show hidden files globally rathen on only the current column.

@maxzinkus

Reset sorting to default after applying a sort

The default is sorted by modified, to restore it just press ,m

keymap view / auto-completion

Added it to the Feature requests.


@otakutyrant

jump to a specific number

sorry I probably won't implement it right now, I don't think it's a good mode and I rarely use it -- it adds an extra mental load. But I'm keeping an open mind to constructive PR to make it happen.

gg / G

You can set gg to arrow -999 and G to arrow 999 to make it work. I'll add it to the default keymap later.

. should toggle whether show hidden files globally

In my workflow, when I need to press ., I only expect to manipulate the current directory (column) to quickly show and hide those files, and to be able to remember the display state of the current directory, without affecting other directories -- this offers the possibility of more fine-grained control, just like how the Finder works in macOS. When I need to set a global display state, I will change it in the config file.


@asim215

we can add cache reading first, and then read rest files of directory

This may affect the results of the sorting, and it's unclear how to implement it now.

Awesome, thank you!

@maxzinkus

Reset sorting to default after applying a sort

The default is sorted by modified, to restore it just press ,m

keymap view / auto-completion

Added it to the Feature requests.

@sxyazi How do you jump to a specific position without using number to navigate?

I need to set a global display state, how do I change it in the config file? I checked the preset and still do not figure out how.

How do you jump to a specific position without using number

I set j to arrow 1, k to arrow -1, J to arrow 5, K to arrow -5.

I use J and K when I need to walk around files quickly, I find it faster than numbers because it saves me time to think what need to type next...

I need to set a global display state, how do I change it in the config file?

Just add the following config to ~/.config/yazi/yazi.toml

[manager]
show_hidden = true

The docs are here: https://github.com/sxyazi/yazi/blob/main/config/docs/yazi.md

Sorry my expression was not clear enough. Number is clumsy certainly. But given relative number, I can just hit relativenum+j/k to jump to a specific position with one step. I wager that many people prefer this way to navigate. I mentioned number just because number and relative number are always a couple of options in vim or vim-like file managers. It is okay to only support relative number this option in yazi config.

I mistook your meaning. What I want is to globally toggle whether show hidden with . keymap. To conside mutual interest, you could allow users to decide whether show hidden files globally in config, like show_hidden_globally = false.

I have tried to learn Rust and failed thrice. Sorry that I cannot make the PRs so far.

@otakutyrant Never mind. I'd like to know your real-world usage scenarios -- in what situations would you need to change the display state of all directories, rather than the one you're currently in?

I use stow to manage my dotfiles and there is .config in almost every package. When I navigate between different packages, I do not want to toggle whether to show hidden files respectively.

How incovenient it is.

2023-08-24.13-52-18.mp4

No offense. As a constrast, the navigation support of joshuto is fully developed and it show/hide dotfiles globally.

2023-08-24.13-59-30.mp4

I defect to yazi now because I stuck in opening files in joshuto.

With show_hidden = true option doesn't solve the issue? Here your expected behavior is to show hidden files, but why do you need to toggle them one by one, rather than through the config option?

Setting show_hidden = true does not mean I can hide all dotfiles globally with . like what I did in joshuto.

What I want is to globally toggle whether show hidden with . keymap.

In fact, . is only designed for quick showing and hiding locally (directory-specific), globally there is only this config option at the moment.

If you want to change . behavior from local to global, please create a new issue and I'll collect other people's opinions and implement it.

some feature requests:

  • a help screen to list key commands. (if not already existing)
  • onscreen indicator how to get to help screen. eg by pressing 'h' or '?' perhaps.
  • display contents of compressed files as if sub-directory. eg .zip, .tgz, etc.
  • preview for video files, eg .mp4. Could be static image or animation.
  • preview image for openoffice documents, eg .odt. (could be as simple as transform to pdf first)
  • preview image for latex documents.
  • load preview for a file/path passed as cli argument to yazi and cd to parent dir.
  • preview for .svg files
  • preview for .ps (postcript) files. (convert to pdf with ps2pdf?)
  • enter key should descend into directory.
  • pg-up, pg-down should move selection in files list.
  • copy, cut, paste of files to other directory. ctrl-c, ctrl-x, ctrl-v. like in a gui file manager.
  • key to change sort order
  • preview for markdown files (toggle between code view and rendered view)
  • .json file preview/highlighting
  • toggle between html code and preview, eg with lynx?

these are things I half hoped/expected might work as I tried out the program.

It is nice enough to want more. ;-)

some feature requests:

  • a help screen to list key commands. (if not already existing)
  • onscreen indicator how to get to help screen. eg by pressing 'h' or '?' perhaps.
  • display contents of compressed files as if sub-directory. eg .zip, .tgz, etc.
  • preview for video files, eg .mp4. Could be static image or animation.
  • preview image for openoffice documents, eg .odt. (could be as simple as transform to pdf first)
  • preview image for latex documents.
  • load preview for a file/path passed as cli argument to yazi and cd to parent dir.
  • preview for .svg files
  • preview for .ps (postcript) files. (convert to pdf with ps2pdf?)
  • enter key should descend into directory.
  • pg-up, pg-down should move selection in files list.
  • copy, cut, paste of files to other directory. ctrl-c, ctrl-x, ctrl-v. like in a gui file manager.
  • key to change sort order
  • preview for markdown files (toggle between code view and rendered view)
  • .json file preview/highlighting
  • toggle between html code and preview, eg with lynx?

these are things I half hoped/expected might work as I tried out the program.

It is nice enough to want more. ;-)

@dan-da Too many features are already implemented in yazi, make sure you go through the sample config for keymap and you will find many of them. Check what's already there before you really ask for a new feature.

I built and ran the code and tried it out, and took the time to list my impressions. Every feature I listed is something that did not work for me. If there is some arcane way to make it work, that's fine, but it is not intuitive for me, and so that is feedback you can take or dismiss as you like. I've no idea what you mean about the 'sample config for keymap' and don't intend to investigate. As I said above, a simple onscreen indicator for how to get command-help would go a long way, but I don't see it, and the default key bindings are either not intuitive for me, or simply the expected functionality do not exist. I also highly doubt 'too many' features are implemented... seems an odd thing to say.

regardless this response to my feedback contribution does not encourage me to spend more time with this project.

It's important to remember that open-source software authors don't "owe" anything to the community. @sxyazi shared this great project with us, and got a ton of feature requests really quickly, which they've been handling with grace.

This is not, afaik, their full-time job. Please don't act entitled in a repo like this.

EDIT: and thank you to maintainers @Eric-Song-Nop as well!

@maxzinkus @Eric-Song-Nop

Thank you for these kind words, they give me the motivation to keep going!


Hey @dan-da, the config files for Yazi is mentioned in README, and it contains all the features and keybindings, along with docs.

a help screen to list key commands. (if not already existing)

You can press ~ to view the help screen.

onscreen indicator how to get to help screen. eg by pressing 'h' or '?' perhaps.

Good idea, but TUI space is precious. I'd like to add it to the README.

display contents of compressed files as if sub-directory. eg .zip, .tgz, etc.

I have plans to add this, but I haven't had enough time to complete it.

preview for video files, eg .mp4. Could be static image or animation.

If you've installed ffmpegthumbnailer as per the README, this should work. Currently, it only supports static images; GIF support has been noted in this issue.

.json file preview/highlighting

If you've installed jq as per the README, this should work.

enter key should descend into directory.
copy, cut, paste of files to other directory. ctrl-c, ctrl-x, ctrl-v. like in a gui file manager.
pg-up, pg-down should move selection in files list.

Yazi uses Vim keybindings by default. If you're not comfortable with them, you can create your own config file and modify them as you like. Please refer to the README for config details.

key to change sort order

Here are the default sorting keys, but of course, you can modify them as you wish:

# Sorting
{ on = [ ",", "a" ], exec = "sort alphabetical --dir_first", desc = "Sort alphabetically, directories first" },
{ on = [ ",", "A" ], exec = "sort alphabetical --reverse --dir_first", desc = "Sort alphabetically, directories first (reverse)" },
{ on = [ ",", "c" ], exec = "sort created --dir_first", desc = "Sort by creation time, directories first" },
{ on = [ ",", "C" ], exec = "sort created --reverse --dir_first", desc = "Sort by creation time, directories first (reverse)" },
{ on = [ ",", "m" ], exec = "sort modified --dir_first", desc = "Sort by modified time, directories first" },
{ on = [ ",", "M" ], exec = "sort modified --reverse --dir_first", desc = "Sort by modified time, directories first (reverse)" },
{ on = [ ",", "n" ], exec = "sort natural --dir_first", desc = "Sort naturally, directories first" },
{ on = [ ",", "N" ], exec = "sort natural --reverse --dir_first", desc = "Sort naturally, directories first (reverse)" },
{ on = [ ",", "s" ], exec = "sort size --dir_first", desc = "Sort by size, directories first" },
{ on = [ ",", "S" ], exec = "sort size --reverse --dir_first", desc = "Sort by size, directories first (reverse)" },

load preview for a file/path passed as cli argument to yazi and cd to parent dir.

Are you referring to yazi /your/path? If so, it is currently supported. You can see by running yazi --help.

preview for markdown files (toggle between code view and rendered view)

Markdown file preview is currently supported, but I'm not sure what you mean by "rendered view."

preview image for openoffice documents, eg .odt. (could be as simple as transform to pdf first)
preview image for latex documents.
preview for .svg files
preview for .ps (postcript) files. (convert to pdf with ps2pdf?)
toggle between html code and preview, eg with lynx?

These features will require Yazi's plugin system. I plan to invest time in developing the plugin system soon, allowing users to write their own plugins and supporting more file types.

commented

Features request:

  1. be able to show only the middle column, like ranger's viewmode
  2. be able to make two tabs side-by-side (two tabs both only show the middle column)
  3. set the default sort type (alphabetical/created/modified/natural/size) when opening yazi
  4. when sorting the list, show the details(created/modfifed/size) of all the files/dirs in the list
  5. be able to show all the size/date for the files/dirs in the list
  6. be able to get size of current selected files/dirs or all the files/dirs in the list
  7. be able to show the index for the list (can be set by default)

image

@c02y

show only the middle column, like ranger's viewmode

It's already supported, see #76, the docs is here: https://github.com/sxyazi/yazi/blob/main/config/docs/yazi.md

be able to make two tabs side-by-side (two tabs both only show the middle column)

This will be a challenge for image previews, as displaying 2 or more images on the same interface can be tricky.

The simplest way is to use the built-in split-screen feature of the terminal or terminal multiplexers like tmux and zellij (Yazi now supports displaying images within tmux and zellij).

commented

@c02y

show only the middle column, like ranger's viewmode

It's already supported, see #76, the docs is here: https://github.com/sxyazi/yazi/blob/main/config/docs/yazi.md

Oh, sorry, I was reading the keymap.toml file for available features, thought that I can use a binding to toggle the different layouts.

be able to make two tabs side-by-side (two tabs both only show the middle column)

This will be a challenge for image previews, as displaying 2 or more images on the same interface can be tricky.

The simplest way is to use the built-in split-screen feature of the terminal or terminal multiplexers like tmux and zellij (Yazi now supports displaying images within tmux and zellij).

When side-by-side two tabs, only the middle column is displayed.

I added more feature requests and screenshot.

When side-by-side two tabs, only the middle column is displayed.

Oh I misunderstood your meaning. You don't need image previews then. So how should it display when there are more than two tabs?

set the default sort type (alphabetical/created/modified/natural/size) when opening yazi

You can follow the README to create your own config, and set it

when sorting the list, show the details(created/modfifed/size) of all the files/dirs in the list
be able to show all the size/date for the files/dirs in the list
be able to get size of current selected files/dirs or all the files/dirs in the list

Are you referring to displaying file-related info to the right of the file name? This has been noted in this issue

be able to show the index for the list (can be set by default)

The status bar has displayed info such as the current file location, total number of files, current percentage, etc.

commented

When side-by-side two tabs, only the middle column is displayed.

Oh I misunderstood your meaning. You don't need image previews then. So how should it display when there are more than two tabs?

Never notice this is actual an issue in ranger. Currently, for ranger, if you have 4 tabs, when you execute the side-by-side command/binding in tab2, tab2 will the left part, tab3 will be the right part, you can change the focused part by switching to the tab using bindings such as 1/2/3/4

And if a binding can be provided to toggle between show-only-middle-column and default-layout-in-config would be great.

set the default sort type (alphabetical/created/modified/natural/size) when opening yazi

You can follow the README to create your own config, and set it

Got it, hadn't read the other two toml files yet back then.

when sorting the list, show the details(created/modfifed/size) of all the files/dirs in the list
be able to show all the size/date for the files/dirs in the list
be able to get size of current selected files/dirs or all the files/dirs in the list

Are you referring to displaying file-related info to the right of the file name? This has been noted in this issue

Show file size after the filename? Maybe date/time can also be added after the file name if sorting by modified/created or displaying modified/created command is executed, like my screenshot.

be able to show the index for the list (can be set by default)

The status bar has displayed info such as the current file location, total number of files, current percentage, etc.

Yeah, this is enough, thanks.

commented

This is a great project. Let me join the others in sharing thanks!

Here are a few more (mostly small) feature requests:

  • "Run a shell command on the selected files"
    • ranger equivalent: @ (or add %s to a shell command)
  • "Move cursor to bottom"
    • ranger equivalent: G
    • workaround: arrow 9999
  • "Move cursor to top"
    • ranger equivalent: gg
    • workaround: arrow -9999
  • Wrap when cycling through tabs (PR #160)
  • Toggle: fullscreen preview window
    • ranger equivalent: i
  • Toggle: hide preview window
    • ranger equivalent: ~
  • Filter-as-you-type search

@ctem Thanks for your suggestions! but some of them all already implemented.

  • "Run a shell command on the selected files"

    • ranger equivalent: @ (or add %s to a shell command)

You can use the syntax suggested here for shell command opener

  • "Move cursor to bottom"

    • ranger equivalent: G
    • workaround: arrow 9999
  • "Move cursor to top"

    • ranger equivalent: gg
    • workaround: arrow -9999

The workarounds should work in Yazi!

Thank you for your suggestions!

What do you think about OS specific yazi.toml preset. The current default presets work for Mac, I guess linux users need to tweak it a little, and Windows users need to tweak it a lot (open command, root folder, config folder,...). I'm thinking of 2 ways:

  1. Use a hardcoded presets for each OS, enable it with #[cfg(target_os)]
  2. Dynamically generate the presets to config folder when yazi is first run. This way we can also detect installed programs on user's PC and generate correct openers.

What do you think about OS specific yazi.toml preset.

Yep, see #90 (comment)

One thing I think could help users onboard faster by managing less configuration would be the ability to deep-merge parts of the user configuration on top of the presets. Particularly for keymaps, where to change one key bind in a map (such as d), the naive attempt:

[manager]
keymap = [
  { on = ["d"], exec = "remove --confirm", desc = "Move the files to the trash" },
]

ends up unbinding everything else in that block (so you have to inline that entire preset block)

I want to hide the specified files or directories.
It's not necessary to be shown like .DS_Store or .Trash

show file information by file or detect-it-easy, it has a cli version called diec , since for some binaries, we can't preview it. (or maybe with hex, like xxd?)

@asukaminato0721 The upcoming Yazi plugin system will allow users to use their own previewers to implement it, see #182

Thank you very much for this awesome piece of software. Would it be hard to implement sorting by file type?

Thank you very much for this awesome piece of software. Would it be hard to implement sorting by file type?

Is that mean sorting by file extension in ascending/descending apha order?

Thank you very much for this awesome piece of software. Would it be hard to implement sorting by file type?

Thank you very much for this awesome piece of software. Would it be hard to implement sorting by file type?

Is that mean sorting by file extension in ascending/descending apha order?

Yes, exactly.

Can we have shell command history, please? I.e. pull from history and edit command before running it again.

Forward / Backward

Does this mean we can go to the previously visited directory, similar to :histprev in Vifm?
It sure would be useful to have that feature after using shortcuts like gd, for example.

Forward / Backward

Does this mean we can go to the previously visited directory, similar to :histprev in Vifm? It sure would be useful to have that feature after using shortcuts like gd, for example.

Yes, it's already implemented in the main branch. The functionality is mapped to H (backward) and L (forward) by default.

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Trying using shell <your command>, you can use number argument for selected files ($1, $2,... $* or $@ on linux, %1, %2... %* on Windows)

First of all, thank you for this file manager: super fast and very promising to me! Is there a way to use ANSI terminal colors for theming? Are you considering it?

First of all, thank you for this file manager: super fast and very promising to me! Is there a way to use ANSI terminal colors for theming? Are you considering it?

Sure. The new theme system will support and default to using 16 colors to better match user terminals. Take a look at these two PRs: #161 and #221. They should be merged soon.

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Trying using shell <your command>, you can use number argument for selected files ($1, $2,... $* or $@ on linux, %1, %2... %* on Windows)

Hey! I have tried putting this in my keymap.toml file

	{ on = [ "z", "u" ],         exec = "shell unzip $@", desc = "Unzip file" },

however, I am not sure how it's supposed to work.
whenever I enter the keymap, it just opens a prompt with "unzip" and seemingly nothing happens. Also tried entering "unzip $@" in the prompt, but it gives me the 99% stuck thing.

I also do select files

I must be doing something wrong here?

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Trying using shell <your command>, you can use number argument for selected files ($1, $2,... $* or $@ on linux, %1, %2... %* on Windows)

Hey! I have tried putting this in my keymap.toml file

	{ on = [ "z", "u" ],         exec = "shell unzip $@", desc = "Unzip file" },

however, I am not sure how it's supposed to work. whenever I enter the keymap, it just opens a prompt with "unzip" and seemingly nothing happens. Also tried entering "unzip $@" in the prompt, but it gives me the 99% stuck thing.

I also do select files

I must be doing something wrong here?

Sorry, my bad. I just checked again, and it should be: { on = [ "z", "u" ], exec = "shell --confirm 'unzip $@'", desc = "Unzip file" },

Not sure if this has been requested already, I didn't see it in a quick search. But, I would definitely benefit from a configuration implementation change. I think it would make more sense to support just overriding or adding to the existing config through the user's config file instead of completely replacing it. This should be as simple as reading the preset config in source and just merging in or overriding whenever it detects a user config matching item.

Not sure if this has been requested already, I didn't see it in a quick search. But, I would definitely benefit from a configuration implementation change. I think it would make more sense to support just overriding or adding to the existing config through the user's config file instead of completely replacing it. This should be as simple as reading the preset config in source and just merging in or overriding whenever it detects a user config matching item.

Yazi supports configuration merging, but intentionally restricts it to the second level. This primarily affects key bindings. For detailed reasons, see https://yazi-rs.github.io/docs/usage/faq/#why-do-i-need-to-copy-the-entire-keybindings

Not sure if this has been requested already, I didn't see it in a quick search. But, I would definitely benefit from a configuration implementation change. I think it would make more sense to support just overriding or adding to the existing config through the user's config file instead of completely replacing it. This should be as simple as reading the preset config in source and just merging in or overriding whenever it detects a user config matching item.

Yazi supports configuration merging, but intentionally restricts it to the second level. This primarily affects key bindings. For detailed reasons, see https://yazi-rs.github.io/docs/usage/faq/#why-do-i-need-to-copy-the-entire-keybindings

Alright, that makes more sense. Thanks for pointing to that. I guess I started with keybindings and assumed it was the same for all configs. Thanks.

Hi. Love your app. It is faster than most the the terminal file managers I used so far. Here is my request features:

  • Command to mount/umount external partitions (some thing like this is awesome)
  • Android MTP auto mount
commented

I humbly request the developers of this divine project to bestow upon us: session save/restore

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Trying using shell <your command>, you can use number argument for selected files ($1, $2,... $* or $@ on linux, %1, %2... %* on Windows)

Hey! I have tried putting this in my keymap.toml file

	{ on = [ "z", "u" ],         exec = "shell unzip $@", desc = "Unzip file" },

however, I am not sure how it's supposed to work. whenever I enter the keymap, it just opens a prompt with "unzip" and seemingly nothing happens. Also tried entering "unzip $@" in the prompt, but it gives me the 99% stuck thing.
I also do select files
I must be doing something wrong here?

Sorry, my bad. I just checked again, and it should be: { on = [ "z", "u" ], exec = "shell --confirm 'unzip $@'", desc = "Unzip file" },

Thanks! I got it working with unzipping files!

Now, I just have to figure out how to do the other way around and zip files together and give the zipped file a name...

@brimless

Now, I just have to figure out how to do the other way around and zip files together and give the zipped file a name...

Just some shell:

{ on = [ "c", "z" ], exec = """
    shell 'printf "Your Name:"; read name; zip "$name.zip" "$@"' --block --confirm
""" },
1.mp4

You can also save it as a file, and then shell "sh your-file.sh" ....

Anyway, the upcoming plugin system will allow better integration of these tasks, including the mentioned mount/umount external partitions, session save/restore. Stay tuned.

[FR] allow overriding individual keymap key bindings

The current keymap.toml contains a list of key bindings, instead of a map of {kbd => exec}. It means if users want to remap a single key, they have to override the entry with a whole list of the preset keymap. It's tedious and lead to out of sync between user keymap override and preset keymap, even if the user want to keep the whatever the up-to-date default keymap is, which is what I end up with doing for only overwriting the <Esc> in the [input] entry like this.

The request is to change the keymap to a map so that users can override indivual key bindings. An alternative is to have custom merging logic for the list of key bindings, to merge based using the on = "some kbd" as a key. Given that your keymap has the concept of vim mode and sequence, how to construct the "key" of the key map is non-trivial.


Another personal take on the preset keymap: enabling vim-mode in the input box by default is a bit too aggressive even for a vim veteran that used vim-mode everyday for couple of years. Especially, when one hit of <Esc> cannot get you out from the input box, which is counter intuitive. IMO given that in most cases ppl only type a few chars in the search/find_next input box and then either submit or cancel the input, the out-of-box experience will be better if vim mode is disabled by default (from the code this is another FR) in input box or at least figure out a way to let <Esc> cancel the input directly by default (conflict with the vim mode insert->normal tradition though, which is undesired).

@15cm

The current keymap.toml contains a list of key bindings, instead of a map of {kbd => exec}

Seems a dup of #51 (comment)


enabling vim-mode in the input box by default is a bit too aggressive even for a vim veteran that used vim-mode everyday for couple of years

In fact, Yazi has already provided a C-q to exit input directly from insert mode:

{ on = [ "<C-q>" ], exec = "close", desc = "Cancel input" },

You can even go further to bind <Esc> directly to close, making it a regular input component:

	{ on = [ "<Esc>" ],       exec = "close",          desc = "Cancel input" },

The issue noted an "Emacs readline keybindings for the input component" feature, once it's implemented, will allow users to use C-w to delete a word, and Ctrl-f, Ctrl-b to move around, etc., in the input.

Re the comment about the existing C-q and the ability to remap, it's true and I find it out in minutes and already made a change. The comment after the FR is more about the preference of the default behavior, which is opinionated so it depends on person. The suggestion is more for saving the impatient users from uninstalling the tool after finding the tool doesn't work as expected after hitting a sequence of key strokes.

Given that there are existing discussions on the two topics I raised and they are on the radar, we can revisit this when there is some progress there :)

Context: I'm working a lot in Midnight Commander, and it has a number of features making it quite convenient for many tasks. So, here's some features that I'm missing when working in yazi (v0.1.5… yes, I've seen the "early version" discaimer 🙂):

  • Horizontal scrolling in preview
  • Line numbers + (toggleable) line wrapping in preview
  • Fullscreen mode for preview (could be toggleable with a hotkey)
  • Custom syntax highlighting (in MC it's actually only in edit mode, but you seem to have it in preview; and while I haven't investigated how it's configured, there doesn't seem to be anything about it in the config files)
  • Builtin preview support for gzipped/bzipped files (possibly tarballs as well, scanning asynchronously)
  • Custom preview output per mime type similar to custom open command (e.g. ability to configure printing metadata for videofiles and/or images)
    • Ability to toggle between graphical and text-only preview (e.g. switch between showing an image/showing image metadata); possibly with configurable default state
    • Also a general "toggling plain-text preview" feature (possibly with hex mode of sorts for binary files?)
      • Sometimes file preview is just empty, with no indication as to why. If the cause is filesize (and not a bug), maybe just display plain-text version first and then replace it with parsed version once there's something to show there?
  • Dedicated edit command, preferably with default key (e.g. open the image in GIMP instead of image viewer); either using the open command or nothing as fallback for unconfigured types
  • When "open" is applied to a directory, it should enter (instead of opening an editor complaining that the file is a directory)
  • Preview of a directory should include linemode
  • Linemode displaying both size and permissions (or as a more generic solution, change it to be a list of enum values instead of a single one; this would make it more flexible, and do away with the none mode)
    • Size linemode with precise size (toggleable or as a separate mode value)
  • Dual mode (possibly toggleable, hiding preview and possibly parent directory as well and displaying a new/next/selected tab alongside with current in 1:1 proportion)
    • Switching between left/right side can be bound to <Tab>
    • Switching the tab should be applied to the current side only (…not sure how to indicate which is the left/right side tab selected)
      • …as well as other controls, I guess
    • Quick directory comparison (e.g. selecting files/folders that were detected as mismatching)
    • Quick file comparison (e.g. side-by-side diff preview)
    • Macro hotkeys for quick copying/moving files between tabs
  • Arbitrary shell command on the active/selected files (e.g. in MC I often use unp -U to quickly unpack archives)
    • Being able to actually see the output would be nice as well

I also suggest adding this as well:

  • Help hotkey indicated somewhere on main screen (possibly opt-out via config)
  • Program name+version displayed on the help screen (e.g. in status bar)
    • Possibly some sort of information section on the help screen (or at the very least indicating how to get more)
  • A readme/man page (or equivalent on Windows) with at least some amount of offline documentation (e.g. default hotkeys and configuration guide)
  • optional global config (e.g. /etc/yazi/* on Linux) to use when no user-specific config is defined

…Oh, and maybe don't display byte size as decimal fractions? (Such as 226.0 B for a tiny text file)

I would like to request using the file command as a fallback preview method.

Maybe this is not the place, because I have no feature request. But I just wanted to say that Yazi is such a nice application in plenty of ways! Many kuddo's.

I hope you don't get burned out by all the features that are requested here.

Hi, I would like to request a preview dark mode. For example in lf I had the following preview for pdf and images that converted it to dark mode. Thank you! Yazi is amazing.
function make_pdf { if [ "${TMP_FILE}" -ot "$1" ]; then pdftoppm -png -f 1 -l 1 -scale-to-x -1 -scale-to-y -1 -singlefile "$1" "${TMP_FILE%.png}" convert "${TMP_FILE}" -negate "${TMP_FILE}" fi }

Image preview support in Windows Terminal would be nice
WezTerm seems to work well, but I primarily use Windows Terminal
It appears this might be contingient on microsoft/terminal#5746?

First of all, this project is awesome.
I want to create an nvim plugin like https://github.com/lmburns/lf.nvim, but for yazi.
However, if doesn't look like I can pass a file parameter and that file will then be selected when yazi is opened.

Is that something you are planning on implementing?

Hey @maxzinkus, the last "completion in the input field (for file/directory names)" in #51 (comment) comment has been implemented now by #324. I'll mark this comment as resolved.

thank you for this project. I'd like to suggest a new feature to enable yanking multiple files from different directories all together.
like right now, if I selected multiple files from nested dirs, then yanked and pasted them in different dir, only the files that were in the last dir I was in would be pasted.

this feature would really enhance the user experience and I search if this feature already exist but couldn't find any.

thank you

@bassamsdata

#319 This RFC describes this feature, although I'm not sure how to implement it yet.

Consider: I have selected /a/b/c, /a/b, /a. Now, if I cut them to /, what will the directory structure of / look like? Will it be just /a/b/c, or /a, /b, /c, or some other situation?

We are gathering feedback from the community, so please feel free to leave any constructive comments on the RFC!

Just a small thing, but it'd be nice if <Esc> clears the currently yanked/cut files. Actually, I'm not sure how to clear it at all (other than by exiting).

Thank you for this awesome file manager!

It would be nice to have the option to duplicate a file, e.g. pressing 'r' and then 'Enter' inside the unmodified prompt and then duplicate the file by renaming it.

Usecase: I often make temporary backups of files/scripts before editing them. Right now I have to yank/paste/rename...

Thank you for this awesome file manager!

It would be nice to have the option to duplicate a file, e.g. pressing 'r' and then 'Enter' inside the unmodified prompt and then duplicate the file by renaming it.

Usecase: I often make temporary backups of files/scripts before editing them. Right now I have to yank/paste/rename...

I think this can easily be configured as a keymap. Try { on = "B", exec = "cp $1 $1_backup", desc = "Create backup" }

@ndtoan96 Thanks for the reply. Yep, I'm aware of that possibility, but then the renaming remains static, which isn't what I'm looking for.

@manfred3000 Maybe hop on discord and explain your use case a bit better.
Is this a feature that you think more people would benefit from, if so, why?

@musjj

See #313, #319

Not just unyank but uncut or clear_all_selected is also welcome. Ranger and LF file manager do clear all yank/copy/cut registers on esc.
I do not think yazi should do that by default on esc but those commands should at least exists as an option.

I think the best part of the ranger is missing. Mark a directory with m and then access it with '. It would be amazing if you had this support.

I think the best part of the ranger is missing. Mark a directory with m and then access it with '. It would be amazing if you had this support.

I missed that too at first, but the zoxide integration is quite a good substitute.
Marks would still be nice to have though.

Thank you very much for this awesome piece of software. Would it be hard to implement sorting by file type?

Hey @v01dnu11, your feature request of "Sorting by file type" in #51 (comment) has now been implemented by #405. I'll mark this comment as resolved.

I think the best part of the ranger is missing. Mark a directory with m and then access it with '. It would be amazing if you had this support.

Dup of #184, should be implemented through plugin once Yazi's plugin system is ready.

I missed that too at first, but the zoxide integration is quite a good substitute. Marks would still be nice to have though.

Yea zoxide will also be converted into a plugin at that time.

Would it be possible to add an option, maybe in the config, to invert preview of images and pdf to be gentle on the eyes? Thank you, Yazi is great!

Would it be possible to add an option, maybe in the config, to invert preview of images and pdf to be gentle on the eyes? Thank you, Yazi is great!

Rather than invert on/off option I think a 0-1 float would be better together with a grayscale option. Otherwise your eyes will be blasted by already dark images and pdfs.

@magnetophon:

I would like to request using the file command as a fallback preview method.

@5183nischal:

Hi, I would like to request a preview dark mode. For example in lf I had the following preview for pdf and images that converted it to dark mode. Thank you! Yazi is amazing.
function make_pdf { if [ "${TMP_FILE}" -ot "$1" ]; then pdftoppm -png -f 1 -l 1 -scale-to-x -1 -scale-to-y -1 -singlefile "$1" "${TMP_FILE%.png}" convert "${TMP_FILE}" -negate "${TMP_FILE}" fi }

@5183nischal:

Would it be possible to add an option, maybe in the config, to invert preview of images and pdf to be gentle on the eyes? Thank you, Yazi is great!

@hakan-demirli:

Rather than invert on/off option I think a 0-1 float would be better together with a grayscale option. Otherwise your eyes will be blasted by already dark images and pdfs.

It's already included in #401, there's still some work ongoing in that PR though. When merged, it will allow users to create their own previewers in Lua in any way they like, take a look at pdf.lua.

At that point, you'll also be able to mix images and text, imagine adding a few lines of metadata above media files like images, videos, etc. (size, duration, color space, etc.), which will be very useful.

Performance was also thoroughly considered in the design; all IO in Lua is asynchronous and implemented natively in Rust - Even the entire plugin execution process is concurrent and asynchronous across threads! They are scheduled by the Yazi task system.

Thanks to Luajit, it's fast and allows us more optimization space. Now, we can control task cancellation at a finer granularity - checking if the task has been canceled before each Lua function call, before returning, and when a fixed number of instructions have executed, discarding them. This was difficult to achieve through Rust previously.

@evanjs:

Image preview support in Windows Terminal would be nice WezTerm seems to work well, but I primarily use Windows Terminal It appears this might be contingient on microsoft/terminal#5746?

Yep it requires Windows Terminal to support any kind of terminal graphics protocol.

@jdrupal-dev:

I want to create an nvim plugin like https://github.com/lmburns/lf.nvim, but for yazi.
However, if doesn't look like I can pass a file parameter and that file will then be selected when yazi is opened.

This feature request has been done by #344, and I will mark this comment as "resolved".

@hakan-demirli:

Not just unyank but uncut or clear_all_selected is also welcome. Ranger and LF file manager do clear all yank/copy/cut registers on esc.

It has already been covered in the "advantages" section of #319. This RFC still has some tricky issues to address, I'll assess its feasibility after the completion of the plugin system. If it's not feasible, I'll accept this "unyank support" PR.

@sxyazi First of all—this is such a fantastic project. I'm so happy that I found it after using first ranger, then lf because it already seems to address most of the issues I had with these two and seems to head towards having more and more amazing features. Great work!!

I would like to second @c02y's request for the option to display two tabs at the same time. I would especially find that useful for copy operations like two-pane file managers offer. I imagine something like

  • browse one yazi tab in the standard layout
  • press a keyboard shortcut to activate two pane mode
  • this pertains the middle pane for the previously browsed tab on the left hand side and opens an additional tab on the right hand side (also just the middle pane), with one of the following options
    • replicates the current tab on the right side
    • offers to select an already existing tab to be displayed on the right side
  • ideally, one would be able to copy/move files from the left to the right pane (or reverse) with one key command, i.e., not have to first copy them in the left pane, then move focus to the right pane, then paste
  • press a keyboard shortcut to deactivate two pane mode and go back to the standard layout, optionally removing the other tab
commented

Programmable configuration would be great. vifm can be configured with vimL and I found it very useful.
Probably most simple use case would be something like this.

if extension is pdf {                                                                                                                        
  if darwin
    set opener = open
  else if SSH != "" 
    set opener = custom command
  else
    set opener = xdg-open
  fi
}

Thanks for the project. ffmpegthumbnailer doesn't work on Windows, but it has ffmpeg. Is there a way to hack video file thumbnails for yazi on Windows?

Hi, is there a way to run custom commands on keymaps? For example, I would like to have a keymap that extracts a zipped file.

Trying using shell <your command>, you can use number argument for selected files ($1, $2,... $* or $@ on linux, %1, %2... %* on Windows)

Hey! I have tried putting this in my keymap.toml file

	{ on = [ "z", "u" ],         exec = "shell unzip $@", desc = "Unzip file" },

however, I am not sure how it's supposed to work. whenever I enter the keymap, it just opens a prompt with "unzip" and seemingly nothing happens. Also tried entering "unzip $@" in the prompt, but it gives me the 99% stuck thing.
I also do select files
I must be doing something wrong here?

Sorry, my bad. I just checked again, and it should be: { on = [ "z", "u" ], exec = "shell --confirm 'unzip $@'", desc = "Unzip file" },

This doesn't seem to work if there are spaces in the path referenced by the shell arg (i.e. $@).
For example, if I pass a path wherein the directory or filename has spaces, this fails:

{ on = [ "W" ],         exec = "shell --confirm 'swww img -t outer $1'",            desc = "Feed file into swww to set wallpaper" },

If I check the command from the tasks window:

: line 1: /home/kaze/Pictures/Wallpapers/Anime: No such file or directory
error: the following required arguments were not provided:
  <PATH>

Usage: swww img --transition-type <TRANSITION_TYPE> <PATH>

For more information, try '--help'.
Exited with status code: 2
Process failed

full path:

"home/kaze/Pictures/Wallpapers/Anime Wallpapers/Konachan.com - 316329 brown_hair clouds hakurei_reimu japanese_clothes long_hair miko ofuda red_eyes ruda_(ruda_e) sky touhou.png"

Is there some elegant way to put quotes around the shell arg? Or perhaps it would make more sense for yazi to just always escape the path(s) prior to passing them as arg to the shell?

Currently, the way to escape the $1 arg properly looks like this:

`exec = 'shell --confirm "swww img -t outer \"$1\""',

Tree-View

image

Having a tree view is often useful to get an overview of the current directory.

Can the highlighted item be lighter in the help menu? It is very hard to see it at certain screen-brightness levels. I think it is because of the default saturation or contrast levels.

Default colors on pwsh (it is hard to see "escape" in second column in blue):
image

Different colors (it is hard to see all of the highlighted item):
image

Edit:
Also, the bottom right status is hard to see.
image
image

Also, this also happens to a / searched item:
image

I think it's been asked for already, but I would like to request for a way to resize or close the preview pane on the fly. It could be really useful when browsing directories that contain multiple files with very similar names, like here:
image
While the file name being shown at the bottom definitely helps, it's not the ideal way to deal with 30+ files with similar names.

Is there some elegant way to put quotes around the shell arg? Or perhaps it would make more sense for yazi to just always escape the path(s) prior to passing them as arg to the shell?

Currently, the way to escape the $1 arg properly looks like this:

`exec = 'shell --confirm "swww img -t outer \"$1\""',

You can use single triple quotes
exec = '''shell 'swww img -t outer "$@"' --confirm'''

@aca

Programmable configuration would be great. vifm can be configured with vimL and I found it very useful.
Probably most simple use case would be something like this.

This means we need to build a DSL, parse and execute it, which can make things complex and slow down Yazi at the same time (imagine selecting 100 files and searching for their common opener, needing to perform this operation 100 times). If necessary, we can introduce conditional expressions similar to cond that preloaders do – fast enough and simple enough, see https://yazi-rs.github.io/docs/configuration/yazi#preloaders.

@RioNight

Thanks for the project. ffmpegthumbnailer doesn't work on Windows, but it has ffmpeg. Is there a way to hack video file thumbnails for yazi on Windows?

Just copy https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/video.lua as your ~/.config/yazi/plugins/video.yazi/init.lua and change the ffmpegthumbnailer command to ffmpeg - Yazi allows you overwrite and use your own previewer, see the docs here https://yazi-rs.github.io/docs/plugins/overview#previewer.

@theunpleasantowl

Is there some elegant way to put quotes around the shell arg? Or perhaps it would make more sense for yazi to just always escape the path(s) prior to passing them as arg to the shell?

I have plans to add a shorthand form for the shell command, such as shell --confirm "my-command arg1 arg2" being abbreviated as $ my-command arg1 arg2 or something similar, where $ represents shell --confirm "".

@RioNight

Can the highlighted item be lighter in the help menu? It is very hard to see it at certain screen-brightness levels. I think it is because of the default saturation or contrast levels.

Please use a Yazi theme that matches the colors of your terminal - Yazi's default theme cannot cater to all users, and even the colors needed by the same user in light/dark mode can vary. Not to mention that some terminals have poor default color schemes, like this #149 (comment). Of course, if you find a color that better covers most terminals, feel free to create a PR.

@Sonico98

I think it's been asked for already, but I would like to request for a way to resize or close the preview pane on the fly. It could be really useful when browsing directories that contain multiple files with very similar names, like here:

It can be achieved through Yazi's plugin system; I've made some attempts, and it works well:

Maximize Preview

1.mp4
-- ~/.config/yazi/plugins/max-preview.yazi/init.lua
return {
  entry = function(st)
    if st.old then
      Manager.layout, st.old = st.old, nil
    else
      st.old = Manager.layout
      Manager.layout = function(self, area)
        self.area = area

        return ui.Layout()
          :direction(ui.Layout.HORIZONTAL)
          :constraints({
            ui.Constraint.Percentage(0),
            ui.Constraint.Percentage(0),
            ui.Constraint.Percentage(100),
          })
          :split(area)
      end
    end
    ya.app_emit("resize", {})
  end,
}

Then bind it in your keymap.toml:

{ on = [ "T" ], exec = "plugin --sync max-preview" },

Hide Preview

2.mp4
-- ~/.config/yazi/plugins/hide-preview.yazi/init.lua
return {
  entry = function(st)
    if st.old then
      Manager.layout, st.old = st.old, nil
    else
      st.old = Manager.layout
      Manager.layout = function(self, area)
        self.area = area

        local all = MANAGER.ratio.parent + MANAGER.ratio.current
        return ui.Layout()
          :direction(ui.Layout.HORIZONTAL)
          :constraints({
            ui.Constraint.Ratio(MANAGER.ratio.parent, all),
            ui.Constraint.Ratio(MANAGER.ratio.current, all),
            ui.Constraint.Min(1),
          })
          :split(area)
      end
    end
    ya.app_emit("resize", {})
  end,
}

Then bind it in your keymap.toml:

{ on = [ "T" ], exec = "plugin --sync hide-preview" },

Hi, @sxyazi, I've created a tracking issue for the remote file manager at #611. Would you like to update the description to include it?

Hey @sxyazi Your solution for preview hiding and maximizing works perfectly, Thanks for that, but is there a way to either make text file previews wrap around, or add some kind of horizontal scrolling for them? because this feature will help to read files with very long lines easy.
Thanks for this project.

Not sure if +1 comments are appreciated or not, but I can't really up vote a individual feature. So +1 for managing archives as if they where directories. I don't think there is any TUI archive managers currently, so this would be great as I currently use KDE Ark which perhaps isn't ideal (definitely please correct me I'd love to use something in the time being)

To make this less of a useless comment, how will this be done exactly? I could see two paths, one is using some API probably ported over from C or native to Rust, or another is to invoke the commands from the shell. First one would be more correct and probably more ideal, but might require much more effort if said bindings don't exist for every archive format.

Feel free to hide this comment if you feel like it, I will probably delete it if you do that so it won't take up space. If anyone else feels the same way just up vote this to avoid duplicates

Feature request:
Preview fonts in yazi. I have a bash script that you can inspire from it:

https://gist.github.com/LinArcX/446ed29ef4b4ef94a6a1bc19726aff62

Feature request:

Audio preview in Yazi. it's not something like: https://github.com/Sonico98/exifaudio.yazi/tree/master. since Exifaudio only is for the preview of the "metadata". I mean playing audio in the background and controlling it inside Yazi.

For instance, we can use CMD+j / CMD+k to increase volume, and CMD+H / CMD+L to move forward/backward in the audio file. and CMD/Space for pause/play.

Feature request:

Video preview in Yazi. for sure I'm not talking about the preview of "metadata". I mean playing video in the preview panel and controlling it inside Yazi.(maybe we can mpv?)

For instance, we can use CMD+j / CMD+k to increase volume, and CMD+H / CMD+L to move forward/backward in the video file. and CMD/Space for pause/play.

Feature request:

Audio preview in Yazi. it's not something like: https://github.com/Sonico98/exifaudio.yazi/tree/master. since Exifaudio only is for the preview of the "metadata". I mean playing audio in the background and controlling it inside Yazi.

For instance, we can use CMD+j / CMD+k to increase volume, and CMD+H / CMD+L to move forward/backward in the audio file. and CMD/Space for pause/play.

Interesting, not sure if this is already a feature request somewhere. But what about another option to show a sound wave as a preview like seen in Audacity? Or perhaps if it has not metadata it falls back to this

Edit: maybe also turning it into a xdg portal file picker could be possible?

the first version of the audio preview using mpg123:
https://github.com/LinArcX/mpg123.yazi

For sure, it is just playing a hovered audio file and if you skip to other files, the audio will stop playing. I'm still searching how to move forward/backward in an audio file with mpg123.

Feature Request:
For my use case, I have keybindings in a separate toml file which I have a script that appends the file to a copy of my keymap.toml, can you please add a command line argument to load a different keymap.toml, theme.toml, & yazi.toml file.

Feature Request:
In addition to file size, add a linemode option for displaying the number of files a directory contains.

I know the status bar indicates the number of files or items contained in the current directory, but it would be nice to see it without actually entering the directory, especially in the linemode area, as in Ranger.

I tried to add this myself (in both the linemode area and the status bar) by following the Tips section in the documentation, but I'm not a programmer and could only make it half work. For example, I declared the variable local precount = #cx.active.preview.folder.files inside Status:position and then added inside the appropriate Span. It shows the correct count, but if I hover over a file, the status bar disappears completely.

Feature Request: In addition to file size, add a linemode option for displaying the number of files a directory contains.

I tried to add this myself (in both the linemode area and the status bar) by following the Tips section in the documentation, but I'm not a programmer and could only make it half work.

@analyticmind Here's one way to do it for linemode:

@@ -1,24 +1,32 @@
 function Folder:linemode(area)
 	local mode = cx.active.conf.linemode
 	if mode == "none" then
 		return {}
 	end
 
 	local lines = {}
 	for _, f in ipairs(self:by_kind(self.CURRENT).window) do
 		local spans = { ui.Span(" ") }
 		if mode == "size" then
 			local size = f:size()
 			spans[#spans + 1] = ui.Span(size and ya.readable_size(size) or "")
 		elseif mode == "mtime" then
 			local time = f.cha.modified
 			spans[#spans + 1] = ui.Span(time and os.date("%y-%m-%d %H:%M", time // 1) or "")
 		elseif mode == "permissions" then
 			spans[#spans + 1] = ui.Span(f.cha:permissions() or "")
+		elseif mode == "numfile" then
+			if f.cha.is_dir then
+				local handle = io.popen('find "' .. f.url .. '" -maxdepth 1 -type d,f | wc -l', "r")
+				local count = handle:read("*a") - 1
+				handle:close()
+
+				spans[#spans + 1] = ui.Span(count)
+			end
 		end
 
 		spans[#spans + 1] = ui.Span(" ")
 		lines[#lines + 1] = ui.Line(spans)
 	end
 	return ui.Paragraph(area, lines):align(ui.Paragraph.RIGHT)
 end

Just add linemode = "numfile" under [manager] in your yazi.toml

Though this not a general solution as it uses find and wc, and so Windows user would need to use their Windows equivalents.

Would be good if there is a file:numfile() or file.cha.numfile.

@matchatealeaf Thank you very much! Very kind of you. I'll try that now.