Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature requests #51

Open
30 of 55 tasks
sxyazi opened this issue Aug 12, 2023 · 161 comments
Open
30 of 55 tasks

Feature requests #51

sxyazi opened this issue Aug 12, 2023 · 161 comments

Comments

@sxyazi
Copy link
Owner

sxyazi commented Aug 12, 2023

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

@maxzinkus

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@asim215

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@sxyazi

This comment was marked as resolved.

@maxzinkus

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@sxyazi

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@sxyazi

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@sxyazi

This comment was marked as resolved.

@otakutyrant

This comment was marked as resolved.

@sxyazi

This comment was marked as resolved.

@dan-da
Copy link

dan-da commented Sep 12, 2023

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

@Eric-Song-Nop
Copy link
Contributor

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
Copy link

dan-da commented Sep 12, 2023

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
Copy link

maxzinkus commented Sep 12, 2023

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
Copy link
Owner Author

sxyazi commented Sep 13, 2023

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

@c02y
Copy link

c02y commented Sep 13, 2023

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

This comment was marked as outdated.

@c02y

This comment was marked as outdated.

@sxyazi

This comment was marked as outdated.

@c02y

This comment was marked as outdated.

@ctem

This comment was marked as resolved.

@DivineMK
Copy link

DivineMK commented Aug 1, 2024

Aside from #51 (comment), 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 #1321.

@Nic-Vladimir
Copy link

@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
Copy link
Owner Author

sxyazi commented Aug 3, 2024

@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
Copy link

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
Copy link

jshu-git commented Aug 5, 2024

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
Copy link

404Wolf commented Aug 11, 2024

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
Copy link

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
Copy link

404Wolf commented Aug 12, 2024

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
Copy link

poplawskidaniel commented Aug 18, 2024

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
Copy link

mrdgo commented Sep 9, 2024

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.

@QuantenToast
Copy link

I found ways to yank images to the system clipboard, however, I wasn't able to find a way to

  • paste an image from the system clipboard to a file,

like you can e.g. in dolphin.

@mcmoodoo
Copy link

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

thank you. Hidden files visibility was a life changer for me. I use yazi a lot, but will now use it ALL the time!

@corigne
Copy link

corigne commented Oct 1, 2024

Is there any traction on animated gif support in image previews? A branch or PR I can looks at perhaps? Kitty has animation support built in from 0.2 onward, and I'm curious if anyone has taken a crack at it yet.

@itsmenewbie03
Copy link

Is it possible to have vim mode in the rename pop up?
In neo-tree inside nvim it has that feature.
Yazi Rename:
image
NeoTree Rename:
image

@Axlefublr
Copy link

Is it possible to have vim mode in the rename pop up? In neo-tree inside nvim it has that feature. Yazi Rename: image NeoTree Rename: image

The way I do that, is by selecting the current entry and pressing rename. Then it will appear in my editor. Although having this be possible in a more direct way would be way more convenient, I basically always want to rename in my editor.

@fmorroni
Copy link

fmorroni commented Oct 7, 2024

Is it possible to have vim mode in the rename pop up?
In neo-tree inside nvim it has that feature.
Yazi Rename:
image
NeoTree Rename:
image

I'm not sure what you mean, for me the rename pop up is already a vim input. Meaning if I press r over a file the rename pop up opens, it starts in insert mode but I can press escape and change to normal mode and move the cursor and delete with regular vim keybinds.

@itsmenewbie03
Copy link

@fmorroni I tested and can confirm that it does exactly go to normal mode when you hit Esc, however motions like df. doesn't seem to work, even diw.

@fmorroni
Copy link

fmorroni commented Oct 7, 2024

@fmorroni I tested and can confirm that it does exactly go to normal mode when you hit Esc, however motions like df. doesn't seem to work, even diw.

Yeah, it's a very limited vim implementation, but it's good enough for renaming a couple of files every now and then.

@boydaihungst
Copy link

boydaihungst commented Oct 18, 2024

I implemented Truncate long filenames in the file list feature for this plugin. In case anyone needs it.
https://github.com/boydaihungst/relative-motions.yazi
Here is the result:
2024-10-18T22:22:33,441169661+07:00

@sxyazi
Copy link
Owner Author

sxyazi commented Oct 18, 2024

This looks amazing @boydaihungst!

Would you like to try porting it to Yazi's codebase?

@boydaihungst
Copy link

All I do is modify Current:render, Entity:render, Entity:highlight, Entity:symlink.

The idea is: we sort all Entity children/components in 2 bucket: resizable (highlight with id = 4, symlink with id = 6) and unresizable component (the rest). Count used character length (width), total usable space and max width for each of resizable components. Do the math to resize them, truncate if overflowed.

The first Entity._children loop: run as normal to get width, total width, resizable component's width, unresizable's component's width.

  • I run every entity component render function (i.e. Entity:highlights) like normal, so I can get the width() of those component, total_length_resizable of all resizable components and total_length_unresizable of all unresizable components.
  • I also add some extra metadata into Entity._children
    • length(integer) is component's width
    • max_length (integer) is the maximum size this component can render before get truncated. 0 because we need to calculate it later after knowing total_length_unresizable and total_length_resizable.
    • resizable (boolean) flag to know which components are resizable

now Entity should looks like this:

Entity = {
	_inc = 1000,
	_children = {
		{ "space", id = 1, order = 1000 },
		{ "icon", id = 2, order = 2000 },
		{ "prefix", id = 3, order = 3000 },
		{ "highlights", id = 4, order = 4000, resizable = true, length = xxx (integer), max_length = 0 (integer)  },
		{ "found", id = 5, order = 5000 },
		{ "symlink", id = 6, order = 6000, resizable = true, length = xxx (integer), max_length = 0 (integer)   },
	},
}

The second Entity._children loop: calculate max_length for each resizable component/children (i.e. highlight and symlink components)

-- Usable/Free space for resizable components (tab current width minus total used space of unresizable components)
local total_length_unresizable = entity_line_number_char_length + linemode_char_length + icon, prefix, found length, etc
-- 
-- (this is because those two component aren't entity components, so we have to minus their `character length/count` manually. This is why I don't know how to port it to Yazi's codebase)

local usable_space = current_tab_window_w - total_length_unresizable
local percent_per_length_size = 100 / total_length_resizable

-- Calculate max_length for each resizable component/children
for c_idx, c in ipairs(entity_self._children) do
   if c.resizable then
       entity_self._children[c_idx].max_length = math.floor(
   	    percent_per_length_size * c.length * usable_space / 100
       ) - count_resizable_component
   end
end

The last thing: replace render function of each resizable entity component (highlight, symlink)

I modified both entity.highlights and entity.symlink instead of the global Entity:highlight and Entity:symlink.
They use shorten func to truncate the filename, link_to before rendering, which takes 3 arguments (max_width, the filename/link_to/etc, the extension/tail).

At the end, run last loop again to render entities. And return it to Current.render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests