sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.74k stars 389 forks source link

Feature requests #51

Open sxyazi opened 1 year ago

sxyazi commented 1 year ago

Bugs

Features

maxzinkus commented 1 year ago

Thank you so much for this awesome project!!

A few feature requests:

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

otakutyrant commented 1 year ago

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.

asim215 commented 1 year ago

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)

otakutyrant commented 1 year ago

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

sxyazi commented 1 year ago

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

maxzinkus commented 1 year ago

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.

otakutyrant commented 1 year ago

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

sxyazi commented 1 year ago

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

otakutyrant commented 1 year ago

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.

sxyazi commented 1 year ago

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

otakutyrant commented 1 year ago

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 commented 1 year ago

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.

sxyazi commented 1 year ago

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?

otakutyrant commented 1 year ago

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.

sxyazi commented 1 year ago

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.

dan-da commented 1 year ago

some feature requests:

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

It is nice enough to want more. ;-)

Eric-Song-Nop commented 1 year ago

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.

dan-da commented 1 year ago

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.

maxzinkus commented 1 year ago

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!

sxyazi commented 1 year ago

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

c02y commented 1 year ago

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

sxyazi commented 1 year ago

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

c02y commented 1 year ago

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

sxyazi commented 1 year ago

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.

c02y commented 1 year ago

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.

ctem commented 1 year ago

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

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

Eric-Song-Nop commented 1 year ago

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

ndtoan96 commented 1 year ago

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.
sxyazi commented 1 year ago

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

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

clux commented 1 year ago

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)

sxyazi commented 1 year ago

@clux See https://github.com/sxyazi/yazi/issues/158#issuecomment-1722130381

5ouma commented 1 year ago

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

asukaminato0721 commented 1 year ago

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

sxyazi commented 1 year ago

@asukaminato0721 The upcoming Yazi plugin system will allow users to use their own previewers to implement it, see https://github.com/sxyazi/yazi/issues/182

v01dnu11 commented 1 year ago

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

asim215 commented 1 year ago

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?

v01dnu11 commented 1 year ago

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.

mbirth commented 1 year ago

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

mb720 commented 1 year ago

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.

ndtoan96 commented 1 year ago

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.

brimless commented 1 year ago

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.

ndtoan96 commented 1 year ago

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)

euglevi commented 1 year ago

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?

sxyazi commented 1 year ago

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: https://github.com/sxyazi/yazi/pull/161 and https://github.com/sxyazi/yazi/pull/221. They should be merged soon.

brimless commented 1 year ago

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?

ndtoan96 commented 1 year ago

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" },

khaneliman commented 1 year ago

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.

sxyazi commented 1 year ago

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

khaneliman commented 1 year ago

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.

boydaihungst commented 1 year ago

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