NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
264 stars 24 forks source link

Can't work in nvim terminal #17

Closed yyy33 closed 1 year ago

yyy33 commented 1 year ago

22

My pdf, office, picture preview of the effect are displayed like this, my nvim version is NVIM v0.7.2

NikitaIvanovV commented 1 year ago

Do you use Xorg or Wayland?

yyy33 commented 1 year ago

Do you use Xorg or Wayland?

i am use xorg now

yyy33 commented 1 year ago

Do you use Xorg or Wayland?

But I can preview the images normally using ranger and w3m

yyy33 commented 1 year ago

Do you use Xorg or Wayland?

222

NikitaIvanovV commented 1 year ago

Does ctpv image previews work in other terminals? Did you install ueberzug package?

yyy33 commented 1 year ago

Does ctpv image previews work in other terminals? Did you install ueberzug package?

yes, i installed, it is work in alacritty

NikitaIvanovV commented 1 year ago

Could you please send a screenshot showing that it works fine in Alacritty?

yyy33 commented 1 year ago

Could you please send a screenshot showing that it works fine in Alacritty?

This is alacritty work with ueberzug 5555

yyy33 commented 1 year ago

Could you please send a screenshot showing that it works fine in Alacritty?

This is nvim terminal work with ueberzug, it is show nothing 6666

yyy33 commented 1 year ago

e

Could you please send a screenshot showing that it works fine in Alacritty?

This is alacritty work with chafa, Cannot display properly 34

yyy33 commented 1 year ago

ee

Could you please send a screenshot showing that it works fine in Alacritty?

This is nvim terminal work whith chafa, Cannot display properly too 88

NikitaIvanovV commented 1 year ago

This is alacritty work with chafa, Cannot display properly

Actually, it is how image previews with chafa are supposed to look. It draws an image with terminal characters; this method works in every terminal and system but is of bad quality.

I've done some testing and ueberzug image previews work well in nvim terminal. Could you please share more information about your system? Linux distribution version, ueberzug version?

yyy33 commented 1 year ago

This is alacritty work with chafa, Cannot display properly

Actually, it is how image previews with chafa are supposed to look. It draws an image with terminal characters; this method works in every terminal and system but is of bad quality.

I've done some testing and ueberzug image previews work well in nvim terminal. Could you please share more information about your system? Linux distribution version, ueberzug version?

I found the reason, I made a mistake and ignored the existence of the terminal multiplexer. I used neovim and abduco instead of tmux as my terminal taker and executed the following command

alacritty -e abduco -e '' -A nmux nvim +terminal

At this point opening lf does not allow you to use ctpv to preview the image properly.

Then when I don't use abduco:

alacritty -e nvim +terminal

I can preview the image with ctpv, everything works fine

yyy33 commented 1 year ago

This is alacritty work with chafa, Cannot display properly

Actually, it is how image previews with chafa are supposed to look. It draws an image with terminal characters; this method works in every terminal and system but is of bad quality.

I've done some testing and ueberzug image previews work well in nvim terminal. Could you please share more information about your system? Linux distribution version, ueberzug version?

I am using arch linux

❯ ueberzug version
18.1.9

❯ uname -a
Linux x550vc-yyy 5.18.16-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 03 Aug 2022 11:25:04 +0000 x86_6

❯ pacman -Q xorg-server
xorg-server 21.1.4-1

❯ pacman -Q neovim
neovim 0.8.0-3

❯ pacman -Q abduco
abduco 0.6-6

❯ pacman -Q alacritty
alacritty 0.10.1-2

❯ yay -Q lf
lf-bin 27-1
NikitaIvanovV commented 1 year ago

Do image previews work if you use tmux?

yyy33 commented 1 year ago

Do image previews work if you use tmux?

yes, it work hh

yyy33 commented 1 year ago

No issues with arch / alacritty / lf / chafa

Although the blockyness is chafa being lazy & quick. Ueberzug works fine too.

Yes, I think the problem is with abduco, as soon as you use it you can't preview the images, but its maintainer, martanne, stopped being active two years ago

yyy33 commented 1 year ago

I don't understand you btw. What's abduco ? I'm using chafa to preview images. I think you don't need abduco for chafa. It should work fine anywhere, since chafa only generates lowres.

abduco is a terminal multiplexer that does not preview images when working with neovim terminations

NikitaIvanovV commented 1 year ago

Yes, I think the problem is with abduco, as soon as you use it you can't preview the images, but its maintainer, martanne, stopped being active two years ago

You are right, it seems like abduco and ueberzug don't work well together and the issue is not on the side of ctpv.

yyy33 commented 1 year ago

Yes, I think the problem is with abduco, as soon as you use it you can't preview the images, but its maintainer, martanne, stopped being active two years ago

You are right, it seems like abduco and ueberzug don't work well together and the issue is not on the side of ctpv.

Yes, the maintainers of both programs are no longer active, so I'll close this issue for now. Thank you.

yyy33 commented 1 year ago

Then try tmux I guess.

Thanks, tmux is too complicated for me, I just need a simple terminal multiplex