ac-inf-ruby

https://github.com/purcell/ac-inf-ruby.git

git clone 'git://github.com/purcell/ac-inf-ruby.git'
4

inf-ruby completion source for Emacs auto-complete package

This plugin provides an auto-complete completion source for use in inf-ruby buffers.

Latest stable version: see the latest numbered tag, which will also be the latest version available via Marmalade.

Installation

First, ensure auto-complete and inf-ruby are installed: I recommend using packages from Marmalade or Melpa.

You'll need both auto-complete and inf-ruby to be enabled and working, so please consult the corresponding documentation is you have any trouble with this.

Next, install ac-inf-rub. If you choose not to use the convenient package in Melpa and Marmalade, you'll need to add the directory containing ac-inf-ruby.el to your load-path, and then (require 'ac-inf-ruby).

ac-inf-ruby provides an inf-ruby-specific completion source, so auto-complete needs to be told to use them when inf-ruby-mode is active. To do this, put the following code in your emacs init file to

(eval-after-load 'auto-complete
  '(add-to-list 'ac-modes 'inf-ruby-mode))
(add-hook 'inf-ruby-mode-hook 'ac-inf-ruby-enable)

If you want to trigger auto-complete using TAB in inf-ruby buffers, you should bind it directly:

(eval-after-load 'inf-ruby '
  '(define-key inf-ruby-mode-map (kbd "TAB") 'auto-complete))

Usage

ac-inf-ruby should now automatically be enabled in new inf-ruby sessions.

Simply trigger auto-completion, and completion candidates supplied by inf-ruby should be displayed, with the “r” symbol on the right hand side of the completion pop-up.

Acknowledgements

ac-inf-ruby was written by Steve Purcell.


Author links:

Steve Purcell's blog // @sanityinc on Twitter