69

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".)

Hartmut Pfarr
  • 4,754
  • 5
  • 35
  • 40

7 Answers7

71

for version 3.4.1:

View -> Active Editor -> Use Soft Wraps

Bing Ren
  • 1,334
  • 13
  • 21
  • 4
    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
39

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
zwep
  • 1,075
  • 11
  • 25
Hartmut Pfarr
  • 4,754
  • 5
  • 35
  • 40
  • 4
    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
25

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,638
  • 7
  • 36
  • 60
Videonauth
  • 363
  • 10
  • 13
  • Same for the Pro version 2016.2 - great spot thanks! Poor show Jetbrains! – Chris Sep 15 '16 at 11:32
  • Thanks, this was bugging me! – navigator_ Dec 04 '16 at 20:49
  • This works with PyCharm Professional Edition 2018.1.3. – Wok May 17 '18 at 21:02
  • In my new project in 2019.2, the icons have disappeared?? – n1000 Nov 07 '19 at 10:44
  • @n1000 The icon on the very top of the python console is for using soft wraps, as of now in my 2019.2.4 version. If you have there no Icons at all you should check the installation maybe, if you have updates, that is, it could be the cause of the IDE not working as expected. – Videonauth Nov 07 '19 at 10:51
  • @Videonauth Thanks! I just noticed that the icons are only missing if I am debugging a pytest script... In debug windows for regular scripts, it is still there. – n1000 Nov 07 '19 at 10:55
  • this is the only way i could get it to work in 2020.2.3 – seasmith Oct 19 '20 at 04:22
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,325
  • 2
  • 21
  • 28
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,638
  • 7
  • 36
  • 60
Laser Hawk
  • 1,880
  • 1
  • 21
  • 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,404
  • 9
  • 29
  • 44
Will Chen
  • 41
  • 3