A reftex-like mode for ruby in emacs ?

  • Thread starter Vincent Fourmond
  • Start date
V

Vincent Fourmond

Hello !

I'm a fervent emacs user, and I've been recently amazed and delighted
by the simplicity and ease of use of Reftex, or more specifically
reftex-toc. It is a bit of emacs code that lets you browse through the
table of contents of a LaTeX document. For instance, if I run it on my
PhD, I get something like

[sorry, french...]

1 Introduction
1.1 Où va-t-on ?
1.2 La photosynthèse
1.2.1 Généralités
...

I just need to select one line with the cursor, press enter, and I go
to the relevant line in the relevant file.

Does anyone know if something similar is available for Ruby ? Say, you
have a code tree (or even a file), you press a few keys and you get an
outline, with only, say module, classes and method definitions (without
code) and you can select and go there ? I usually find myself looking
for methods more longer than I actually code, that would definitely help.

Or, at least, would that interest anyone if I tried it ?

Cheers,

Vincent
 
M

M. Edward (Ed) Borasky

Vincent said:
Hello !

I'm a fervent emacs user, and I've been recently amazed and delighted
by the simplicity and ease of use of Reftex, or more specifically
reftex-toc. It is a bit of emacs code that lets you browse through the
table of contents of a LaTeX document. For instance, if I run it on my
PhD, I get something like

[sorry, french...]

1 Introduction
1.1 Où va-t-on ?
1.2 La photosynthèse
1.2.1 Généralités
...

I just need to select one line with the cursor, press enter, and I go
to the relevant line in the relevant file.

Does anyone know if something similar is available for Ruby ? Say, you
have a code tree (or even a file), you press a few keys and you get an
outline, with only, say module, classes and method definitions (without
code) and you can select and go there ? I usually find myself looking
for methods more longer than I actually code, that would definitely help.

Or, at least, would that interest anyone if I tried it ?

Cheers,

Vincent
Well, it's not Ruby-specific, but the Leo editor has this sort of thing
as its standard modus operandi. It has syntax coloring for nearly all
languages, but its "native" language is Python, and it is both written
in and scripted with Python. It interfaces to either Emacs or Vim as
well. I was enthusiastic about it for a while, but the learning curve is
rather steep for a Vim hacker like myself and the "core team" -- one
person, really -- is a rapidly-moving target. Anyhow, if you're
interested, it's at

http://webpages.charter.net/edreamleo/front.html
 
V

Vincent Fourmond

Christian said:
Try speedbar or maybe imenu.

speedbar doesn't seem to work with ruby files (?) but imenu is good.
Not yet what I would like, but a great help, thanks !

Vince
 
I

Ian Duggan

Vincent said:
I just need to select one line with the cursor, press enter, and I go
to the relevant line in the relevant file.

Does anyone know if something similar is available for Ruby ? Say, you
have a code tree (or even a file), you press a few keys and you get an
outline, with only, say module, classes and method definitions (without

Check out the emacs code browser as well (ecb).

--Ian
 
V

Vincent Fourmond

Thanks to all of you for your answers. I've been looking around, and I
definitely will use ri-emacs, although only the command ri-show-topic
works for me. Other commands fail with
apply: Wrong type argument: stringp, io-error

I've looked at the imenu code. Although I don't like the presentation
at all, I think I can turn it into something very reftex-like, if time
is available.

Thanks again for all your anwers !

Vince
 
V

Vincent Fourmond

Vincent said:
Thanks to all of you for your answers. I've been looking around, and I
definitely will use ri-emacs, although only the command ri-show-topic
[sorry, oops, ri-show-topic is an old command of my own]
 

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
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top