vim-man 插件使用

1. 初始环境spf13-vim

2. 利用bundle安装vim-man插件

     echo Bundle \'vim-utils/vim-man\' > ~/.vimrc.bundles.local

     vim

     PluginInstall (或BundleInstall等命令)

 

3. vim中使用:

  • :Man printf - open printf(1) man page in a split
  • :Vman 3 putc - open putc(3) man page in a vertical split (read more here on what the manual page numbers mean, they are really useful)
  • :Man pri<Tab> - command completion for man page names
  • :Man 3 pri<Tab> - completion "respects" the man page section argument
  • :Man 6 <Ctrl-D> - list all man pages from section 6

 

4. shell中使用:

You can use vim-man from the shell (instead of standard man program) using the following script:

#! /bin/sh
vim -c "Man $1 $2" -c 'silent only'

Save it in /usr/bin/ as a file named viman, give it execution permission with:

$ chmod +x /usr/bin/viman

Then from your shell you can read a DOC with:

$ viman doc

Or you can use the alias alias man=viman so you can do (as usual):

$ man doc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值