在vim中使用manpageview浏览php手册页

在vim中使用manpageview浏览php手册页,vim,Vim,此功能无法正常工作 例如: 我写了substr,我想打开关于substr命令的手册页,但当我点击K(光标在substr命令上)时,它会显示出来 ***warning*** sorry, no manpage exists for <substr> 它正确地显示substr说明。详细介绍了如何使用浏览器打开光标下关键字的PHP.net文档: function OpenPHPManual(keyword) let firefox = '/Applications/Firefox.a

此功能无法正常工作

例如:

我写了substr,我想打开关于substr命令的手册页,但当我点击K(光标在substr命令上)时,它会显示出来

***warning*** sorry, no manpage exists for <substr>
它正确地显示substr说明。

详细介绍了如何使用浏览器打开光标下关键字的PHP.net文档:

function OpenPHPManual(keyword)
  let firefox = '/Applications/Firefox.app/Contents/MacOS/firefox-bin'
  " you will need to create this profile in firefox
  let profile = 'Profile for PHP Manual'
  let url = 'http://www.php.net/' . a:keyword
  exec '!' . firefox . ' -p "' . profile . '" "' . url . '"'
endfunction
noremap gd :call OpenPHPManual(expand('<cword>'))<CR>

您需要安装eLinkweb浏览器


有关详细信息,请参见帮助manpageviewphp。

不过,我对使“K”命令与本地手册页面一起工作非常感兴趣。
function OpenPHPManual(keyword)
  let firefox = '/Applications/Firefox.app/Contents/MacOS/firefox-bin'
  " you will need to create this profile in firefox
  let profile = 'Profile for PHP Manual'
  let url = 'http://www.php.net/' . a:keyword
  exec '!' . firefox . ' -p "' . profile . '" "' . url . '"'
endfunction
noremap gd :call OpenPHPManual(expand('<cword>'))<CR>
function OpenPHPManual(keyword)
  let web = 'lynx -accept_all_cookies --cookie_file=/home/jon/.lynx_cookies --cookie_save_file=/home/jon/.lynx_cookies --cookies'
  let url = 'http://jp2.php.net/' . a:keyword
  exec '!' . web . ' "' . url . '"'
endfunction