sxyazi / yazi

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

Feature requests #51

Open sxyazi opened 1 year ago

sxyazi commented 1 year ago

Bugs

Features

fmorroni commented 7 months ago

Feature request: I started using yazi on neovim with the help of the plugin Rolv-Apneseth/tfm.nvim and it would be cool to have a way to search for a file/directory in interactive mode but starting from the project root, no matter where you're currently positioned. Or at least a keybind that would always go to the project root (something like gh and gc but that would always go to the current project's root).

xzhang17 commented 7 months ago
Snipaste_2024-02-23_22-22-27

Is there any way to navigate the left column, i.e. the parent folders, directly on the screen instead of use the back arrow going to the parent folders? Such as I want to navigate to the parent folder "Movies" on the left column directly, which key shortcut should I use? Or is there any way to do this?

rockydd commented 7 months ago

Feature request: I started using yazi on neovim with the help of the plugin Rolv-Apneseth/tfm.nvim and it would be cool to have a way to search for a file/directory in interactive mode but starting from the project root, no matter where you're currently positioned. Or at least a keybind that would always go to the project root (something like gh and gc but that would always go to the current project's root).

Hi @fmorroni , did you get the image preview work in Neovim?

fmorroni commented 7 months ago

Hi @fmorroni , did you get the image preview work in Neovim?

@rockydd I didn't really need image preview so I haven't even installed the necessary dependencies to use that feature. Did it not work for you?

rockydd commented 7 months ago

Hi @fmorroni , did you get the image preview work in Neovim?

@rockydd I didn't really need image preview so I haven't even installed the necessary dependencies to use that feature. Did it not work for you?

Indeed, the image preview functions correctly outside of NeoVIM, but it doesn't work within it.

jebaum commented 6 months ago

Snipaste_2024-02-23_22-22-27 Is there any way to navigate the left column, i.e. the parent folders, directly on the screen instead of use the back arrow going to the parent folders? Such as I want to navigate to the parent folder "Movies" on the left column directly, which key shortcut should I use? Or is there any way to do this?

as far as I can tell after reading all the configuration docs and the preset config files, there's no way to do this currently in yazi. in ranger, there is "move_parent 1" and "move_parent -1" which does exactly this, and I use it all the time. so big +1 to adding this to yazi

cbr9 commented 6 months ago

It would be a great improvement to ditch fzf in support of nucleo (https://github.com/helix-editor/nucleo), helix's fuzzy matcher, which is way faster, and can be integrated into the native ui, instead of having to drop to the shell

Brixy commented 6 months ago

Hi @cbr9,

nucleo support has been suggested in #140.

sxyazi commented 6 months ago

@swaroopanand10

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.

Line wrapping and horizontal scrolling can both accomplish this task, but I'm not sure which is better, as I rarely use either. There is a discussion about it https://github.com/sxyazi/yazi/discussions/265, feel free to leave your thoughts, and then we can move forward with it.

@nonetrix

So +1 for managing archives as if they where directories

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.

There are two main factors blocking its implementation:

  1. Yazi does not yet have a virtual file system, which requires a certain level of abstraction that is unfamiliar to me, I need to find time to try it, but it is not a priority.
  2. Rust currently does not have a library like Golang's archiver, which integrates almost all archive formats and provides a consistent API. Yazi is written in Rust, so if we want to have this functionality, we may need to integrate and build these formats from scratch, this will require a lot of work to do.

Currently, you can achieve this using archivemount, it has some performance issues, but works.

@LinArcX

the first version of the audio preview using mpg123:

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.

Yep when you switch files, Yazi will discard the tasks in the preview. I think implementing it as a previewer is not very reasonable and it should be implemented as a functional plugin.

@taylo2allen

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.

I think you can simply symlink a single keymap.toml configuration file in that script, and if you want to change the path for all three files at the same time when Yazi starts, use YAZI_CONFIG_HOME.

@analyticmind

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

This is because folder could be nil when what you're previewing isn't a directory, so just adding a check should fix it:

local precount = cx.active.preview.folder and #cx.active.preview.folder.files or 0

@fmorroni

I started using yazi on neovim with the help of the plugin Rolv-Apneseth/tfm.nvim and it would be cool to have a way to search for a file/directory in interactive mode but starting from the project root, no matter where you're currently positioned.

Yazi can receive a directory as an argument when starting, like yazi /foo/bar. The simplest way I can think of to implement this is to pass the project's root directory to Yazi, which I believe is what the Neovim plugin needs to do.

@xzhang17

Is there any way to navigate the left column, i.e. the parent folders, directly on the screen instead of use the back arrow going to the parent folders?

@jebaum

as far as I can tell after reading all the configuration docs and the preset config files, there's no way to do this currently in yazi. in ranger, there is "move_parent 1" and "move_parent -1" which does exactly this, and I use it all the time. so big +1 to adding this to yazi

It can be easily implemented as a plugin with just a few lines of code. I've written one and adds it to the tips, https://yazi-rs.github.io/docs/tips#parent-arrow, feel free to use it.

qrockz commented 6 months ago

TermVisage 233488260-6e7ce3fe-7561-44f7-aafe-d7a708e14758

Thumbnail browsing/navigation for image/movie directories would be absolute amazing!

magnetophon commented 6 months ago

@qrockz

TermVisage Thumbnail browsing/navigation for image/movie directories would be absolute amazing!

@Sonico98 (Not sure if it's the sam Sonico...) made something amazing for this: https://discord.com/channels/1136203602898194542/1146658361740369960/1216462142522523698

teto commented 6 months ago

I dont know if it's doable as a plugin but in nautilus when you search, nautilus search into subfolders as well. I like the yazi search limited to the current folder and it should stay the default but I wouldn't mind from time to time to launch a deep search with the results appearing in yazi

c02y commented 5 months ago

Is it able to get size of current file/dir or selected files/dirs?

I wrote a feature requests a few months ago, I decided to completely replace ranger with yazi recently, it seems I couldn't find anything like it in the doc or preset keymap.toml. https://github.com/sxyazi/yazi/issues/51#issuecomment-1717978149

6. be able to get size of current selected files/dirs or all the files/dirs in the list

I can run = "sort size", but I simply want to get size instead of getting size and sorting the whole list.

fmorroni commented 5 months ago

Is it able to get size of current file/dir or selected files/dirs?

I wrote a feature requests a few months ago, I decided to completely replace ranger with yazi recently, it seems I couldn't find anything like it in the doc or preset keymap.toml. https://github.com/sxyazi/yazi/issues/51#issuecomment-1717978149

6. be able to get size of current selected files/dirs or all the files/dirs in the list

I can run = "sort size", but I simply want to get size instead of getting size and sorting the whole list.

You can show the size of the files in the current directory with ms by default I think (search the command list for the word "size" and you should find it). I don't think you can show the combined size for the selected files tho

c02y commented 5 months ago

@fmorroni I already set linemode = "size" in yazi.toml, but it won't show size of directories (this is the better way otherwise it will slow start time of yazi), and even if after I use sort size to get all the sizes of the list, when the content of a directory is changed, the size of the directory won't be updated, so I have to manually sort size again which will sort the list again.

So a command like get size for current file/dir or selected files/dirs would be really helpful.

jebaum commented 5 months ago

The way ranger handles this is nice - the number of entries in a directory is shown by default, not the total size. That's quick and cheap to get. Then you can use a keybind to calculate the size for a particular directory, or every directory in your CWD

c02y commented 5 months ago

Feature request:

In ranger, there is a command like map da cut mode=add which will cut the item into a stack every time you run it, this is very useful when you try to cut multiple items, especially when they are in different places, and then paste them into one location.

This is very handy when working with parrent-arrow plugin, I use this kind of function a lot in ranger.

fmorroni commented 5 months ago

Feature request:

In ranger, there is a command like map da cut mode=add which will cut the item into a stack every time you run it, this is very useful when you try to cut multiple items, especially when they are in different places, and then paste them into one location.

This is very handy when working with parrent-arrow plugin, I use this kind of function a lot in ranger.

Correct me if I'm wrong, but this sound very similar to selecting the items with space and cutting them with x. What would be the advantage of the ranger method? I haven't used the parent-arrow plugin, does selection not work while navigating the parent directory?

c02y commented 5 months ago

@fmorroni you are right, I'm just used to cut mod=add one by one, forget that I can select them one by one and cut them all in one cut command. This works.

Thanks.

c02y commented 5 months ago

Is it able to get size of current file/dir or selected files/dirs?

I wrote a feature requests a few months ago, I decided to completely replace ranger with yazi recently, it seems I couldn't find anything like it in the doc or preset keymap.toml. #51 (comment)

6. be able to get size of current selected files/dirs or all the files/dirs in the list

I can run = "sort size", but I simply want to get size instead of getting size and sorting the whole list.

I found another use case, then I use f to filter the files such as mp4 files, I need to select them all and get the total size of them all, now I select them all, but I don't know how to get the total size.

It is not the size of every selected files/dirs feature, it is the total size of selected files/dirs.

bvr-yr commented 5 months ago

may I ask if there is some estimated time point when mouse support gonna be added? this is last thing stopping me from rm -rf ranger, I just got TOO used to scroll the previewer

also about Git Integration request: it's gonna be only status icons or full integration exposing stuff like last commit message, date, etc?

jmlucjav commented 5 months ago

Would it be possible to overwrite some config value in the command line? So yazi would use the .config/yazi config but some value(s) would be overwriten.

The use case is when using yazi in a two pane mode, I want to set mostly the same config but I change a couple of values. Now I have to have to config dirs, and use one for each yazi process, but woudl be nicer to have just one and overwrite certain values...

thanks!

jmlucjav commented 5 months ago

Another two requests regarding tabs:

  1. apparently there is no way to define tabs to be opened at startup in config file, could we have this?
  2. in a two pane mode, if you had tabs 1,2 in yazi process A, and tabs1,2 in yazi process B. When you moved betweeen tabs 1/2 in A, it would be desired B also moved to the same tab. Is this doable somehow with DDS I guess?

thanks!

vasyakrg commented 4 months ago

my feature request:

UltraBlackLinux commented 4 months ago

My feature request: Have yazi automatically cd into the entered directories, meaning that when you exit yazi, your PWD is the directory last used by yazi. Offering a cd open-with command doesn't seem to work, as the command is apparently spawned in a different thread This would be useful because you don't always have that one single solution to deal with a file. If I want to execute a compiler in a directory I can't just set that up in yazi, it would be way too much work.

fmorroni commented 4 months ago

My feature request: Have yazi automatically cd into the entered directories, meaning that when you exit yazi, your PWD is the directory last used by yazi.

This already exists, that's how I have it set up. I'm not near my computer to check the config but it should be explained somewhere in the docs

knuesel commented 4 months ago

Yes that's what the shell wrapper described in https://yazi-rs.github.io/docs/quick-start does.

c02y commented 4 months ago

Feature request or bug report:

I Sort by size for the list, the size of file/dir in the list will not be updated even I sort by size again, there are some kind of background tasks in other terminal session that will increase the file size such as downloading, unless I restart yazi.

mrlectus commented 3 months ago

Feature request: Save/remember sort preference for each folder

yorunoken commented 3 months ago

ability to copy file data #1246 edit: it's already possible using keymaps

amatagonsk commented 2 months ago

Feature request:

add sequential option yank & paste function (paste.rs, scheduler.rs::file_cut, file_copy)?

reason why:

when i manage large file (yank&paste), make a mistake close or clash yazi getting me sad. if sequential option exist, fail file is only one. currently support parallel only (or i cannot find out that)

not convenient approach:

copy dest path and paste, then some keybind like↓

{ on = [ "somekey" ],  run = """shell 'read dest; for i in "$@" ; do mv|cp "$i" "$dest" ; done ' --block --confirm"""}
llanosrocas commented 2 months ago

Feature request

Add support for cmd key keybinding on MacOS. Related: #1056

sxyazi commented 2 months ago

Feature request

Add support for cmd key keybinding on MacOS. Related: #1056

@llanosrocas It is already supported in https://github.com/sxyazi/yazi/issues/1065 and currently needs to be built from the latest main branch, https://yazi-rs.github.io/docs/installation#build-from-source

LeoXing1996 commented 2 months ago

Thanks for this great tool. Can yazi support automatically navigating the terminal to the currently browsed folder when exit?

sedlund commented 2 months ago

Thanks for this great tool. Can yazi support automatically navigating the terminal to the currently browsed folder when exit?

https://yazi-rs.github.io/docs/quick-start#shell-wrapper

cbr9 commented 2 months ago

Would it be possible to have directory-specific keybindings?

Meaning, keybindings that would only be active in certain directories. This would be nice in certain workflows, and could in some situations avoid running out of key combinations

adriangalilea commented 2 months ago

Would it be possible to have directory-specific keybindings?

I'm a yazi noob but if yazi changes directory under the hood you may use something like direnv or zsh-autoenv to trigger something else. That way the config per directory is also stored in the directory, which is the way I like it.

Or maybe there are better ways.

cbr9 commented 2 months ago

Would it be possible to have directory-specific keybindings?

I'm a yazi noob but if yazi changes directory under the hood you may use something like direnv or zsh-autoenv to trigger something else. That way the config per directory is also stored in the directory, which is the way I like it.

Or maybe there are better ways.

I am constantly switching between Windows on my work laptop (using Nushell, since WSL doesn't work on my laptop due to SSL issues) and Linux at home. Not sure how this solution would work.

One idea would be that yazi load directory-specific configs, merging them with the global one

sxyazi commented 2 months ago

Hey @cbr9, if you want a key to have different behaviors in different directories, I think this can be easily achieved through the plugin system with just a few lines of code:

-- ~/.config/yazi/plugins/key-actions.yazi/init.lua
return {
  entry = function()
    local dir = tostring(cx.active.current.cwd)
    if dir:find("Downloads") then
      ya.manager_emit("open", {})  -- Change to your desired command
    else
      ya.manager_emit("enter", {}) -- Change to your desired command
    end
  end,
}

Then bind it to your key:

{ on = "o", run = "plugin --sync key-actions" }

If you have multiple keys with different behaviors in different directories, you can reuse the plugin by passing a different argument:

{ on = "a", run = "plugin --sync key-actions --args=a" }
{ on = "b", run = "plugin --sync key-actions --args=b" }
{ on = "c", run = "plugin --sync key-actions --args=c" }

Doc of the functional plugin: https://yazi-rs.github.io/docs/plugins/overview#functional-plugin

different-name commented 2 months ago

Is it possible to extract the contents of a directory without wrapping it in a folder? (press enter on it and have the contents extracted into the cwd

Is it possible to paste a yanked folder into a directory that has a folder of the same name, and have the contents added to the existing folder, instead of renaming the yanked folder

DivineMK commented 2 months ago

Aside from https://github.com/sxyazi/yazi/issues/51#issuecomment-2259915525, I wonder how to add the ability to extract to desired directory instead of current directory, with a interactive input, similar to the new extract plugin's password input https://github.com/sxyazi/yazi/pull/1321.

Nic-Vladimir commented 2 months ago

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

I am kinda new to the project. where would I have to put this shell for it to work? (I am on arch, yazi 2.5 version)

sxyazi commented 2 months ago

@Nic-Vladimir That way is no longer recommended because we now have the compress.yazi plugin, which is much better than that, https://github.com/KKV9/compress.yazi.

5183nischal commented 2 months ago

Hi, I want to check if there is an easy way to invert the color of the previews? Foe example, i preview a lot of pdfs and would be great to be able to invert the color before preview!

jshu-git commented 1 month ago

Wondering if there's a way to combine the escape and quit keymaps into one, such that if the user isn't finding/in visual mode/selecting/etc., we exit the process.

There's a similar setting for those familiar with LazyGit: quitOnTopLevelReturn.

This way, <Esc> can cancel/exit from everything, including the program itself, instead of having to remember to press q at the "top level".

404Wolf commented 1 month ago

It would be super cool if we could get an integration with archivemount to automatically be able to just walk right into a tar! Just an idea for a plugin or add on.

Sonico98 commented 1 month ago

It would be super cool if we could get an integration with archivemount to automatically be able to just walk right into a tar! Just an idea for a plugin or add on.

There's https://github.com/AnirudhG07/archivemount.yazi

404Wolf commented 1 month ago

It would be super cool if we could get an integration with archivemount to automatically be able to just walk right into a tar! Just an idea for a plugin or add on.

There's https://github.com/AnirudhG07/archivemount.yazi

Wow that's epic, thanks for sharing!

poplawskidaniel commented 1 month ago

Possible to add and use bookmarks similar to ranger bookmarks: https://github.com/ranger/ranger/wiki/Official-User-Guide#bookmarks

Edit: I found plugin exactly doing that: https://github.com/dedukun/bookmarks.yazi

mrdgo commented 3 weeks ago

Hi, I want to check if there is an easy way to invert the color of the previews? Foe example, i preview a lot of pdfs and would be great to be able to invert the color before preview!

Even better: use zathura for previews.