Last active
August 15, 2019 20:00
-
-
Save ChrisPenner/cc7c7154fc13c9b66ad7 to your computer and use it in GitHub Desktop.
Use Vim as a man pages viewer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set this in your ~/.bash_profile | |
export PAGER="/bin/sh -c \"unset PAGER;col -b -x | \ | |
vim -R -c 'set ft=man nomod nolist' -c 'map q :q<CR>' \ | |
-c 'map <SPACE> <C-D>' -c 'map b <C-U>' \ | |
-c 'nmap K :Man <C-R>=expand(\\\"<cword>\\\")<CR><CR>' -\"" | |
# Set this in your ~/.vimrc (This will allow using 'K' to look up man pages inside vim. | |
let $PAGER='' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment