Accepted answer

look in windows / preferences (at least on windows - iirc it moves around for different operating systems) then:

general -> editors -> text editors -> show print margin

tick this and it should show the line.

as a quick way of finding this, use the search filter in the top and filter on "margin".

notes from the comments - unverified by me, but i have no reason to doubt them:

it has changed somehow in 2016: for details see [here] ( you have to set it in the formatter: from menu [window]-->[preferences], select [java]-->[code style]-->[formatter], and then edit your formatter profile. in the tab page [line wrapping], you can find a setting named "maximum line width". change this setting, and the print margin in java source editor will be changed too.


@jon skeet's answer is incomplete.

(1/2) first, do what he said:

window --> preferences --> general --> editors --> text editors --> check the box for show print margin

ticking this box will show the vertical line.

enter image description here

as a quick way of finding this, use the search filter in the top and filter on "margin".

however, this only shows the line, but under most situations the "print margin column" value there is flat-out ignored.

to set the column number for where the line should be, do what @john percival hackworth mentions here:

(2/2) go to:

window --> preferences --> c/c++ [or whatever language you are using] --> code style --> formatter --> click edit --> under the line wrapping tab set the value you desire for maximum line width.

enter image description here

side note:

  1. use alt + shift + y to toggle soft line wrapping on and off. it will soft wrap (ie: no carriage return) at the end of the screen, however, not at the column you set above.

how do you enforce hard line wrapping at the column you set above (ie: that adds a carriage return)? i don't know yet. if you figure it out let me know. in sublime text 3 (a much better editor but with a much worse indexer/function definition finder :() it's alt + q.

update: i think it may be possible with the "cppstyle" plugin, which uses clang-format, by using ctrl + shift + f to apply the auto-format, but i don't know the exact instructions to make it work yet.


  1. set tab width: changing editor tab width in eclipse 3.5


in eclipse luna (4.4): choose menu window\preference . look at top-left corner, in search box type filter text, type: margin.

enter image description here

in section apperance color option, choose print margin. choose show print margin. in text box print margin column , type 65 as what you want.

Related Query

More Query from same tag