Word wrapping in PyCharm Python Console?

2019-03-09 15:11发布

问题:

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

回答1:

for version 3.4.1:

View -> Active Editor -> Use Soft Wraps



回答2:

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


回答3:

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.



回答4:

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"



回答5:

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)



回答6:

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



回答7:

As of 2018 - I found the setting here:

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