PyCharm Soft Wrap for File, or by Default

This guide will show you how to toggle soft wrap on an individual file, or by default in PyCharm. This is really helpful when you have long lines of text that you want to read without horizontally scrolling. Alternatively, if you have long lines of text that are already soft wrapped, then this will help tidy up your code by condensing it to one long line.

Option #1: Single File

On the file that you want to soft wrap, navigate your mouse on the empty of the line numbers or side bar and right click.

PyCharm - Toggle Soft Wrap - Soft Wrap Option

On the menu the opens up click on the Soft Wrap option.

PyCharm - Toggle Soft Wrap - Right Click Line Number

As you can see the file is now soft wrapped!

PyCharm - Toggle Soft Wrap - Results Soft Wrap

Option #2: All Files

If you would like your file to soft wrap by default each time a certain type of file is opened we can set that up in the Settings. To do this, on the main menu, select File > Settings...

PyCharm - File - Settings

On the window that pops up, select Editor > General on the left hand menu.

PyCharm - Editor - General

Look for the section titled Soft Wraps. Here we can enable or disable the option using the check mark. This applies to the files that are listed in the input field. As you can see I added ;*.py so that every time I open a Python file it is soft wrapped. This will not apply to currently open files, so you can either restart PyCharm or close out open files and re-open for them to be applied.

PyCharm - Soft Wraps

As you can see it was very easy to soft wrap in Pycharm. Why do you like or do not like using Soft Wrap? Leave a comment below to get the conversation going.

If you would like to suggest a new article or video to be released, please reach out via the Contact Page. I look forward to hearing your feedback and providing content that is helpful for you!

Leave a Comment