Sorry for not posting anything these days. It’s been very busy recently. And every time when I have some experience to share, the damn GFW blocks me. Anyway, I’m really glad to see that there are people waiting for my post :). So I’ll try to update my blog more frequently.
Today I’m going to talk about our PAGER program. Maybe the most commonly used PAGER program is “less” or “more”. Every time you have too much information in your terminal and you will use “command | less” to make it readable(git, man and many other commands call the PAGER program). But the above two commands do not give us a beautiful output. There’s another PAGER program called “most”, which could give you a colorful output. However, it doesn’t use vim key bindings and involves several dependencies. So I choose not to use it.
Wait a minute, think about your vim. Isn’t it amazing if we can use vim for our PAGER program? It has syntax highlighting, different color themes and the most important of all — vim features including key bindings, searching and etc.
Here is the download link for vimpager. What can it do? Let me show you my git diff and git log:
Colorful result with vim key bindings. And it’s also very fast.
Installation is quite easy. Thanks to Daniel Gryniewicz’s comment: Add “vim-pager” use flag and emerge vim.