Vertical edge for the IDE

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Vertical edge for the IDE

Post by Mistrel »

I understand that the IDE does not support line continuation but I would at least like some degree of conscious control over the width of my code. Especially when I write comments I have no idea how far to the right I'm really going.

By vertical edge I mean this vertical line that tells you the width of your code in characters. In other languages I like to keep the width within 80 characters. And in PureBasic, where possible, I would like to do the same.

Image
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Vertical edge for the IDE

Post by eesau »

Scintilla supports those kind of vertical dividers natively so I think it'd be fairly trivial to implement. I'd use this feature too.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Vertical edge for the IDE

Post by PB »

Why don't you drag the Tools Panel to the required width point?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Vertical edge for the IDE

Post by eesau »

PB wrote:Why don't you drag the Tools Panel to the required width point?
I keep my Tools Panel on the left. Besides, you can set the divider precisely to column 80, which you can't do with the Tools Panel.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Vertical edge for the IDE

Post by Mistrel »

PB wrote:Why don't you drag the Tools Panel to the required width point?
Err.. what if I want to change the font or font size? Or if I shrink the IDE then the code section gets squished and I'm back to square one.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Vertical edge for the IDE

Post by PB »

I see. I didn't realize you were going to resize the IDE or change its font often.
It was just the first thing I thought of that I assumed would be a good solution.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Vertical edge for the IDE

Post by Mistrel »

Bumping this since we now have the ability to split lines.
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: Vertical edge for the IDE

Post by kenmo »

+1

For a few years I have enabled Scintilla edge lines (and some other Scintilla features not utilized by the PB IDE) using external tools, for example (Windows):

Code: Select all

; Compile this, add it as an IDE Tool, with the "New" and "Load" triggers
;
*Sci = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
If *Sci
  Color = SendMessage_(*Sci, #SCI_STYLEGETBACK, #STYLE_LINENUMBER, #Null)
  SendMessage_(*Sci, #SCI_SETEDGECOLOUR, Color,      #Null)
  SendMessage_(*Sci, #SCI_SETEDGECOLUMN, 80,         #Null)
  SendMessage_(*Sci, #SCI_SETEDGEMODE,   #EDGE_LINE, #Null)
EndIf
EDIT: Updated example to use a color from your current color scheme.
Last edited by kenmo on Tue Sep 20, 2016 7:54 pm, edited 1 time in total.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Vertical edge for the IDE

Post by Mistrel »

That's great! Thank you.
Post Reply