Open man pages in Vim

Most of the time when I open a man page for a certain command or tool, I use Vim:

# Open man page for the 'dd' command:
$ man dd | col -b | vim -MR -

It’s actually a handful to type but since I use zsh + fzf, it’s not really a big deal as recalling the command is pretty straightforward.

But yesterday, I came across this nifty little plugin called vim-manpager. I tried adding it to my vimrc, added the environment variable below to my zshrc:

export MANPAGER="vim -c MANPAGER -"

And now, I can open all man pages by calling the man command directly. I can also open man pages directly from within Vim. Brilliant!

---
If you have any questions or feedback, please reach out @flowerinthenyt.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.