# Re: ruby indentantion

**URL:** <https://www.ruby-forum.com/t/re-ruby-indentantion/75958>\
**Category:** Ruby\
**Created:** [November 14, 2006, 6:47pm UTC](https://www.ruby-forum.com/t/re-ruby-indentantion/75958 "2006-11-14T18:47:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [November 14, 2006, 6:47pm UTC](https://www.ruby-forum.com/t/re-ruby-indentantion/75958/1 "2006-11-14T18:47:23Z")

</div>

From: Trans [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

> This is just an guestimation but I think Ruby went 2-space because the  
> most common keyword that takes a block is only three letters long:  
> ‘def’.

What about ‘class’ or ‘module’? Don’t you indent inside of them?

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [November 14, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/re-ruby-indentantion/75958/2 "2006-11-14T18:55:24Z")

</div>

Hi –

On Wed, 15 Nov 2006, Gavin K. wrote:

> From: Trans [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]
> 
> > This is just an guestimation but I think Ruby went 2-space because the  
> > most common keyword that takes a block is only three letters long:  
> > ‘def’.
> 
> What about ‘class’ or ‘module’? Don’t you indent inside of them?

I can’t wait for an editor plugin that indents based on the length of  
the first word on the previous line… 🙂

David

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [November 14, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/re-ruby-indentantion/75958/3 "2006-11-14T21:13:58Z")

</div>

removed\_email\_address@domain.invalid writes:

> I can’t wait for an editor plugin that indents based on the length of  
> the first word on the previous line… 🙂

Emacs does that when using text-mode.
