# Use vim as a manpage readerAfter this man pages can be read by using vman or wman. Sample commands look like
function vman {
/usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | \
/usr/bin/view -c "set ft=man nomod nolist so=999 ts=8 wrap\
titlestring=man\ $1" -
}
# Use gvim as a manpage reader
function wman {
/usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | \
/usr/bin/gview -c "set ft=man nomod nolist so=999 ts=8 wrap\
titlestring=man\ $1" -
}
guest@kusumanchi:~$ vman rsyncTested this on Debian Etch, running vim 7.0.122, gvim 7.0.122, man 2.4.3, iconv 2.3.6.
guest@kusumanchi:~$ wman rsync
Advantages of using vim as a man page reader
- 'marks' can be used to navigate the man pages which can sometimes be quite large. Other pagers such as 'less', 'more' do not have this feature.
- vim's search commands, navigation commands etc., can be used. No need to learn another software or another set of shortcuts.
- ":syn on" gives beautiful colors while reading the man page
- Let's say while reading the man page of ssh, you encounter ssh_config(5). Now to read the man page of ssh_config(5), simply place the cursor on that word and do ctrl-]. This will place you at the man page of ssh_config(5).
Sources:
No comments:
Post a Comment