Vim Tips Wiki
Register
(added entry to support elinks for manpageview-script)
 
(Change <tt> to <code>, perhaps also minor tweak.)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
{{ScriptComments|ManPageView}}
= extend manpageview-script with elinks-support for php =
 
   
  +
==Consider using echoerr instead of echo/sleep==
  +
When manpageview needs to print a warning, it uses echo and then 'sleep 2' to make sure the user can see the message before it goes away. This two second delay is really annoying, as it cannot be skipped. Consider using echoerr and dropping the sleep -- then the user can hit enter to skip the message (before 2 seconds have elapsed).
  +
 
==extend manpageview-script with elinks-support for php==
 
in autoload/manpageview.vim change
 
in autoload/manpageview.vim change
   
 
line 86 'til line 92 into:
 
line 86 'til line 92 into:
 
 
<pre>
 
<pre>
 
if !exists("g:manpageview_pgm_php")
 
if !exists("g:manpageview_pgm_php")
Line 24: Line 27:
 
</pre>
 
</pre>
   
p.s. it can be done much more clever but right now i don't feel like looking that up.
+
p.s. it can be done much more clever but right now i don't feel like looking that up. [[User:Immeëmosol|Immeëmosol]] 16:14, December 27, 2010 (UTC)
  +
  +
==Info support broken?==
  +
I'm getting errors when trying to use this addon to view info documentation.
  +
  +
Specifically, running `:Man info.i` gives me
  +
<pre>
  +
info: No menu item `(info)Top' in node `(dir)Top'.
  +
info: No menu item `(info)Top' in node `(dir)Top'.
  +
info: No menu item `(info)Top' in node `(dir)Top'.
  +
***warning*** sorry, no manpage exists for <(info)Top>
  +
</pre>
  +
  +
I see some success if I delete these lines, which start at line 345 in the file autoload/manpageview.vim:
  +
<pre>
  +
" special exception for info {{{3
  +
if a:viamap == 0 && ext == "i"
  +
let s:manpageview_pfx_i = "(".manpagetopic.")"
  +
let manpagetopic = "Top"
  +
" call Decho("top-level info: manpagetopic<".manpagetopic.">")
  +
endif
  +
</pre>
  +
  +
Deleting those lines will allow `:Man info.i` to work, but I still can't follow links in the displayed page.
  +
  +
I've not tried to use this addon to view info documentation before. I'm running an updated ubuntu 10.10, using the vim-gnome package.
  +
  +
There's a bit more info provided on [http://unix.stackexchange.com/questions/5267/viewing-info-documentation-with-vim|this StackExchange question]. --[[User:Intui.ted|Intui.ted]] 06:41, December 31, 2010 (UTC)
   
  +
==Comments==
[[User:Immeëmosol|Immeëmosol]] 16:14, December 27, 2010 (UTC)
 

Latest revision as of 09:53, 14 July 2012

Use this page to discuss script 489 ManPageView

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Consider using echoerr instead of echo/sleep[]

When manpageview needs to print a warning, it uses echo and then 'sleep 2' to make sure the user can see the message before it goes away. This two second delay is really annoying, as it cannot be skipped. Consider using echoerr and dropping the sleep -- then the user can hit enter to skip the message (before 2 seconds have elapsed).

extend manpageview-script with elinks-support for php[]

in autoload/manpageview.vim change

line 86 'til line 92 into:

if !exists("g:manpageview_pgm_php")
  if executable("elinks")
" call Decho("installed php help support via manpageview")
    let g:manpageview_pgm_php     = "elinks -dump http://www.php.net/"
    let g:manpageview_syntax_php  = "manphp"
    let g:manpageview_nospace_php = 1
    let g:manpageview_K_php       = "manpageview#ManPagePhp()"
  endif
" call Decho("installed php help support via manpageview")
  if executable("links")
    let g:manpageview_pgm_php     = "links -dump http://www.php.net/"
    let g:manpageview_syntax_php  = "manphp"
    let g:manpageview_nospace_php = 1
    let g:manpageview_K_php       = "manpageview#ManPagePhp()"
  endif
endif

p.s. it can be done much more clever but right now i don't feel like looking that up. Immeëmosol 16:14, December 27, 2010 (UTC)

Info support broken?[]

I'm getting errors when trying to use this addon to view info documentation.

Specifically, running `:Man info.i` gives me

info: No menu item `(info)Top' in node `(dir)Top'.
info: No menu item `(info)Top' in node `(dir)Top'.
info: No menu item `(info)Top' in node `(dir)Top'.
***warning*** sorry, no manpage exists for <(info)Top>

I see some success if I delete these lines, which start at line 345 in the file autoload/manpageview.vim:

  " special exception for info {{{3
  if a:viamap == 0 && ext == "i"
   let s:manpageview_pfx_i = "(".manpagetopic.")"
   let manpagetopic        = "Top"
"   call Decho("top-level info: manpagetopic<".manpagetopic.">")
  endif

Deleting those lines will allow `:Man info.i` to work, but I still can't follow links in the displayed page.

I've not tried to use this addon to view info documentation before. I'm running an updated ubuntu 10.10, using the vim-gnome package.

There's a bit more info provided on StackExchange question. --Intui.ted 06:41, December 31, 2010 (UTC)

Comments[]