inf3rno
inf3rno

Reputation: 26139

Soft wrap by Markdown only

I'd like to have soft wraps in the WebStorm editor only by Markdown files. According to Word wrapping in phpstorm this can be achieved only with Menu | View | Active Editor | Use Soft Wraps. I really don't want to have soft wraps by coding, but I don't want to use the menu every time I open an .md file.

Isn't there a way to assign this behavior for example to language or to file type?

Upvotes: 44

Views: 9979

Answers (3)

Steve
Steve

Reputation: 8809

You can configure this in .editorconfig and it will work in any JetBrains IDE that supports .editorconfig (hopefully all of them).

[*.md]
ij_any_wrap_long_lines = true

Upvotes: 3

sherb
sherb

Reputation: 6105

It's 2019, and users of JetBrains apps now have automatic soft-wraps for Markdown documents - rejoice! 🎉🎊🥳

Alas it is not enabled by default, so you'll need to visit your preferences and check a box: On WebStorm 2019.2 at least, navigate to Editor > General > Soft Wraps and click your way to Markdown-soft-wrap bliss.

Screenshot of the WebStorm preferences panel

Upvotes: 132

Dim'
Dim'

Reputation: 518

I found an acceptable solution to do this:

  1. Go to "Settings" -> "Keymap".
  2. Look for "Main menu" -> "View" -> "Active Editor".
  3. Assign a keyboard shortcup to "Use Soft Wraps" (for instance: Ctrl + Alt + w).

Now when you are editing a file, use this shortcut and it will enable the soft wraps only for this file.

Upvotes: 22

Related Questions