stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.91k stars 112 forks source link

feature request: Support for Media File Previews #83

Closed adelgado0723 closed 12 months ago

adelgado0723 commented 1 year ago

Did you check existing requests?

Describe the feature

I would like to be able to see previews for image, video, pdf, svg, and other media files in the preview pane brought up with . Perhaps by leveraging some of the tools used as dependencies of telescope-media-files.nvim.

Provide background

I am trying to rename and move around media files in bulk and would really like to be able to do this using oil's 'editable file explorer buffer'. Currently, I'm using the ranger file browser, but it can be slow and buggy.

Additional details

I've tried telescope-media-files.nvim, but would like this functionality in the file explorer instead of a fuzy finder.

adelgado0723 commented 1 year ago

It would be my first time working on something like this, but I could take a stab at it if it's something people think is in-line with the vision for oil.

stevearc commented 1 year ago

I'm probably not going to work on this myself, but I would review a PR. If you're interested, this could potentially even be implemented as a separate plugin that any file explorer can hook into.

adelarsq commented 1 year ago

@adelgado0723 If you use wezterm I have created a plugin for this (image_preview.nvim). Using oil and pressing <leader>p shows like this:

image

@stevearc It's there any way to override select action? So would be possible to open image files with <cr> instead of <leader>p (default mapping for my plugin)

stevearc commented 12 months ago

It looks like image.nvim released a new version that does this for images!

I'm going to close this issue now because even though there isn't an established solution for pdf/video, it's outside the scope of oil. This functionality is best handled by other plugins.