# IDE vs. editor

**URL:** <https://rubytalk.org/t/ide-vs-editor/1255>\
**Category:** ruby-talk\
**Created:** [16 August 2002 23:49 UTC](https://rubytalk.org/t/ide-vs-editor/1255 "2002-08-16T23:49:47Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Massimiliano\_Mirra4](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Massimiliano\_Mirra4](https://rubytalk.org/u/Massimiliano_Mirra4)\
**Post date:** [18 August 2002 01:17 UTC](https://rubytalk.org/t/ide-vs-editor/1255/21 "2002-08-18T01:17:39Z")

</div>

Thanks to you and Alan for the tip. A sensible approach. But I  
wonder if any output buffer can be forced to be parsed into line  
anchors to another buffer. Elisp wizards, hints?

Massimiliano

> **···**
>
> On Sun, Aug 18, 2002 at 03:57:22AM +0900, Alan Chen wrote:
> 
> > > How do you run tests and then jump to offending lines? I use to run  
> > > I’ve been running my unit tests from a makefile,

---

<div class="post-metadata">

**Author:** ![Dave\_Thomas](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@Dave\_Thomas](https://rubytalk.org/u/Dave_Thomas)\
**Post date:** [18 August 2002 18:16 UTC](https://rubytalk.org/t/ide-vs-editor/1255/22 "2002-08-18T18:16:18Z")

</div>

[bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu](mailto:bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu) writes:

> You need a ruby version of etags. Then it’s just a simple  
> matter of using tags-query-replace. The hard bit is a ruby  
> version of etags. I said it was possible, not that I knew  
> exactly how to do it %-)!

rtags comes with irb (the separate package, not the one that comes in  
the Ruby download). Never used it, but it doesn’t crash when I run  
it… 🙂

Dave

---

<div class="post-metadata">

**Author:** ![Massimiliano\_Mirra4](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Massimiliano\_Mirra4](https://rubytalk.org/u/Massimiliano_Mirra4)\
**Post date:** [18 August 2002 19:36 UTC](https://rubytalk.org/t/ide-vs-editor/1255/23 "2002-08-18T19:36:07Z")

</div>

> > > - 
> > > - I can do all this in Emacs and have a powerful editor. Is it  
> > > Same questions to you: how do you have a method’s renaming propagate,
> 
> - 
> - You need a ruby version of etags. Then it’s just a simple  
> matter of using tags-query-replace. The hard bit is a ruby  
> version of etags.

I heard about etags supporting ruby, but never managed to get it work,  
probably because I never used etags with any other language and I  
don’t know how it is supposed to work when it does. Sounds like it’s  
time for another try.

I wonder, though, what tags-query-replace does. If I modify `class MyClass; def meth; end; end' into `class MyClass; def new\_meth; end;  
end’, will the various my\_instance.meth throughout the code be changed  
into my\_instance.new\_meth? It doesn’t seem very likely – for one  
thing, how would Emacs know that my\_instance is an instance of MyClass  
and not anything else?

> I said it was possible, not that I knew exactly how to do it %-)!

Hey, you said you could do it, I just yearn to know how! 🙂

Massimiliano

> **···**
>
> On Mon, Aug 19, 2002 at 02:44:06AM +0900, bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu wrote:

---

<div class="post-metadata">

**Author:** ![Dave\_Thomas](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@Dave\_Thomas](https://rubytalk.org/u/Dave_Thomas)\
**Post date:** [18 August 2002 03:05 UTC](https://rubytalk.org/t/ide-vs-editor/1255/24 "2002-08-18T03:05:02Z")

</div>

Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) writes:

> > > How do you run tests and then jump to offending lines? I use to run  
> > > I’ve been running my unit tests from a makefile,
> 
> Thanks to you and Alan for the tip. A sensible approach. But I  
> wonder if any output buffer can be forced to be parsed into line  
> anchors to another buffer. Elisp wizards, hints?

Use M-x compile to run the tests, and set  
compilation-error-regexp-alist to parse out the line number and file  
name of the failing test. Then next-error (normally bound to ^X-` will  
load the file and take you to the line in error. (This is all theory:  
I’ve never tried parsing Test::Unit output, but I can’t see a problem  
doing it.)

Cheers

Dave

> **···**
>
> > On Sun, Aug 18, 2002 at 03:57:22AM +0900, Alan Chen wrote:

---

<div class="post-metadata">

**Author:** ![Jim\_Weirich2](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@Jim\_Weirich2](https://rubytalk.org/u/Jim_Weirich2)\
**Post date:** [18 August 2002 05:12 UTC](https://rubytalk.org/t/ide-vs-editor/1255/25 "2002-08-18T05:12:32Z")

</div>

> Again, I did not ask how you jump to a line, I asked  
> how do you jump to the line of a failed test, which  
> you said can be done.

Several ways. The easiest is to run the tests from the M-x compile  
command and use the find next error command.

If you run them from within a shell in emacs (rather than M-x  
compile), then you can use the following two functions and keybinding  
to search for errors in the immediately preceeding command output in  
the shell.

Note that find-errors searches backwards for a shell prompt. If you  
have an unusual shell prompt, this may require tweeking.

> **···**
>
> * * *
> 
> (defun find-errors ()  
> “Find the Errors in the current shell buffer.”  
> (interactive)  
> (save-excursion  
> (re-search-backward “\[1\]+\$”)  
> (set-mark (point))  
> (re-search-backward “\[2\]+\$”)  
> (find-errors-in-region)  
> (next-error '(4)))  
> )
> 
> (defun find-errors-in-region ()  
> “Use highlighted errors as compile errors.”  
> (interactive)  
> (copy-region-as-kill (region-beginning) (region-end))  
> (goto-char (point-max))  
> (let ((oldbuf (get-buffer “_shell errors_”)))  
> (if oldbuf (kill-buffer oldbuf)))  
> (let ((outbuf (get-buffer-create “_shell errors_”)) )  
> (switch-to-buffer outbuf)  
> (insert-string “\n\n\n\n”)  
> (yank)  
> (setq compilation-last-buffer outbuf)  
> (compilation-mode) ))
> 
> ## (global-set-key “\C-ce” 'find-errors)
> 
> Emacs uses regular expressions to find and parse the “compile” output.  
> If it cannot find the test case errors, jsut add the appropriate REs  
> to the error list.
> 
> ## – – Jim Weirich [jweirich@one.net](mailto:jweirich@one.net)[http://w3.one.net/~jweirich](http://w3.one.net/~jweirich)
> 
> “Beware of bugs in the above code; I have only proved it correct,  
> not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)

* * *

1. a-zA-Z0-9 

2. a-zA-Z0-9

---

<div class="post-metadata">

**Author:** ![Massimiliano\_Mirra4](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Massimiliano\_Mirra4](https://rubytalk.org/u/Massimiliano_Mirra4)\
**Post date:** [18 August 2002 10:38 UTC](https://rubytalk.org/t/ide-vs-editor/1255/26 "2002-08-18T10:38:29Z")

</div>

Sorry, I misunderstood. I believed the subject being discussed was  
users’ benefit, not salesmen’s.

Massimiliano

> **···**
>
> On Sun, Aug 18, 2002 at 08:22:37AM +0900, Lothar Scholz wrote:
> 
> > > On Sun, Aug 18, 2002 at 01:38:43AM +0900, Lothar Scholz wrote:
> > > 
> > > > And the community of hard core vi or emacs persons is to small.
> > > 
> > > What planet do you live on? 🙂
> > 
> > Earth.
> > 
> > But to be more precise: The community of persons who are buying and  
> > evaluating IDE’s. Even in companies with as low as 5 programmers that  
> > are normally not the geeks that what to use the editor.
> > 
> > I analysed this with the economic aspect in mind. And this will be  
> > hard to deny.

---

<div class="post-metadata">

**Author:** ![Alan\_Chen2](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Alan\_Chen2](https://rubytalk.org/u/Alan_Chen2)\
**Post date:** [18 August 2002 20:54 UTC](https://rubytalk.org/t/ide-vs-editor/1255/27 "2002-08-18T20:54:11Z")

</div>

There is also exuberant ctags ([http://ctags.sf.net](http://ctags.sf.net)) which supports  
ruby tag scans for both vi and emacs.

> **···**
>
> On Mon, Aug 19, 2002 at 03:16:18AM +0900, Dave Thomas wrote:
> 
> > [bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu](mailto:bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu) writes:
> > 
> > > You need a ruby version of etags. Then it’s just a simple  
> > > matter of using tags-query-replace. The hard bit is a ruby  
> > > version of etags. I said it was possible, not that I knew  
> > > exactly how to do it %-)!
> > 
> > rtags comes with irb (the separate package, not the one that comes in  
> > the Ruby download). Never used it, but it doesn’t crash when I run  
> > it… 🙂
> > 
> > Dave
> 
> –  
> Alan Chen  
> Digikata LLC  
> [http://digikata.com](http://digikata.com)

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [19 August 2002 11:46 UTC](https://rubytalk.org/t/ide-vs-editor/1255/28 "2002-08-19T11:46:08Z")

</div>

This is obviously the problem of editors vs IDEs. IntelliJ IDE for Java  
manages such things as “method” rename with incredible ease. I wonder if it’s  
even possible for Ruby - dynamically typed and all.

Thoughts? I’d like to see it one day. How does the Smalltalk refactoring  
browser work?

Gavin

> **···**
>
> ----- Original Message -----  
> From: “Massimiliano Mirra” [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com)
> 
> > [snip too much context]
> > 
> > I wonder, though, what tags-query-replace does. If I modify `class MyClass; def meth; end; end' into `class MyClass; def new\_meth; end;  
> > end’, will the various my\_instance.meth throughout the code be changed  
> > into my\_instance.new\_meth? It doesn’t seem very likely – for one  
> > thing, how would Emacs know that my\_instance is an instance of MyClass  
> > and not anything else?
> > 
> > Massimiliano

---

<div class="post-metadata">

**Author:** ![Bbense\_Comp\_Lang\_R12](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@Bbense\_Comp\_Lang\_R12](https://rubytalk.org/u/Bbense_Comp_Lang_R12)\
**Post date:** [19 August 2002 14:28 UTC](https://rubytalk.org/t/ide-vs-editor/1255/29 "2002-08-19T14:28:28Z")

</div>

In article [20020818183052.GA4757@prism.localnet](mailto:20020818183052.GA4757@prism.localnet),

> > > > - 
> > > > - I can do all this in Emacs and have a powerful editor. Is it  
> > > > Same questions to you: how do you have a method’s renaming propagate,
> > 
> > - 
> > - You need a ruby version of etags. Then it’s just a simple  
> > matter of using tags-query-replace. The hard bit is a ruby  
> > version of etags.
> 
> I heard about etags supporting ruby, but never managed to get it work,  
> probably because I never used etags with any other language and I  
> don’t know how it is supposed to work when it does. Sounds like it’s  
> time for another try.
> 
> I wonder, though, what tags-query-replace does. If I modify `class MyClass; def meth; end; end' into `class MyClass; def new\_meth; end;  
> end’, will the various my\_instance.meth throughout the code be changed  
> into my\_instance.new\_meth? It doesn’t seem very likely – for one  
> thing, how would Emacs know that my\_instance is an instance of MyClass  
> and not anything else?

- 
  - You’ve got me there. I was extrapolating my C refactoring  
experience, there tags-query-replace rules. However, I can  
see the problems with doing that in ruby. It would depend  
on how smart the tag program was, I suspect you’d have to  
have a full blown ruby parser to fully support this kind  
of refactoring. But since we have one handy, I don’t think  
it would be impossible.

- 
  - Booker C. Bense

> **···**
>
> Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) wrote:
> 
> > On Mon, Aug 19, 2002 at 02:44:06AM +0900, bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu wrote:

---

<div class="post-metadata">

**Author:** ![Syver\_Enstad](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Syver\_Enstad](https://rubytalk.org/u/Syver_Enstad)\
**Post date:** [12 September 2002 21:41 UTC](https://rubytalk.org/t/ide-vs-editor/1255/30 "2002-09-12T21:41:14Z")

</div>

Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) writes:

> > > > - 
> > > > - I can do all this in Emacs and have a powerful editor. Is it  
> > > > Same questions to you: how do you have a method’s renaming  
> > > > propagate,
> 
> > - 
> > - You need a ruby version of etags. Then it’s just a simple  
> > matter of using tags-query-replace. The hard bit is a ruby  
> > version of etags.
> 
> I heard about etags supporting ruby, but never managed to get it work,
> 
> probably because I never used etags with any other language and I  
> don’t know how it is supposed to work when it does. Sounds like it’s  
> time for another try.

You roll your own ruby support if your etags doesn’t have it (I am  
using emacs 21.2.1 and the version of etags supplied doesn’t have it).

Here’s how to roll your own:  
etags -l none --regex=‘your regex’ --regex=‘your other regex’ files

You get the point, you can supply your own regexes that matches what  
you want stored in the tags file as ruby definitions.

An example that I use because the etags python support didn’t store  
method definition (only class names and functions).

etags %s --regex=“/[\t]+def+(.+?)(/\1/”

The point of this regexp is to match a line looking like this  
def theIdentifierThatEtagsWillPutInTheTagsFile(self, \*args):

theIdentifierThatEtagsWillPutInTheTagsFile is matched by the first  
group in the regex (in fact the only group) and then you tell etags  
which group contains the identifier by writing \1 (for the first  
group, you might need more if you need to group for or’ing parts of  
regexps)

If you use \*nix I think you should substitute the enclosing " with ’

> I wonder, though, what tags-query-replace does. If I modify `class MyClass; def meth; end; end' into `class MyClass; def new\_meth; end;  
> end’, will the various my\_instance.meth throughout the code be changed
> 
> into my\_instance.new\_meth? It doesn’t seem very likely – for one  
> thing, how would Emacs know that my\_instance is an instance of MyClass
> 
> and not anything else?

That’s why it’s called query, it asks you for each time it finds meth  
so you can say yes (or no).

It would be fine if any replies to this posting would be cc’ed to me,  
I am more of a python guy currently, but had to check out the group as  
Ron Jeffries and Dave Thomas seems to appreciate Ruby a lot.

> **···**
>
> > On Mon, Aug 19, 2002 at 02:44:06AM +0900, \> bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu wrote:
> 
> –
> 
> Vennlig hilsen
> 
> Syver Enstad

---

<div class="post-metadata">

**Author:** ![Massimiliano\_Mirra4](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Massimiliano\_Mirra4](https://rubytalk.org/u/Massimiliano_Mirra4)\
**Post date:** [18 August 2002 11:14 UTC](https://rubytalk.org/t/ide-vs-editor/1255/31 "2002-08-18T11:14:22Z")

</div>

> > Thanks to you and Alan for the tip. A sensible approach. But I  
> > wonder if any output buffer can be forced to be parsed into line  
> > anchors to another buffer. Elisp wizards, hints?  
> > Use M-x compile to run the tests,

It’s M-x compile’ing that turns me a bit down, because it requires the  
extra step of saving. Right now, I just press C-c-c, current buffer  
is evaluated (whether saved or not), and since it contains:

if **FILE** == $0  
require ‘test/unit’  
…  
end

…tests are run, and output shown in a lower window. I was wondering  
whether that appearing window could be made a parsed-for-line-numbers  
one like M-x compile’s. Maybe I’m just being too lazy…

> and set compilation-error-regexp-alist to parse out the line number  
> and file name of the failing test. Then next-error (normally bound  
> to ^X-` will load the file and take you to the line in error. (This  
> is all theory: I’ve never tried parsing Test::Unit output, but I  
> can’t see a problem doing it.)

(Some minutes later…)

…or maybe I’d better just RTFM. 🙂

C-x `runs the command next-error which is an interactive compiled Lisp function in`compile’.  
(next-error &optional ARGP)

[…]

C-x `normally uses the most recently started compilation or grep buffer. However, it can operate on any buffer with output from the M-x compile and M-x grep commands, or, more generally, on any buffer in Compilation mode or with Compilation Minor mode enabled. To specify use of a particular buffer for error messages, type C-x` in that buffer.

Ok, time to learn some elisp. 🙂

Massimiliano

> **···**
>
> On Sun, Aug 18, 2002 at 12:05:02PM +0900, Dave Thomas wrote:

---

<div class="post-metadata">

**Author:** ![Carl\_Parrish](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@Carl\_Parrish](https://rubytalk.org/u/Carl_Parrish)\
**Post date:** [18 August 2002 13:59 UTC](https://rubytalk.org/t/ide-vs-editor/1255/32 "2002-08-18T13:59:13Z")

</div>

Does anyone know of a good source on best practices to make ruby coding  
easier with VIM? I’m looking for tips like these, how to intergrate  
Test::Unit in VIM if there are better Syntax files. How to access CVS  
from VIM. I"m pretty certain all this is possible I just don’t know  
where or how. If this source isn’t already available I’d be more than  
willing to create it. The only problem is I don’t know it already.;

Carl P.

> **···**
>
> On Sat, 2002-08-17 at 20:05, Dave Thomas wrote:
> 
> > Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) writes:
> > 
> > > On Sun, Aug 18, 2002 at 03:57:22AM +0900, Alan Chen wrote:
> > > 
> > > > > How do you run tests and then jump to offending lines? I use to run  
> > > > > I’ve been running my unit tests from a makefile,
> > > 
> > > Thanks to you and Alan for the tip. A sensible approach. But I  
> > > wonder if any output buffer can be forced to be parsed into line  
> > > anchors to another buffer. Elisp wizards, hints?
> > 
> > Use M-x compile to run the tests, and set  
> > compilation-error-regexp-alist to parse out the line number and file  
> > name of the failing test. Then next-error (normally bound to ^X-` will  
> > load the file and take you to the line in error. (This is all theory:  
> > I’ve never tried parsing Test::Unit output, but I can’t see a problem  
> > doing it.)
> > 
> > Cheers
> > 
> > Dave

---

<div class="post-metadata">

**Author:** ![Mauricio\_Fernndez](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Mauricio\_Fernndez](https://rubytalk.org/u/Mauricio_Fernndez)\
**Post date:** [19 August 2002 16:53 UTC](https://rubytalk.org/t/ide-vs-editor/1255/33 "2002-08-19T16:53:58Z")

</div>

I believe a parser wouldn’t be enough:

```
a = create_some_object()
a.instance # 2 b renamed? depends on a.type

```

Sure, a really clever tool would analyze create\_some\_object() and infer  
the type, but this is guaranteed not to work always (eval, etc…) and  
will fail a lot if the program isn’t so intelligent.

The only way I can think of that could possibly work is interpreting  
and keeping track of the method calls (plus their position in the  
source code). But we’d have to test all code branches, which might be  
impossible…

> **···**
>
> On Mon, Aug 19, 2002 at 11:28:28PM +0900, bbense+comp.lang.ruby.Aug.19.02@telemark.stanford.edu wrote:
> 
> > - 
> > - You’ve got me there. I was extrapolating my C refactoring  
> > experience, there tags-query-replace rules. However, I can  
> > see the problems with doing that in ruby. It would depend  
> > on how smart the tag program was, I suspect you’d have to  
> > have a full blown ruby parser to fully support this kind  
> > of refactoring. But since we have one handy, I don’t think  
> > it would be impossible.
> 
> –  
> \_ \_
> 
> > > \_\_ \_\_ _| |_ \_\_\_ \_ \_\_ \_\_\_ \_\_ \_ \_ \_\_  
> > > '\_ \ / _`| __/__ | '_` \_ \ / ` | ’ \   
> > > ) | (| | |_\_\_ \ | | | | | (_| | | | |  
> > > .\_\_/ \_,_|\ __|__ /| |_| |_|\__,_|_| |\_|  
> > > Running Debian GNU/Linux Sid (unstable)  
> > > batsman dot geo at yahoo dot com
> 
> Windows without the X is like making love without a partner.  
> – MaDsen Wikholm, [mwikholm@at8.abo.fi](mailto:mwikholm@at8.abo.fi)

---

<div class="post-metadata">

**Author:** ![Dan\_Debertin](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Dan\_Debertin](https://rubytalk.org/u/Dan_Debertin)\
**Post date:** [12 September 2002 21:50 UTC](https://rubytalk.org/t/ide-vs-editor/1255/34 "2002-09-12T21:50:33Z")

</div>

Or you download Exuberant Ctags and save yourself some work. Supports  
both vim and Emacs, as well as ruby.

[http://ctags.sourceforge.net/languages.html](http://ctags.sourceforge.net/languages.html)

Dan

> **···**
>
> At Fri, 13 Sep 2002 06:41:14 +0900, Syver Enstad wrote:
> 
> > You roll your own ruby support if your etags doesn’t have it (I am  
> > using emacs 21.2.1 and the version of etags supplied doesn’t have it).
> 
> –  
> /^Dan Debertin$/  
> [airboss@nodewarrior.org](mailto:airboss@nodewarrior.org) | Did I sleep a little too late,  
> [www.nodewarrior.org](http://www.nodewarrior.org) | or am I awake? --Byrne

---

<div class="post-metadata">

**Author:** ![Alan\_Chen2](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Alan\_Chen2](https://rubytalk.org/u/Alan_Chen2)\
**Post date:** [12 September 2002 21:59 UTC](https://rubytalk.org/t/ide-vs-editor/1255/35 "2002-09-12T21:59:07Z")

</div>

…\< roll your own stuff deleted\>

No need to roll your own, you can use exuberant ctags which has  
support for ruby in etags format. I believe it supports Python too.

> **[Exuberant Ctags](https://ctags.sourceforge.net/)**
>
> Distribution site for Exuberant Ctags.

I’ve been happily using it for many languages for years now.

> **···**
>
> On Fri, Sep 13, 2002 at 06:41:14AM +0900, Syver Enstad wrote:
> 
> > Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) writes:
> > 
> > > On Mon, Aug 19, 2002 at 02:44:06AM +0900, \> \> bbense+comp.lang.ruby.Aug.18.02@telemark.stanford.edu wrote:
> > > 
> > > > > > - 
> > > > > > - I can do all this in Emacs and have a powerful editor. Is it  
> > > > > > Same questions to you: how do you have a method’s renaming  
> > > > > > propagate,
> > > 
> > > > - 
> > > > - You need a ruby version of etags. Then it’s just a simple  
> > > > matter of using tags-query-replace. The hard bit is a ruby  
> > > > version of etags.
> > > 
> > > I heard about etags supporting ruby, but never managed to get it work,
> > > 
> > > probably because I never used etags with any other language and I  
> > > don’t know how it is supposed to work when it does. Sounds like it’s  
> > > time for another try.
> > 
> > You roll your own ruby support if your etags doesn’t have it (I am  
> > using emacs 21.2.1 and the version of etags supplied doesn’t have it).
> 
> –  
> Alan Chen  
> Digikata LLC  
> [http://digikata.com](http://digikata.com)

---

<div class="post-metadata">

**Author:** ![Horst](https://avatars.discourse-cdn.com/v4/letter/h/edb3f5/32.png) [@Horst](https://rubytalk.org/u/Horst)\
**Post date:** [13 September 2002 06:02 UTC](https://rubytalk.org/t/ide-vs-editor/1255/36 "2002-09-13T06:02:33Z")

</div>

“Syver Enstad” [syver-en+usenet@online.no](mailto:syver-en+usenet@online.no) schrieb im Newsbeitrag news:uvg5ax5bu.fsf@online.no…

> Massimiliano Mirra [list@NOSPAMchromatic-harp.com](mailto:list@NOSPAMchromatic-harp.com) writes:
> 
> Here’s how to roll your own:  
> etags -l none --regex=‘your regex’ --regex=‘your other regex’ files

I also use etags with the following regexp:

‘/[\t]_(def|class|module)[\t\<]_([^ \t]_)[\t]_/\2/’

Its not perfect but works for me.

Cheers  
Horst

---

<div class="post-metadata">

**Author:** ![Doug\_Kearns](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Doug\_Kearns](https://rubytalk.org/u/Doug_Kearns)\
**Post date:** [18 August 2002 23:08 UTC](https://rubytalk.org/t/ide-vs-editor/1255/37 "2002-08-18T23:08:52Z")

</div>

[http://www.rubygarden.org/ruby?VimExtensions](http://www.rubygarden.org/ruby?VimExtensions) is a good place to start.

Regards,  
Doug

> **···**
>
> On Sun, Aug 18, 2002 at 10:59:13PM +0900, Carl Parrish wrote:
> 
> > Does anyone know of a good source on best practices to make ruby coding  
> > easier with VIM?

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [19 August 2002 00:14 UTC](https://rubytalk.org/t/ide-vs-editor/1255/38 "2002-08-19T00:14:04Z")

</div>

See VimExtensions on the Ruby Garden wiki (if you don’t know where that is, me  
neither; I use [rubycentral.com](http://rubycentral.com) as a link repository).

You’ll find a few tricks there. Also search for “ruby” at [www.vim.org](http://www.vim.org).

Finally, put this in your {.vim/vimfiles}/ftplugin/ruby:

imap end-cc

Then type  
def fun(x) ( is shift-carriage\_return)

and you’ll see

def fun(x)  
[cursor]  
end

That of course can be used with for, if, class, begin, …

If you don’t understand any of this or the above trick doesn’t seem to work,  
drop me an email.

Cheers,  
Gavin

> **···**
>
> ----- Original Message -----  
> From: “Carl Parrish” [cparrish@cox.net](mailto:cparrish@cox.net)  
> To: “ruby-talk ML” [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> Sent: Sunday, August 18, 2002 11:59 PM  
> Subject: Re: IDE vs. editor
> 
> > Does anyone know of a good source on best practices to make ruby coding  
> > easier with VIM? I’m looking for tips like these, how to intergrate  
> > Test::Unit in VIM if there are better Syntax files. How to access CVS  
> > from VIM. I"m pretty certain all this is possible I just don’t know  
> > where or how. If this source isn’t already available I’d be more than  
> > willing to create it. The only problem is I don’t know it already.;
> > 
> > Carl P.

---

<div class="post-metadata">

**Author:** ![Holden\_Glova](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Holden\_Glova](https://rubytalk.org/u/Holden_Glova)\
**Post date:** [19 August 2002 07:27 UTC](https://rubytalk.org/t/ide-vs-editor/1255/39 "2002-08-19T07:27:33Z")

</div>

Carl,

I haven’t come across any integration for Test::Unit in ViM. Sure there are  
ways to easily run your main Test::Unit test suite from within ViM, but I  
haven’t seen anything mapping the errors back to the offending line in the  
source file.

CVS can be loosely integrated through a front end script called CVSMenu (get  
it [http://vim.sf.net](http://vim.sf.net)). I would prefer something that is easier to use/view  
myself. I can’t get used to the diffs and I also like it when I don’t have to  
do anything to see what needs to be updated, my view is always “live” showing  
me what has changed and what hasn’t.

* * *

Signed,  
Holden Glova

> **···**
>
> On Mon, 19 Aug 2002 01:59, Carl Parrish wrote:
> 
> > Does anyone know of a good source on best practices to make ruby coding  
> > easier with VIM? I’m looking for tips like these, how to intergrate  
> > Test::Unit in VIM if there are better Syntax files. How to access CVS  
> > from VIM. I"m pretty certain all this is possible I just don’t know  
> > where or how. If this source isn’t already available I’d be more than  
> > willing to create it. The only problem is I don’t know it already.;
> > 
> > Carl P.

---

<div class="post-metadata">

**Author:** ![Ryan\_King](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@Ryan\_King](https://rubytalk.org/u/Ryan_King)\
**Post date:** [19 August 2002 18:40 UTC](https://rubytalk.org/t/ide-vs-editor/1255/40 "2002-08-19T18:40:47Z")

</div>

Agreed: a simple parser wouldn’t be enough. “eval” is one of  
many examples where it’s non-trivial to discover the correct type  
of a Ruby object from source.

The original Smalltalkers dealt with this problem in a simple  
way: Just substitute textually, prompting the user with the list  
of effected lines.

To my knowledge, no one has ever written a more effective  
RenameMethod for a dynamically typed language. Probably the  
80/20 rule in effect.

- Ryan King

> **···**
>
> On 2002.08.20, Mauricio Fern?ndez [batsman.geo@yahoo.com](mailto:batsman.geo@yahoo.com) wrote:
> 
> > [regarding a mechanical “RenameMethod” refactoring for ruby]:  
> > I believe a parser wouldn’t be enough:

[Previous page](https://rubytalk.org/t/ide-vs-editor/1255.md?page=1)

[Next page](https://rubytalk.org/t/ide-vs-editor/1255.md?page=3)
