Forum: Ruby Editing ruby code with Emacs or Vim ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cdb3ec23d3ee6366dcffe49150a0a9e9?d=identicon&s=25 Meino Christian Cramer (Guest)
on 2006-05-16 04:15
(Received via mailing list)
Hi,

 What is your opinion:
 Which editor of the two above is better for editing/developing ruby
 code - Vim or Emacs ?

 This is not intended as a fire starter for another "Emacs vs. Vim
 holy war" -- I dont intend to start a diskussion about the key
 feature for general editing of both editors.

 I only want to know what editor has better (spezialized) features for
 codeing Ruby.

 Kind regarda and thank you very much for any help in advance !
 mcc
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-05-16 06:30
(Received via mailing list)
Meino Christian Cramer wrote:
> Hi,
>
>  What is your opinion:
>  Which editor of the two above is better for editing/developing ruby
>  code - Vim or Emacs ?
>
>  This is not intended as a fire starter for another "Emacs vs. Vim
>  holy war" --

Too late!  Pandora's box has been opened.

No, actually is is a very good question, so long as it doesn't devolve
into a "mine's bigger" thread.

I've been using gvim for a while, but have been poking around with
xemacs.  One big hurdle is figuring out how to assorted configuration;
for the life of me I cannot discover how to set up a different color
scheme.

A vi <=> emacs translation/migration guide would be handy, something
that maps basic tasks, common settings, and so on, between the two, for
people moving from one to the other.

Does anyone know of such a thing?


Oh, and to answer your initial question, my Ruby-coding experience with
vim has been quite pleasant.    There is a ruby-vim gem with assorted
menus and macros for Ruby hacking, plus it is possible to compile vim so
that you can write vim functions in Ruby.

I've not learned enough about emacs to offer an opinion.  But, Matz uses
it, which should count for something.


--
James Britt

"In Ruby, no one cares who your parents were, all they care
  about is if you know  what you are talking about."
   - Logan Capaldo
0b561a629b87f0bbf71b45ee5a48febb?d=identicon&s=25 Dave Burt (Guest)
on 2006-05-16 08:37
(Received via mailing list)
James Britt wrote:
> I've been using gvim for a while, but have been poking around with
> xemacs.  One big hurdle is figuring out how to assorted configuration;
> for the life of me I cannot discover how to set up a different color
> scheme.

Use the colorscheme command. type ":colorscheme torte" (without the
quotes, where "torte" is the name of a .vim file in /colors) in
command-mode to try one out, and once you've found one, add the line
"colorscheme torte" to .vimrc.

Cheers,
Dave
E34b5cae57e0dd170114dba444e37852?d=identicon&s=25 Logan Capaldo (Guest)
on 2006-05-16 09:59
(Received via mailing list)
On May 16, 2006, at 2:35 AM, Dave Burt wrote:

> "colorscheme torte" to .vimrc.
>
> Cheers,
> Dave
>

I think he meant he couldn't figure out how to change the color
scheme in xemacs.
E34b5cae57e0dd170114dba444e37852?d=identicon&s=25 Logan Capaldo (Guest)
on 2006-05-16 10:08
(Received via mailing list)
On May 15, 2006, at 10:14 PM, Meino Christian Cramer wrote:

>  I only want to know what editor has better (spezialized) features for
>  codeing Ruby.
>
>  Kind regarda and thank you very much for any help in advance !
>  mcc
>

I use Vim, mostly because everytime I try to use emacs I can't wrap
my brain around the key combos, although since I've switched to a mac
I have been picking up the basic editing shortcuts. (C-a, C-e, C-k, C-
y, etc.) I think it's a crime that the vim concept of yanking means
pretty much the exact opposite of the Emacs concept of yanking (I
don't car really which definition you choose, I just wish the letter
'y' meant the same thing in both). To go off on a tangent for a
moment if I may be allowed, I think the biggest problem with any text
editor, is that it's exactly that a text _editor_. Everything has all
these neat features for manipulating and changing existing text, I
want a text creator/generator. Code completion is close, but it still
requires too much typing. I guess I should learn APL and get the
right kind of keyboard <g>.
B780ee0ee1480454a85df58536702f63?d=identicon&s=25 Alder Green (Guest)
on 2006-05-16 10:27
(Received via mailing list)
On 5/16/06, Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:
>  I only want to know what editor has better (spezialized) features for
>  codeing Ruby.
>
>  Kind regarda and thank you very much for any help in advance !
>  mcc
>

I use Emacs since it's more flexible and hackable. Running consoles, a
WEBrick instance, debuggers, IRB - all within full-fledged Emacs
buffers with all the benefits. You can't do that with Vim.

And the above are really, just beginners stuff: Emacs is *supposed* to
be able to (not "hacked into") have buffers functioning as anything
from mail-clients, newsgroup readers, IRC clients, to online Chess
clients. So imho, if you use Emacs you are guaranteed (at least more
than any other editor) to be able to get it to work as you want.
9dfe8c734b0f9b37a4e218425c0a2138?d=identicon&s=25 gene.tani@gmail.com (Guest)
on 2006-05-16 10:55
(Received via mailing list)
Meino Christian Cramer wrote:
>  I only want to know what editor has better (spezialized) features for
>  codeing Ruby.
>

to narrow the discussion: look thru older threads
http://groups.google.com/group/comp.lang.ruby/sear...
which until recently was a complete ruby-talk archive

to broaden the discussion: maybe look at Eclipse/RDT, jedit, komodo,
arachno ruby, textmate, scite and other editors.
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-05-16 16:45
(Received via mailing list)
Dave Burt wrote:
> command-mode to try one out, and once you've found one, add the line
> "colorscheme torte" to .vimrc.

Thanks; I should have been more clear.  Vim colors  I understand.  It's
emacs colors that baffle me.



--
James Britt

"Design depends largely on constraints."
  - Charles Eames
0b561a629b87f0bbf71b45ee5a48febb?d=identicon&s=25 Dave Burt (Guest)
on 2006-05-16 16:48
(Received via mailing list)
Logan Capaldo wrote:
>
> I think he meant he couldn't figure out how to change the color scheme
> in xemacs.

Ahem. Yes, you're right. Sorry for the mistake, James.

Cheers,
Dave
B780ee0ee1480454a85df58536702f63?d=identicon&s=25 Alder Green (Guest)
on 2006-05-16 17:30
(Received via mailing list)
On 5/16/06, James Britt <james_b@neurogami.com> wrote:
> > quotes, where "torte" is the name of a .vim file in /colors) in
>
> "Design depends largely on constraints."
>  - Charles Eames

Ok, this is tested for Emacs 21.3:

M-x (i.e. "run the builtin function") customize-face

You'll get in the minibuffer:

Customize face: (default all)

Just hit enter, and Emacs would create a large buffer with the
formatting options for each face. It's much beyond just colors:  you
can set e.g. variable names to be bold, have a different background
color, different font... pretty much whatever you want. Just find the
face you want to change; most are pretty obvious ("Variable Name",
"String", "Keyword").

As with everything in Emacs, there are a some more advanced ways,
including stuff like choosing from whole color schemes. Didn't really
use it, so I can't comment; customizing the default scheme was enough
for me.
171a9b5755cdb090e0c2b3c20a521fbc?d=identicon&s=25 Phil Hagelberg (Guest)
on 2006-05-16 17:43
(Received via mailing list)
"Alder Green" <alder.green@gmail.com> writes:

> I use Emacs since it's more flexible and hackable. Running consoles, a
> WEBrick instance, debuggers, IRB - all within full-fledged Emacs
> buffers with all the benefits. You can't do that with Vim.
>
> And the above are really, just beginners stuff: Emacs is *supposed* to
> be able to (not "hacked into") have buffers functioning as anything
>>From mail-clients, newsgroup readers, IRC clients, to online Chess
> clients. So imho, if you use Emacs you are guaranteed (at least more
> than any other editor) to be able to get it to work as you want.

Emacs also tricks you into learning some lisp if you use it long
enough. You can count that as an advantage or a disadvantage, but
since it's one of Matz's favorite languages I would say it's quite
fitting for Ruby in an indirect way. =)

-Phil Hagelberg
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2006-05-16 20:06
(Received via mailing list)
On May 16, 2006, at 7:41 AM, James Britt wrote:

> Thanks; I should have been more clear.  Vim colors  I understand.
> It's emacs colors that baffle me.

The emacs wiki is awesome. It teaches me something new every week:

http://www.emacswiki.org/cgi-bin/wiki/ColorTheme
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-05-16 21:15
(Received via mailing list)
Alder Green wrote:

> Ok, this is tested for Emacs 21.3:
>
> M-x (i.e. "run the builtin function") customize-face
>
> You'll get in the minibuffer:
>
> Customize face: (default all)

Yow.

> use it, so I can't comment; customizing the default scheme was enough
> for me.
>

Thank you.

I'll go look now for the :colorscheme equivalent.


:)

--
James Britt

"Programs must be written for people to read, and only incidentally
  for machines to execute."
   - H. Abelson and G. Sussman
   (in "The Structure and Interpretation of Computer Programs)
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-05-16 21:19
(Received via mailing list)
Ryan Davis wrote:
>
> On May 16, 2006, at 7:41 AM, James Britt wrote:
>
>> Thanks; I should have been more clear.  Vim colors  I understand.
>> It's emacs colors that baffle me.
>
>
> The emacs wiki is awesome. It teaches me something new every week:
>
> http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

Thank you, that's quite educational.

Seems I have to go install some color-scheme script or something, then
write or cut-n-paste some code.

(I suspect that, by no coincidence, Emacs is the Lisp of editors.)

--
James Britt

"Programs must be written for people to read, and only incidentally
  for machines to execute."
   - H. Abelson and G. Sussman
   (in "The Structure and Interpretation of Computer Programs)
34f159f89cbd1d9beac0276f5a7af552?d=identicon&s=25 John Gabriele (Guest)
on 2006-05-16 22:04
(Received via mailing list)
On 5/16/06, James Britt <james_b@neurogami.com> wrote:
> [snip]
>
> (I suspect that, by no coincidence, Emacs is the Lisp of editors.)
>

Hm... I'm not sure what that's supposed to mean, but it sounds humorous.
:)

Though, now I think I feel an analogy coming on. Let's see,.. if
editors were human-powered transportation:

punchcards ~= Like walking there, but with a pebble in your shoe*.

ed ~= Those metal-wheeled roller skates you had when you were a kid.
Don't try to make any sharp turns!

vi ~= The better roller skates, with the rubber thingy on the front to
"help you stop". They got you to your friend's house, but skinned
knees were par for the course.

vim ~= That bike with the cool shock absorbers and pads on the
handlebars and top tube. Put your helmet on kid, and don't get your
pants caught in the chain!

emacs ~= A ten-speed! With water bottle, tire pump, rear view mirrors,
kick stand, the works. You've gotta get used to those weird curly
handlebars, but it'll take you all over town. :)

Hm... Now where did I leave my Gossamer Albatross parked
(http://www.sfoarts.org/exhibits/243/travel/human.html) ...

(* Note, I've never had the pleasure of using punchcards.)
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2006-05-16 22:26
(Received via mailing list)
On May 15, 2006, at 7:14 PM, Meino Christian Cramer wrote:

> What is your opinion:
> Which editor of the two above is better for editing/developing ruby
> code - Vim or Emacs ?

Yes.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
9dfe8c734b0f9b37a4e218425c0a2138?d=identicon&s=25 gene.tani@gmail.com (Guest)
on 2006-05-17 01:52
(Received via mailing list)
Eric Hodel wrote:
> On May 15, 2006, at 7:14 PM, Meino Christian Cramer wrote:
>
> > What is your opinion:
> > Which editor of the two above is better for editing/developing ruby
> > code - Vim or Emacs ?
>
> Yes.

so there you have it, it's NP-hard
This topic is locked and can not be replied to.