# Ruby-mode.el and tabbing

**URL:** <https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071>\
**Category:** Ruby\
**Created:** [March 16, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071 "2008-03-16T13:09:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Wilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3da27b/32.png) [@Frank\_Wilson](https://www.ruby-forum.com/u/Frank_Wilson)\
**Post date:** [March 16, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071/1 "2008-03-16T13:09:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Frank\_Wilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3da27b/32.png) [@Frank\_Wilson](https://www.ruby-forum.com/u/Frank_Wilson)\
**Post date:** [March 16, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071/2 "2008-03-16T13:13:49Z")

</div>

Frank Wilson wrote:

> )  
> I’m sorry, but those two snippets look exactly the same to me.

---

<div class="post-metadata">

**Author:** ![Frank\_Wilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3da27b/32.png) [@Frank\_Wilson](https://www.ruby-forum.com/u/Frank_Wilson)\
**Post date:** [March 16, 2008, 1:14pm UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071/3 "2008-03-16T13:14:59Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Frank\_Wilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3da27b/32.png) [@Frank\_Wilson](https://www.ruby-forum.com/u/Frank_Wilson)\
**Post date:** [March 16, 2008, 1:22pm UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071/4 "2008-03-16T13:22:06Z")

</div>

These are the snippets I meant to write, I hope gmail doesn’t mess  
them up this time! 😛

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

---

<div class="post-metadata">

**Author:** ![Frank\_Wilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3da27b/32.png) [@Frank\_Wilson](https://www.ruby-forum.com/u/Frank_Wilson)\
**Post date:** [March 17, 2008, 9:34am UTC](https://www.ruby-forum.com/t/ruby-mode-el-and-tabbing/132071/5 "2008-03-17T09:34:45Z")

</div>

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?
