[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-mode.el and tabbing

Frank Wilson

3/16/2008 12:08:00 PM

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"
)

4 Answers

Sebastian Hungerecker

3/16/2008 12:13:00 PM

0

=46rank Wilson wrote:
> 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: sepp2k@jabber.org
ICQ: 205544826

Frank Wilson

3/16/2008 12:14:00 PM

0

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,


On 16/03/2008, Frank Wilson <fajwilson@gmail.com> wrote:
> 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"
> )
>

Frank Wilson

3/16/2008 12:21:00 PM

0

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

Nobuyoshi Nakada

3/17/2008 8:34:00 AM

0

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?

--
Nobu Nakada