# Re: Annoying If/Else behavior in SciTE

**URL:** <https://www.ruby-forum.com/t/re-annoying-if-else-behavior-in-scite/74786>\
**Category:** Ruby\
**Created:** [November 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/re-annoying-if-else-behavior-in-scite/74786 "2006-11-07T10:56:21Z")\
**Posts on this page:** 2\
**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 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/re-annoying-if-else-behavior-in-scite/74786/1 "2006-11-07T10:56:21Z")

</div>

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

> Drew O. wrote:
> 
> > How should I adjust my properties to get this behavior?
> 
> From a cursory glance at ruby.properties, the SciTE autoindentation  
> seems rather rudimentary and only supports things like “indent line  
> after seeing these words in token stream”.

While this is true, if you open a new SciTE document (without saving it  
as a .rb file and thus letting SciTE treat it as Ruby syntax), the OP’s  
if/else/end statement indents correctly. It’s only once you go into Ruby  
mode that it gets confused about how to indent.

So (I suppose) there ought to be a setting to change the indentation in  
Ruby to act like it does in ‘normal’ mode.

---

<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 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/re-annoying-if-else-behavior-in-scite/74786/2 "2006-11-07T10:56:35Z")

</div>

Gavin K. wrote:

> if/else/end statement indents correctly. It’s only once you go into Ruby  
> mode that it gets confused about how to indent.
> 
> So (I suppose) there ought to be a setting to change the indentation in  
> Ruby to act like it does in ‘normal’ mode.

You could comment out the lines in ruby.properties for the  
statement.indent and statement.end options and handle indentation  
yourself. Or retrain your fingers to the Pythonesque  
backspace-on-block-end method.

David V.
