Skip to content

alk/supermegadoc

Repository files navigation

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

gpicker support for function documentation
-------------------------------------------------

Erlang documentation is quite inconvenient to use. So I decided to use
gpicker for quick browsing of available modules/functions and
navigation to their corresponding html documentation.

I've recently extended this code to ri (ruby 1.8 only), man and devhelp documentation.

You will need recent gpicker (at least 2.0.0). From
http://savannah.nongnu.org/projects/gpicker. Building from sources at
http://git.savannah.gnu.org/cgit/gpicker.git or
http://github.com/alk/gpicker is possible too.

You will also need 'cdb' tool from tinycdb package.

You'll need to pre-process documentation. Adjust Makefile and run
make.

Note that erlang documentation indexer relies on structure of html
pages of function's documentation, so it may fail for older or newer
versions of Erlang. Patches are welcome.

Run 'make install' to install supermegadoc into /usr/local/bin. It is
now usable as a standalone program. But there's also a Emacs
integration.

Place supermegadoc.el in a place where emacs will find it and arrange
it's loading.

My .emacs has following lines:

(autoload 'supermegadoc-erlang "supermegadoc" nil t)
(autoload 'supermegadoc-ri "supermegadoc" nil t)
(autoload 'supermegadoc-devhelp "supermegadoc" nil t)
(autoload 'superwoman "supermegadoc" nil t)
(autoload 'supergo "supermegadoc" nil t)
(add-hook 'erlang-mode-hook
          #'(lambda ()
              (local-set-key (kbd "s-q") 'supermegadoc-erlang)))
(add-hook 'go-mode-hook
          (lambda ()
            (local-set-key (kbd "s-q") 'supergo)))

This arranges autoload of supermegadoc and binds supermegadoc-erlang
Super-q. Super is 'a button with flag' on most keyboards and Command
on mac's.

NOTE: Current supermegadoc.el also relies on w3m for displaying of
html. Change *erdoc-browse-url-function* to browse-url to use default
browser.

About

conveniently and quickly browse godoc, ri, devhelp and erlang documentation via gpicker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published