Closed kevinhwang91 closed 4 years ago
Thank you for proposing that! I added some comments, can you please fix that, I will do more reviewing after that.
One question came up when I thought about that:
nvimpager -cn file
works as expected, but what would you expect fornvimpager -pn file
? Should that:set nu
in the pager? Or should we rather have-n
imply-c
so thatnvimpager -n file
is equivalent tonvimpager -cn file
. And if people want to:set nu
in the pager they have to put it in the rc file or usenvimpager file -c 'se nu'
?
You are well-considered. I have added the code about show line in pager mode. MANPAGER='nvimpager -pn' man man
will show the line number in nvim.
I have cleaned the messed indent code and deleted the log file, please review again.
I found a line wrapped issue for man
. Have solved it by specifying MANWIDTH
manually.
Updated: It's hard to handle this issue if the date from the stream or a file isn't located the man's path.
Add show lines number like
cat
.I'm a newbie of lua, maybe the code is not good enough.