the blog
Back to -Blog

Ruby Editor Enhancements in Steel 1.1.5

Formatting, code folding and more...
by Huw Collingbourne
Wednesday 24 October 2007.

The big new improvements in Ruby In Steel 1.1.5 are mainly related to Rails development and Ruby IntelliSense. However, we have also made a number of small but useful additions to the editor. Just in case you’ve missed out on these, here are a few pointers...

Keyword..end Completion

Now when you enter a keyword such as def, class, module , begin, while or if, the terminating end can be entered for you...

Automatic Code Formatting

When you press Enter following an end, the code in the block that’s terminated by the end can be auto-formatted. So if, for example, you enter a sloppily formatted method like this...

....it will be reformatted with correct indentation like this:

If you don’t like keyword..end completion and automatic formatting, these can be disabled by unchecking the relevant options in Tools->Options->Text Editor->Ruby-Formatting. Remember that you can always reformat all the code in a file or just the selected block using the options in the Edit->Advanced menu (or their keystroke shortcuts).

Auto-Open Required Files

No need to hunt around looking for required files. Double-click a file name...

...and the required file will be loaded into the editor:

Collapsible Regions

Ruby In Steel has always implemented extensive code folding - not just on classes and methods but on a huge range of language constructs including if and for blocks and all kinds of looping constructs...

Now, we’ve also added collapsible ‘regions’. These are arbitrary regions within a code file, marked by a #region comment at the start (you can optionally add a name such as #region FileOperations and #endregion at the end. Just adding these comments will cause code folding to be applied to the entire region which they delimit....

As I said, these are just a few of the relatively small changes we’ve made to the editor in this release. We have made much bigger changes to its IntelliSense capabilities and I’ll blog about those shortly...

Bookmark and Share   Keywords:  ide
© SapphireSteel Software 2014