Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To establish a hard wrap for CSS files in JetBrains WebStorm, follow these steps:

  1. Open the settings dialogue by navigating to File > Settings (Windows, Linux) or WebStorm > Preferences (macOS).
  2. In the left-hand pane of the settings dialogue, navigate to Editor > Code Style.
  3. Click on the "CSS" tab.
  4. In the "CSS" tab, scroll down to the "Wrapping and Braces" section.
  5. Check the box next to "Wrap when typing reaches right margin."
  6. In the adjacent text field, enter the maximum line length at which you want the hard wrap to occur (this is typically 80 characters).
  7. Click "Apply" and then "OK" to save your changes.

From now on, when you type in a CSS file in WebStorm and reach the right margin, the editor will automatically create a new line and split your code at the appropriate point to adhere to the hard wrap you've established.