lucc / nvimpager

Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting
Other
372 stars 20 forks source link

How to cat afterwards? #31

Closed bugsbugsbux closed 4 years ago

bugsbugsbux commented 4 years ago

What i want is the following:

  1. run nvimpager in pager mode
  2. when i exit use cat mode so the highlighted version is printed to my terminal and i can scroll back through it along my other stdout history

How can i achieve this (the manpage states -p overrides -c)? (would be awesome if it even worked with auto mode)

Thanks in advance

lucc commented 4 years ago

Nvimpager does not have a feature like less -X. If you know a way to do this in neovim I would be interested to know. You can work around this in some simple cases with nvimpager -p file && nvimpager -c file. But that does not work with pipes (you have to write a more complicated script for that).

bugsbugsbux commented 4 years ago

i just thought i would maybe be possible to switch or call nvimpager's cat mode from inside pager mode...