stu icon indicating copy to clipboard operation
stu copied to clipboard

Navigate up/down by display line in object preview

Open augustwester opened this issue 1 year ago • 4 comments

It is currently not possible to move up/down in an object preview, either using k/j or g/G. This would be very nice to have when inspecting the contents of larger files.

As a sidenote, it would also be nice to be able to enter "preview mode" by pressing p while an object is highlighted, instead of having to press Enter and then p.

augustwester avatar Sep 22 '24 12:09 augustwester

It is currently not possible to move up/down in an object preview, either using k/j or g/G. This would be very nice to have when inspecting the contents of larger files.

It seems to be working fine, but could you tell me more about the problem?

As a sidenote, it would also be nice to be able to enter "preview mode" by pressing p while an object is highlighted, instead of having to press Enter and then p.

This might be useful.

lusingander avatar Sep 22 '24 12:09 lusingander

Ah, this might be because I previewed a long JSON file without newlines. The line is wrapped and overflows the preview window, but I am unable to go to the end of the line by scrolling down.

augustwester avatar Sep 22 '24 13:09 augustwester

I see, I understand now. It's true that currently only physical line-by-line scrolling is implemented.

It would certainly be nice to be able to scroll down by each displayed line. There are many things to consider and it becomes complicated, so it is not currently implemented.

lusingander avatar Sep 22 '24 13:09 lusingander

Maybe allow browsing it via external program like less/more/bat etc. via some keybind and ext program specified in the config?

phanirithvij avatar Oct 27 '25 05:10 phanirithvij