Vertical Line On the Editor

423 views
Skip to first unread message

Colin Lin

unread,
Jan 9, 2014, 2:03:09 PM1/9/14
to ace-d...@googlegroups.com

Hi:

I am new to the Ace Editor. I noticed that on the Ace Editor, there is a vertical line presented from about 2/3 of the editor. is this a feature or a bug?



Harutyun Amirjanyan

unread,
Jan 9, 2014, 4:03:01 PM1/9/14
to ace-d...@googlegroups.com
Hi
this is called printMargin and is useful to keep track of lines getting too long

you can configure or hide it with
editor.setOption("printMargin", 10)
editor.setOption("showPrintMargin", false)

Brad Moran

unread,
Jan 5, 2021, 12:15:43 PM1/5/21
to Ajax.org Cloud9 Editor (Ace)
What's the difference between printMargin and printMarginColumn?

Harutyun Amirjanyan

unread,
Jan 5, 2021, 4:13:15 PM1/5/21
to ace-d...@googlegroups.com
On Tue, Jan 5, 2021 at 9:15 PM Brad Moran <insi...@gmail.com> wrote:
What's the difference between printMargin and printMarginColumn?
 
printMargin is a shorthand allowing to configure both the column where the line is shown (printMarginColumn) and  whether the line is shown or not (showPrintMargin) in one call https://github.com/ajaxorg/ace/blob/a505922a01395ab77a878c08da06eb09b7822d23/lib/ace/virtual_renderer.js#L1760  
Message has been deleted

Brad Moran

unread,
Jan 5, 2021, 5:55:30 PM1/5/21
to Ajax.org Cloud9 Editor (Ace)
Something to note:

var obj = {};
obj.printMargin=80;
obj.showPrintMargin=false;
editor.setOptions(obj);

showPrintMargin will get set to True, which isn't what I expected. Intuitively, I expected that setting showPrintMargin would control the feature. I get the conflict, but It took me a while to figure out what was going on. The Docs aren't too pithy on this.

Is it possible to wrap at the print margin without showing the print margin? I haven't been able to get that to work.
Reply all
Reply to author
Forward
0 new messages