Code Wrap IntelliJ?

蹲街弑〆低调 提交于 2019-11-29 20:54:28

I think "soft wrap" might be what you're after. It's read-only, i.e. does not change the characters in the file, it only wraps what you see on screen.

Intellij >= 14.1.4: As pointed out by looper in the comments, the options are under File > Settings > Editor > General - under the Virtual Space or Soft Wraps sub-group.

Intellij < 14.1.4: Look under File > Settings > Editor > Virtual Space. It doesn't have a shortcut by default, but you can assign one in the keymap.

AndroidStudio >= 1.4.1: the options are under File > Settings > Editor > General - under the Soft Wraps sub-group.

You can also right click the gutter (the vertical bar where line number is shown) and select "Use Soft wraps" - thanks to Bajal for comment.

[ctrl+alt+s] or File->settings to open settings dialogue.

Search for code style. its under project settings.

In code style, General check

wrap when typing reaches margin

That will give you wrapping of code.

Vishal

In the Community Edition, Do Following:

File >> Settings >> Editor >> Code Style >> Java

Go to Wrapping And Braces Tab.

Set the "Right margin (columns)" option with number of columns you would like as line wrapping point. Set "Wrap on typing" to YES.

Don't forget to apply the changes before you click Ok.

One can also right click the gutter (the vertical bar where line number is shown) and select "Use Soft wraps" - thanks to Bajal for comment.

This is the easiest way, and i found it in comments. I think it should be an answer so everybody can see it easily.

(In Community Edition 2016+) go : IntelliJ IDEA>Preferences >Editor>General: select options "Use soft wraps in editor" and "Use original line's indent for wrapped parts"

OS X 10.8 IntelliJ Idea 15.0.5: IntelliJ IDEA Menu/Preferences/Editor/General/Soft Wraps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!