Search code examples
webstormword-wrap

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?


Solution

  • 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.