ruby-mode.el and tabbing

F

Frank Wilson

I'm starting to learn RoR on emacs with the ecb and rails plugins.
I find myself wanting to type maps in the following way
foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
)

but ruby-mode (i think) keeps doing this:

foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
)
 
S

Sebastian Hungerecker

=46rank Wilson said:
foo =3D bar.mkfoo(
=A0 =A0 :bangers =3D> "mash",
=A0 =A0 :fish =3D> "chips"
)

but ruby-mode (i think) keeps doing this:

foo =3D bar.mkfoo(
=A0 =A0 :bangers =3D> "mash",
=A0 =A0 :fish =3D> "chips"
)

I'm sorry, but those two snippets look exactly the same to me.


=2D-=20
NP: Explosions in the Sky - Day 7
Jabber: (e-mail address removed)
ICQ: 205544826
 
F

Frank Wilson

Sorry I activated the send keyboard shortcut in gmail by accident.... grrr.

I'm starting to learn RoR on emacs with the ecb and rails plugins.
I find myself wanting to type maps in the following way
foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
)

but ruby-mode (i think) keeps doing this:

foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
)

Which is sometimes way too far to the right.

Now ruby-mode seems to have this option:

ruby-deep-indent-paren

which has default value

(40 91 93 t).

I have no idea what this means. Does anybody know?

I found that (20 91 93 t) makes 1 char tabs, as does setting nil.

So I'm almost there I'd just like slightly bigger tabs, like 3 chars maybe.

Thanks,
 
F

Frank Wilson

These are the snippets I meant to write, I hope gmail doesn't mess
them up this time! :p

I find myself wanting to type maps in the following way
foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
)

but ruby-mode (i think) keeps doing this:

foo = bar.mkfoo(
:bangers => "mash",
:fish => "chips"
) # tabbing is much wider now
 
N

Nobuyoshi Nakada

Hi,

At Sun, 16 Mar 2008 21:13:57 +0900,
Frank Wilson wrote in [ruby-talk:294742]:
Now ruby-mode seems to have this option:

ruby-deep-indent-paren

which has default value

(40 91 93 t).

It is (?( ?[ ?] t).
I found that (20 91 93 t) makes 1 char tabs, as does setting nil.

20 is a control code. If you don't want to deep-indent inside
parentheses, just remove 40 and set it to (?[ ?] t).

So I'm almost there I'd just like slightly bigger tabs, like 3 chars maybe.

Do you change ruby-indent-tabs-mode and tab-width?
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top