ctpv icon indicating copy to clipboard operation
ctpv copied to clipboard

Can't work in nvim terminal

Open yyy33 opened this issue 1 year ago • 16 comments

22

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

yyy33 avatar Oct 01 '22 03:10 yyy33

Do you use Xorg or Wayland?

NikitaIvanovV avatar Oct 01 '22 08:10 NikitaIvanovV

Do you use Xorg or Wayland?

i am use xorg now

yyy33 avatar Oct 01 '22 11:10 yyy33

Do you use Xorg or Wayland?

But I can preview the images normally using ranger and w3m

yyy33 avatar Oct 01 '22 12:10 yyy33

Do you use Xorg or Wayland?

222

yyy33 avatar Oct 01 '22 12:10 yyy33

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

NikitaIvanovV avatar Oct 02 '22 09:10 NikitaIvanovV

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

yes, i installed, it is work in alacritty

yyy33 avatar Oct 02 '22 16:10 yyy33

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

NikitaIvanovV avatar Oct 02 '22 17:10 NikitaIvanovV

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

This is alacritty work with ueberzug 5555

yyy33 avatar Oct 03 '22 02:10 yyy33

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 avatar Oct 03 '22 02:10 yyy33

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 avatar Oct 03 '22 02:10 yyy33

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

yyy33 avatar Oct 03 '22 02:10 yyy33

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?

NikitaIvanovV avatar Oct 03 '22 20:10 NikitaIvanovV

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 avatar Oct 04 '22 03:10 yyy33

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


yyy33 avatar Oct 04 '22 03:10 yyy33

Do image previews work if you use tmux?

NikitaIvanovV avatar Oct 12 '22 17:10 NikitaIvanovV

Do image previews work if you use tmux?

yes, it work hh

yyy33 avatar Oct 14 '22 15:10 yyy33

No issues with arch / alacritty / lf / chafa

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

asklow avatar Nov 09 '22 09:11 asklow

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 avatar Nov 09 '22 14:11 yyy33

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.

asklow avatar Nov 09 '22 17:11 asklow

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

yyy33 avatar Nov 10 '22 03:11 yyy33

Then try tmux I guess.

asklow avatar Nov 10 '22 03:11 asklow