yazi icon indicating copy to clipboard operation
yazi copied to clipboard

Feature requests

Open sxyazi opened this issue 1 year ago • 184 comments

Bugs

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

Features

  • [x] Forward / Backward No request

  • [x] Find next/previous file (not the Search feature that's already existing) Requested by @teto, https://github.com/sxyazi/yazi/issues/81

  • [x] Custom preloader / previewer Requested by @Neurognostic, https://github.com/sxyazi/yazi/issues/182

  • [x] Filter files in real-time Requested by @musjj, https://github.com/sxyazi/yazi/issues/137

  • [x] Make the preview scrollable Requested by cg00@Discord

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

  • [x] Git integration Requested by @g-plane, @cap153, @cxwx

  • [x] Copy file path Requested by @Gajus84, https://github.com/sxyazi/yazi/issues/70

  • [x] Mouse actions binding in keymap.toml Requested by @Gajus84, https://github.com/sxyazi/yazi/issues/70

  • [x] macOS-like file tag Requested by @sxyazi

  • [x] Transparent images support No request

  • [ ] GIFs images support Requested by @JustinBacher, https://github.com/sxyazi/yazi/issues/1195

  • [x] Customizable scroll offset and popup position improvement No request

  • [x] Better borders style Requested by @sxyazi

  • [x] Case-insensitive sorting No request

  • [x] Emacs readline keybindings for Input component Requested by @teto

  • [x] Auto-completion for Input component Requested by @maxzinkus

  • [x] Custom manager layout Requested by @KeqiZeng, https://github.com/sxyazi/yazi/issues/71

  • [x] Sort files naturally Requested by @asim215

  • [x] Show all binding keymaps Requested by @hackers267, @maxzinkus, https://github.com/sxyazi/yazi/issues/79

  • [x] Show file size after the filename Requested by @sxzz, https://github.com/sxyazi/yazi/issues/88#issuecomment-1694574535

  • [x] Display of the number of currently selected/cut/copied files Requested by @Gajus84, https://github.com/sxyazi/yazi/issues/85

  • [x] A floating window to glance at more information about this file (mime-type, atime/btime/mtime, previewer, preloaders, EXIF for images/videos, etc.) Requested by @Gajus84, @teto, https://github.com/sxyazi/yazi/issues/85, https://github.com/sxyazi/yazi/issues/831#issuecomment-2025577223

  • [x] Re-previewing in real-time when the file content changes Requested by @otakutyrant, https://github.com/sxyazi/yazi/issues/129

  • [ ] Shell command history Requested by @mbirth, https://github.com/sxyazi/yazi/issues/51#issuecomment-1734632058

  • [x] Sorting by file type Requested by @v01dnu11, https://github.com/sxyazi/yazi/issues/51#issuecomment-1732358619

  • [ ] Hide specified files or directories Requested by @5ouma, @grig-iv https://github.com/sxyazi/yazi/issues/51#issuecomment-1725011140, https://github.com/sxyazi/yazi/issues/694

  • [x] Add --no-cwd-file to the close command Requested by @kockahonza, https://github.com/sxyazi/yazi/issues/1629

  • [ ] Shell completion Requested by @MinaMatta98, https://github.com/sxyazi/yazi/issues/420

  • [ ] Remote file management Requested by @Xuanwo, https://github.com/sxyazi/yazi/issues/434, https://github.com/sxyazi/yazi/issues/611

  • [ ] Archives as directories Requested by @git-rz, https://github.com/sxyazi/yazi/issues/417

  • [x] Auto-complete supports smart case Requested by @RioNight, https://github.com/sxyazi/yazi/issues/547

  • [x] Natural sorting supports Hungarian letters Requested by @og900aero, https://github.com/sxyazi/yazi/issues/616

  • [ ] Group tasks in Task Manager by "Running"/"Failed" Requested by @teto, https://github.com/sxyazi/yazi/issues/1105

  • [ ] Dual panel Requested by @c02y, @vladimir-salvador, https://github.com/sxyazi/yazi/issues/51#issuecomment-1717978149, https://github.com/sxyazi/yazi/issues/1294

  • [ ] Improve ya pack subcommand Requested by @uncenter, https://github.com/sxyazi/yazi/issues/1509, https://github.com/sxyazi/yazi/issues/1510

  • [x] Remove package with ya pack subcommand No request

  • [ ] Command macros No request

  • [x] Functional plugin support for --name=value parameters No request

  • [x] Previewer/preloader/fetcher support for passing parameters No request

  • [ ] Refactor the scheduler: for actions like copy, cut, delete, separate micro and macro tasks into two phases, first gather enough information, then operations No request

  • [ ] Redesign [filetype] to expand functionality and improve performance No request

  • [x] Remove x- prefixes from mime-types as it's discouraged as per rfc6838#section-3.4 - https://github.com/sxyazi/yazi/discussions/1663#discussioncomment-10705174. No request

  • [ ] Allow changing the border type of input/completion/tasks components Requested by @Axlefublr, https://github.com/sxyazi/yazi/issues/1552

  • [ ] Support UTF-16 encoded file preview for the preset code previewer No request

  • [ ] Experimental parameter macro support (%) Requested by @gotbletu, https://github.com/sxyazi/yazi/issues/1318

  • [x] Allow changing the style of the confirm component in theme.toml No request

  • [ ] Truncate long filenames in the file list Requested by @Brixy, https://github.com/sxyazi/yazi/issues/903

  • [ ] theme.toml supports plugin-specific styles within [plugin] No request

  • [x] Move mode_normal, mode_select, and mode_unset in theme.toml to a separate [mode] block as normal_open, normal_close, select_open, etc. (better names needed) Requested by @imsi32, https://github.com/sxyazi/yazi/issues/1228

  • [x] ~~Add snap to snapcraft.io~~ Add flatpak to flathub.org Requested by @DevelSSN, https://github.com/sxyazi/yazi/issues/1631, done in https://github.com/sxyazi/yazi/issues/2080

  • [x] Support auto-switching between dark/light flavors Requested by @markmacode, https://github.com/sxyazi/yazi/issues/988

  • [ ] Immediately place the cursor on the first file to be copied/moved when copying/moving files Requested by @exquo, https://github.com/sxyazi/yazi/issues/1950

  • [ ] New toggle and visual DDS event allow users to implement plugins that involve selection states Requested by @aidancz, https://github.com/sxyazi/yazi/issues/1748

sxyazi avatar Aug 12 '23 17:08 sxyazi

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)
  • <Tab> completion in the input field (for file/directory names)

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

maxzinkus avatar Aug 23 '23 04:08 maxzinkus

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.

otakutyrant avatar Aug 23 '23 04:08 otakutyrant

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)

asim215 avatar Aug 23 '23 06:08 asim215

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

otakutyrant avatar Aug 23 '23 07:08 otakutyrant

@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.

sxyazi avatar Aug 23 '23 17:08 sxyazi

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.

maxzinkus avatar Aug 23 '23 18:08 maxzinkus

@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.

otakutyrant avatar Aug 24 '23 02:08 otakutyrant

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

sxyazi avatar Aug 24 '23 02:08 sxyazi

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 avatar Aug 24 '23 03:08 otakutyrant

@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?

sxyazi avatar Aug 24 '23 04:08 sxyazi

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.

otakutyrant avatar Aug 24 '23 05:08 otakutyrant

How incovenient it is.

https://github.com/sxyazi/yazi/assets/64188229/90ee9f11-4157-41e7-b6af-72a82301f1d7

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

https://github.com/sxyazi/yazi/assets/64188229/841a34da-a9fa-4fed-902c-9ac598eed8da

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

otakutyrant avatar Aug 24 '23 05:08 otakutyrant

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?

sxyazi avatar Aug 24 '23 06:08 sxyazi

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.

otakutyrant avatar Aug 24 '23 06:08 otakutyrant

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.

sxyazi avatar Aug 24 '23 06:08 sxyazi

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 avatar Sep 12 '23 06:09 dan-da

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.

Eric-Song-Nop avatar Sep 12 '23 09:09 Eric-Song-Nop

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.

dan-da avatar Sep 12 '23 19:09 dan-da

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 avatar Sep 12 '23 20:09 maxzinkus

@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: https://github.com/sxyazi/yazi/blob/cbe0fd5c73c0ba1af354c374eb85e39c1040c184/config/preset/keymap.toml#L73-L83

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.

sxyazi avatar Sep 13 '23 00:09 sxyazi

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 avatar Sep 13 '23 16:09 c02y

@c02y

show only the middle column, like ranger's viewmode

It's already supported, see https://github.com/sxyazi/yazi/pull/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).

sxyazi avatar Sep 13 '23 16:09 sxyazi

@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.

c02y avatar Sep 13 '23 16:09 c02y

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.

sxyazi avatar Sep 13 '23 17:09 sxyazi

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.

c02y avatar Sep 13 '23 17:09 c02y

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 avatar Sep 16 '23 11:09 ctem

@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!

Eric-Song-Nop avatar Sep 16 '23 12:09 Eric-Song-Nop

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.

ndtoan96 avatar Sep 17 '23 01:09 ndtoan96

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

Yep, see https://github.com/sxyazi/yazi/issues/90#issuecomment-1695451667

sxyazi avatar Sep 17 '23 06:09 sxyazi

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)

clux avatar Sep 17 '23 22:09 clux