Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using nvim (less inside terminal mode) as pager to view the cht.sh results #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

timhansinger
Copy link

@timhansinger timhansinger commented Dec 12, 2022

This change allows to view the cht.sh results inside an nvim terminal making it easy to use all nvim movements including yank etc.

A few keymaps have also been changed (e.g. pressing q quits nvim inside this buffer).

The usage of less is a nice workaround to get line wraps to adjust when changing the window in which the nvim buffer opened.

I just changed these lines since I love to use nvim for almost everything (reading man pages and also as a pager).
Hopefully you will find that small adjustment useful.

It is now possible to enter terminal mode (using i, a, I, A) and then using "bat" commands u, d, g, G to scroll / move inside paged result.
Pressing <esc> inside terminal mode will exit to normal mode and move the cursor to the center of the screen. Now all vim functions will be available.

Pressing q (either in terminal or normal mode) will quit nvim.
Now just using "less"
@timhansinger timhansinger changed the title Using nvim (bat inside terminal mode) as pager to view the cht.sh results Using nvim (less inside terminal mode) as pager to view the cht.sh results Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant