Matt Gibson
Matt Gibson

Reputation: 14959

How can I get Markdown to wrap automatically in RubyMine?

I'm using RubyMine to write blog posts in Markdown (with the Markdown plugin activated), but I'm finding that the text just runs off the page to the right. This is a pain as I then have to manually add line breaks all the time, which of course gets messy when editing.

It would be great to set up some sort of word wrap so that the line length would be managed automatically. Can this be done?

Alternatively, there is an effect that occurs in other files, e.g. minified CSS, where a single, enormous line is shown and can be edited on multiple lines, even though it's still in reality one great big long one. This would be great too, but I can't work out how to turn it on.

How can I get either of these effects to work?

Upvotes: 3

Views: 741

Answers (2)

JL M
JL M

Reputation: 1468

In RubyMine 2016, I found the solution in Preferences... Pane. Select Editor->Général. Select in "Soft Wraps" the item "Use soft wraps in Editor".

Upvotes: 2

Dave Schweisguth
Dave Schweisguth

Reputation: 37627

RubyMine has only partial support for automatically hard wrapping (inserting newlines in) text. There is a "Wrap when typing reaches right margin" option in Editor → Preferences → Code Style, but it only works on a line that you're editing, not when you reformat. RubyMine 7.1 has a new Fill Paragraph action, but it only works for Ruby comments so doesn't solve your problem.

However, RubyMine will soft-wrap lines (display them as if they had newlines at the edge of the editor window) if you set View → Active Editor → Use Soft Wraps.

Upvotes: 3

Related Questions