Posted over 2 years ago. Visible to the public.

RubyMine: Better soft wraps

Sometimes your code has long lines:

Copy
describe 'foo' do describe 'bar' do really_long_line_really_long_line_really_long_line another_line

When you're working with multiple editor panes, such code will often be wider than the pane area:

Copy
describe 'foo' do | describe 'bar' do | really_long_line_really_long_| another_line |

To help with this you can activate Soft wraps in the RubyMine options under General → Editor .

Your code will now look like this:

Copy
describe 'foo' do | describe 'bar' do | really_long_line_really_long_| line_really_long_line | another_line |

Note that the new line breaks are just a visualization, they won't appear in your files.

I also recommend the option Use original line's indent for wrapped parts to make the lines easier to parse. With this option, your code looks like this:

Copy
describe 'foo' do | describe 'bar' do | really_long_line_really_long_| line_really_long_line | another_line |

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Owner of this card:

Avatar
Henning Koch
Last edit:
over 2 years ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more