Comments (20)
It is not resolution problem.(My resolution is 2160x1440).
Byxrandr -s 1920x1080
switching to 1080p, it doesn't work. Pictures are still not in place.
And then I switch to Deepin DDE and Deepin terminal, it doesn't work as well.
I reinstallueberzug
bypip install ueberzug --user
again, nothing changes.
我几乎肯定是你的ueberzug的版本问题,当我使用pip install ueberzug --user
就会出现问题,请使用yay -S python-ueberzug-git
或者git clone master并手动安装。
nvim -d /home/kevin/.local/lib/python3.8/site-packages/ueberzug/xutil.py /usr/lib/python3.8/site-packages/ueberzug/xutil.py
会有差别的。
Translate from google:
I almost certainly have a problem with your version of ueberzug. When I use pip install ueberzug --userit, problems will occur. Please use yay -S python-ueberzug-gitor git clone master and install it manually.
nvim -d /home/kevin/.local/lib/python3.8/site-packages/ueberzug/xutil.py /usr/lib/python3.8/site-packages/ueberzug/xutil.py There will be differences.
from rnvimr.
- Ranger-devicons works well when using ranger in terminal. However, I cannot use it in rnvimr.
You should syn your ranger plugins by using :RnvimrSync
. Make sure your ranger-devicons plugin is existed in $HOME/.config/nvim/plugged/rnvimr/ranger
.
- Similarly, I cannot preview images well using rnvimr. Pictures are very big. They are not in correct position and even part of them are out of the screen.
rnvimr only calibrated preview image for uberzug for now.
If use uberzug, this may happen when your window size is small. Preview image works best in tmux because of tmux api.
I am using Archlinux + dwm now. How can I fix these problems?
I have a friend using Archlinux + dwm, rnvimr works flawless in his env.
from rnvimr.
Had your read README to update the latest version of uberzug?
from rnvimr.
Thank you. I have solved the first problem.
Actually, I am using uberzug
to preview image. What consused me is not rander pictures but pictures not in place...I try to adjust g:rnvimr_layout but no results.
Maybe your friend is theniceboy?? I know this plugin from his nvim repo.
from rnvimr.
I have installed the latest version of ueberzug
.
from rnvimr.
Thank you. I have solved the first problem.
Actually, I am usinguberzug
to preview image. What consused me is not rander pictures but pictures not in place...I try to adjust g:rnvimr_layout but no results.
Could you upload an image? I can't get your point clearly.
Maybe your friend is theniceboy?? I know this plugin from his nvim repo.
Yes.
I have installed the latest version of
ueberzug
.
Install by yay -S python-ueberzug-git
.
from rnvimr.
from rnvimr.
Just as what you see, the picture is no in place.
from rnvimr.
What's your terminal? Had you tested with others? I have tested under dwm with alacritty which works flawlessly.
from rnvimr.
I am using simple terminal now. However, testing in alacritty, nothing changes.
from rnvimr.
So is it probably my rnvimr configuration problem??
from rnvimr.
No, there aren't any configurations in rrnvimr refer to this issue.
Maybe you should check out the version about ueberzug. I found that no command can output the version of ueberzug. You may diff your ueberzug lib and check it out with seebye/ueberzug@d86eeb3
It outputs python-ueberzug-git 18.1.5.a8ac9c3-1
by typing yay -Q python-ueberzug-git
in my env.
My lib path is /usr/lib/python3.8/site-packages/ueberzug
from rnvimr.
Thanks a lot! I will follow u suggestion to find out the solution.
from rnvimr.
I haven't found a perfect solution. But I found a personal temporary solution, adjust varibes start_x, start_y, width and height of function calibrate_ueberzug
in ~/.config/nvim/plugged/rnvimr/lib/hacks.py
.
However, resizing rnvimr will break it...XDXD
from rnvimr.
def calibrate_ueberzug(self):
"""
Ueberzug can't capture the calibration of floating window of neovim, fix it.
"""
client = self.fm.client
def wrap_draw(self, path, start_x, start_y, width, height):
win_info = client.request('nvim_win_get_config', 0)
if not win_info['relative']:
return
start_x += win_info['col']
start_y += win_info['row']
self.raw_draw(path, start_x, start_y, width, height)
try:
# ueberzug is supported by ranger since [b58954d4258bc204c38f635e5209e6c1e2bce743]
# https://github.com/ranger/ranger/commit/b58954d4258bc204c38f635e5209e6c1e2bce743
# pylint: disable=import-outside-toplevel
from ranger.ext.img_display import UeberzugImageDisplayer
except ImportError:
pass
else:
UeberzugImageDisplayer.raw_draw = UeberzugImageDisplayer.draw
UeberzugImageDisplayer.draw = wrap_draw
This method only capture the top left coordinate of floating window.
I'm not sure that nvim_win_get_config
work properly for you. You can enter neovim command line mode (default keymap is C-\) to use echo nvim_win_get_config(0)
in the floating window to check out whether the size of the floating window is proper for you. If not, please check out the version of your neovim.
You can also test the behavior of the previewing image under a raw ranger in the floating window by vim-floaterm.
In short, make sure that echo nvim_win_get_config(0)
and the version of ueberzug are correct.
from rnvimr.
I just adjust the position and size of picture manually. Anyway it exactly works for me if not resizing rnvimr. Probably there's a hidden environmental problem in my computer...finding out and fixing it may be difficult.lollol
def calibrate_ueberzug(self):
"""
Ueberzug can't capture the calibration of floating window of neovim, fix it.
"""
client = self.fm.client
def wrap_draw(self, path, start_x, start_y, width, height):
win_info = client.request('nvim_win_get_config', 0)
if not win_info['relative']:
return
# start_x += win_info['col']
# start_y += win_info['row']
start_y += win_info['row'] *2/3 + 1
width = width*3/ 4
height = height*3 / 4
self.raw_draw(path, start_x, start_y, width, height)
try:
# ueberzug is supported by ranger since [b58954d4258bc204c38f635e5209e6c1e2bce743]
# https://github.com/ranger/ranger/commit/b58954d4258bc204c38f635e5209e6c1e2bce743
# pylint: disable=import-outside-toplevel
from ranger.ext.img_display import UeberzugImageDisplayer
except ImportError:
pass
else:
UeberzugImageDisplayer.raw_draw = UeberzugImageDisplayer.draw
UeberzugImageDisplayer.draw = wrap_draw
from rnvimr.
Thanks a lot for your patient help!!! Maybe we should close this issue, after all it is my problem not this plugin.
from rnvimr.
You can also test under tmux. Old and latest ueberzug will use tmux api to fix X11. Or change your X11 resolution to 4k or 1080p.
Thanks a lot for your patient help!!! Maybe we should close this issue, after all it is my problem not this plugin.
This is a strange issue, I'm interested in it. Maybe it's a compatible issue.
from rnvimr.
It is not resolution problem.(My resolution is 2160x1440).
By xrandr -s 1920x1080
switching to 1080p, it doesn't work. Pictures are still not in place.
And then I switch to Deepin DDE and Deepin terminal, it doesn't work as well.
I reinstall ueberzug
by pip install ueberzug --user
again, nothing changes.
from rnvimr.
非常感谢,从AUR中安装ueberzug
之后,这个问题被解决了。
同时也非常抱歉,我应该早点听从你的建议从AUR中安装的,只是一开始我使用yay -S python-ueberzug-git
时出现了很多安装问题。因为虽然卸载了pip uninstall ueberzug
,但是很多依赖库没有被卸载。当我手动卸载所有的依赖库之后再次从AUR中安装的时候,成功了。
再次非常感谢您的帮助,我非常喜欢这个插件。
Translate from google:
Thank you very much ueberzug, this issue was resolved after installing from AUR .
At the same time, I am very sorry, I should have followed your suggestion to install from AUR, but I yay -S python-ueberzug-githad a lot of installation problems at the beginning . Because although uninstalled pip uninstall ueberzug, many dependent libraries have not been uninstalled. When I manually uninstalled all the dependent libraries and installed them from AUR again, it succeeded.
Thanks again for your help, I really like this plugin.
from rnvimr.
Related Issues (20)
- Ranger didn't jump folder at first under a specific situation. HOT 1
- Setting "g:python3_host_prog" not respected. HOT 4
- Rnvimr not triggering ftplugin HOT 1
- Command not found: AttachFile HOT 4
- s:reopen_win() method will trigger my X shortcut key HOT 5
- support for ueberzugpp HOT 12
- rnvimr is changing neovim's cwd when opening a file with `rnvimr_enable_picker` enabled
- Cannot open an empty file HOT 7
- Considerable lag when pressing j due to a key mapping. HOT 1
- Rnvimr starting directory same as the current nvim terminal. HOT 1
- Mouse scroll up/down freezes Rnvimr HOT 2
- preview_images_method sixel HOT 2
- Question: How can I open ranger files in a new buffer instead of in the floating window? HOT 8
- Passing an env var to rnvimr_ranger_cmd fails HOT 3
- mouse click not working HOT 7
- mouse_support broken HOT 4
- [ERROR] can't open file HOT 6
- [Question] - Hidden by default. HOT 1
- Ranger does not execute mappings that use control HOT 1
- using lazy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rnvimr.