Open letter to anyone developing a Ruby IDE

J

James Edward Gray II

Hi!


What about the IDE doing eval("a.methods")? Won't that cover the
general <expr>.<TAB> case?

But you need to execute the entire program right down to the line where
completion is requested for that eval() return anything useful. A
program could have many "a" variables. Executing the code is an
unrealistic requirement; way too many possible external dependancies.

James Edward Gray II
 
S

Shajith

But you need to execute the entire program right down to the line where
completion is requested for that eval() return anything useful. A
program could have many "a" variables. Executing the code is an
unrealistic requirement; way too many possible external dependancies.
Yeah, I realise that. Thanks!
 
C

Csaba Henk

Have you used Readline tab completion in irb? It is far from useful,
giving you too many potential completions from too far up the
inheritance tree.

From the readme of irb enhancements (http://www.creo.hu/~csaba/ruby/):

irb-completion-enhanced.rb

Context-sensitive completion for irb.

[snip]

There is one more feature: an attribute named watch_ancestors of
IRB::InputCompletor. If is it set to true, method name completion will
behave in the familiar way. If set to false, only the own methods of the
object (and its class) are shown. And if it's nil, then each hit on the
tab key switches between these two behaviours (this latter is the
default). This is useful eg. when you want to explore a new ruby class
(I guess at such an occasion your focus is not on being notified to the
fact that the object responds to is_complex_yaml? ...)

Csaba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top