Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to use the ManPageView addon to view info documentation within vim.

Although I find ManPageView very useful for, well, viewing manpages, its info-reading functionality doesn't seem to work at all. But then I almost never read info documentation, mostly because it doesn't seem worth taking the time to learn the info interface. So I may be doing it wrong.

Anyhow: running :Man info.i as suggested by the ManPageView documentation 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 the following 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.

It works by calling info on the command line and capturing the output, so perhaps it's just that info's CLI has changed? Specifically, $ info info Advanced will bring up the topic "Advanced" within the "info" node. I dug around in the addon's source code for a while but didn't find any obvious way to direct it to pass the node as an extra argument instead of doing what it seems to be supposed to do, which is to wrap the node name in parentheses and prefix it to the topic, passing the combination as a single command-line argument to info.

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.

I've filed some semblance of a bug report at what seems to be the recommended location

Have others had success using this addon to view info documentation? I feel like I'm lost in the mists that eternally shroud the outer reaches of Obscurity.

note: Whilst composing this message, I've discovered the info addon, which seems to work acceptably, at least at first glance.

share|improve this question
    
"I've filed some semblance of a bug report at what seems to be the recommended location" -- no. The right place to fill bug report is directly to the author. If the author uses a tracker for its plugins, it may be a better solution (it depends on each script maintainer) –  Luc Hermitte Jan 2 '11 at 14:12
    
@LucHermitte Hmm.. I guess somebody should update vim.org, then. The banner at the top of each addon page gives a link to its wiki page with the label "Comments, bugs, improvements". –  intuited Jan 3 '11 at 19:45
add comment

2 Answers 2

I've discovered that the easiest way to view info docs in vim is to just open them. They are just gzipped text with some binary codes added in as markup. This is especially useful to know in cases where it's not practical to install an addon.

The location of the info docs is distro-specific; under ubuntu, and presumably other debian-likes, they are at /usr/share/info/*.info.gz. They are gzipped, but vim will handle the translation for you if you just open them.

I actually prefer this manner of viewing them to using the info reader, as it presents the docs as one long file that you can quickly search or page through. Having an addon would still be useful to facilitate following links and such. I actually haven't tried using the info addon mentioned in the update; I haven't needed to look at an info file since then.

share|improve this answer
    
awesome. I can't stand the info viewer. Going to make a script to automate this. –  Tom Dignan Nov 2 '12 at 3:47
    
add comment

Just pipe Info output to vim eg.,:

    info info Advanced | vim -R -

or

    info info Advanced | less

You can also invoke Info using --vi-keys, but the supposed "vi" key bindings are really weird.

You can also customise the Info key bindings using the infokey tool (see Customizing Key Bindings and Variables). A sample vi .infokey source file is already provided (see infokey source format).

It's worth learning GNU Info (info info-stnd) because it's the proper tool for viewing info files. The full documentation for GNU tools are in info files, for example compare the content difference between man tar and info tar. Info can also provide better structured access to the documentation particularly for large documents.

But the real way to read info files is with Emacs' Info mode (type C-h i) because the Info key bindings are virtually the same, and you additionally get all the advantages of the Emacs editor (eg. marks, registers, vertical window splitting etc). It's useful to familiarise oneself with Emacs because many GNU tools use Emacs-style key bindings (eg. Info, Bash, Screen etc). Try the Emacs tutorial.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.