72

Anybody here who knows, if and how I could enable word wrap in the Python console for long lines? I can't see them as a whole, I have always to scroll the window to the righit, to get all informations. I have only 5 Buttons offered: rerun, stop, close, execute current statement, help.

(in contrast to this, in Event Log, I see buttons called "Use soft wraps".)

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Hartmut Pfarr
  • 5,534
  • 5
  • 36
  • 42

7 Answers7

73

for version 3.4.1:

View -> Active Editor -> Use Soft Wraps

Bing Ren
  • 1,589
  • 17
  • 26
  • 6
    This answer is actually about the editor, not the console. Also, this only works on a file-by-file basis (you'd have to set it separately for each file). To set it globally for ALL files you edit, the checkbox is right above the one in @Hartmut's answer below: File -> Settings -> Editor -> "Virtual Space" group -> Use soft wraps in editor. – kevinmicke Oct 22 '14 at 17:07
  • 1
    works for Mac Pycharm edition 4.5 View- Active Editor -> Use Soft Wraps – ravi.zombie Nov 17 '15 at 00:41
  • 7
    This does work for the console, as well as the editor. It affects the currently active editor/tool window, so ensure the console is active (click in it) first. – emorris Dec 12 '16 at 14:49
47

I found the answer here:

File -> Settings -> Editor -> "Virtual Space" group -> Use soft wraps in console

In PyCharm version 2018.3.3 it can be found under

File -> Settings -> Editor -> General -> Console: Use soft wraps in console

In PyCharm version 2021.2.4 on OS X it can be found under

PyCharm -> Preferences -> Editor -> General -> Console
dfrankow
  • 20,191
  • 41
  • 152
  • 214
Hartmut Pfarr
  • 5,534
  • 5
  • 36
  • 42
  • 5
    PyCharm 2018: File→Settings→Editor→General→Console: Use soft wraps in console – simpleuser Aug 21 '18 at 17:41
  • after this did not work on 2020.2.3 community, i had to try https://stackoverflow.com/a/38149710/5228718 – seasmith Oct 19 '20 at 04:23
  • There's another setting tucked in this page for when working with markdown and other file types in PyCharm (I'm using its great markdown editor!!) https://www.programmersought.com/article/29724237816/ – DPSSpatial Apr 19 '22 at 19:36
31

Starting with Pycharm Community Edition 2016.1, the settings mentioned in other answers are gone.

However, with the debug console opened (i.e. run your python script), click the Use Soft Wraps button there, this will also affect the python console, without any restart needed.

Soft Wraps button

Wok
  • 4,956
  • 7
  • 42
  • 64
Videonauth
  • 423
  • 12
  • 14
12

For PyCharm version 4.5, soft wrap can be enabled as a global default here:

File > Settings > Editor > General > Soft Wraps > "Use soft wraps in editor"

R J
  • 4,473
  • 2
  • 22
  • 29
9

Community edition its Preferences>Editor>General>Use Soft Wraps in Editor and then to be super cool you can go Preferences>Editor>General>Console>Use Soft Wraps in Editor

Soft wraps

Wok
  • 4,956
  • 7
  • 42
  • 64
Laser Hawk
  • 1,988
  • 2
  • 23
  • 29
7

For Pycharm Professional 2016.3.2 on Windows:

Click on the upper half of the Python Console (i.e. the output half, not the input line at the bottom).

On the main menu select Help and Find Action... (shortcut: CTRL + SHIFT + A).

Type "soft" in the "Enter action or option name" search box.

Toggle "Active Editor: Use Soft Wraps" to On.

Run a new command with long output and you should see it soft wrapped in the Python Console. Note, that previous output will not be wrapped.

(None of the above methods worked for the Python Console -- though they did work for the Debug Console and Event Log)

3

As of 2018 - I found the setting here:

Settings -> Editor -> General -> Console -> Use soft wraps in console:

Settings -> Editor -> General -> Console -> Use soft wraps in console

kayess
  • 3,384
  • 9
  • 28
  • 45
Will Chen
  • 41
  • 3