# Autocomplete (Code Completion) for Ruby in OS X's Textmate or Other

**URL:** <https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525>\
**Category:** Ruby\
**Created:** [September 26, 2007, 12:05am UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525 "2007-09-26T00:05:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 26, 2007, 12:05am UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/1 "2007-09-26T00:05:30Z")

</div>

Hi,

Is there a way to add autocomplete functionality within Textmate for  
Ruby files?

If not, what the best editor or IDE for Ruby on OS X that supports  
autocomplete?

Thanks,  
~Phil

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 26, 2007, 12:39am UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/2 "2007-09-26T00:39:08Z")

</div>

It’s in there, but TextMate doesn’t have the auto-complete like in MS  
Visual Studio or XCode.  
It uses an Emacs style.  
For different language bundles you can type a shortcut and press TAB  
or a keboard shortcut for other things.  
For text completion, ESC will complete a word if you have already  
typed it once before in the file. Pressing ESC again will start to  
cycle through any other possible completions.

To learn more about TextMate, check out the wiki on the TM site or  
get the book from Pragmatic Programmers!

You can also customize shortcuts for any bundle in TM. For example,  
sometimes there is a menu item in a bundle with no shortcut. (for C+  
+/ C compiling, is one.) so you can add the thing that makes most  
sense. ( I added command-R to compile my C/C++ files)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 21, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/3 "2007-12-21T19:59:58Z")

</div>

unknown wrote:

> Hi,
> 
> Is there a way to add autocomplete functionality within Textmate for  
> Ruby files?

In TM start the function then hit ‘esc’  
Others that I know of that work are radrails, maybe some other competing  
eclipse plugins. There’s probably more out there.  
GL.  
-Roger

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 21, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/4 "2007-12-21T20:23:36Z")

</div>

> > Is there a way to add autocomplete functionality within Textmate for  
> > Ruby files?
> 
> In TM start the function then hit ‘esc’  
> Others that I know of that work are radrails, maybe some other competing  
> eclipse plugins. There’s probably more out there.  
> GL.

TextMate provides autocompletion for common tasks but it doesn’t check  
the system for syntax correctness or anything like that. Ruby is too  
dynamic for true IDE-style autocompletion without serious work on the  
IDE-maker’s end, but I’m pretty sure JRuby will result in some  
autocompletion support in the near future.

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 21, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/5 "2007-12-21T21:16:22Z")

</div>

On Dec 21, 12:22 pm, Giles B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> dynamic for true IDE-style autocompletion without serious work on the  
> IDE-maker’s end, but I’m pretty sure JRuby will result in some  
> autocompletion support in the near future.

Steve Yegge recently wrote:

"The second difficulty with the IDE perspective is that Java-style  
IDEs intrinsically create a circular problem. The circularity stems  
from the nature of programming languages: the “game piece” shapes are  
determined by the language’s static type system. Java’s game pieces  
don’t permit code elimination because Java’s static type system  
doesn’t have any compression facilities - no macros, no lambdas, no  
declarative data structures, no templates, nothing that would permit  
the removal of the copy-and-paste duplication patterns that Java  
programmers think of as “inevitable boilerplate”, but which are in  
fact easily factored out in dynamic languages.

Completing the circle, dynamic features make it more difficult for  
IDEs to work their static code-base-management magic. IDEs don’t work  
as well with dynamic code features, so IDEs are responsible for  
encouraging the use of languages that require… IDEs. Ouch."

Source: [http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html](http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 21, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/autocomplete-code-completion-for-ruby-in-os-xs-textmate-or-other/115525/6 "2007-12-21T20:25:21Z")

</div>

|Roger P.|

RP\> maybe some other competing eclipse plugins.  
DLTK (Dynamic Languages Toolkit)

> **[Eclipse Dynamic Languages Toolkit](https://projects.eclipse.org/projects/technology.dltk)**
>
> The Eclipse Dynamic Languages Toolkit (DLTK) is a tool for vendors, researchers, and end-users who rely on dynamic languages.
