Page 1 of 1

PureBasic Editor improvement

Posted: Tue Nov 05, 2013 9:17 pm
by Droopy
Comments in the PureBasic editor is less readable than JaPBe
JaPBe use this tags :

Code: Select all

; standard comment
;/ the background of this line is green
;- The background of this line is grey
Commented out an area (CTRL+B) : JaPBe vs PureBasic editor

Code: Select all

; >>>>>>>>>>>>>>>>>>>>>> PureBasic editor

; If OpenWindow(0, 0, 0, 220, 150, "ClearGadgetItems", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;   ListViewGadget(0,10,10,200,100)
;   For a = 1 To 10 : AddGadgetItem (0, -1, "Item "+Str(a)) : Next    ; add 10 items
;   ButtonGadget(1, 10, 120, 150, 20, "Clear Listview contents")
;   Repeat
;     Event = WaitWindowEvent()
;     If Event = #PB_Event_Gadget
;       If EventGadget() = 1
;         ClearGadgetItems(0)
;       EndIf
;     EndIf
;   Until Event = #PB_Event_CloseWindow
; EndIf


; >>>>>>>>>>>>>>>>>>>>>> JaPBe

; If OpenWindow(0, 0, 0, 220, 150, "ClearGadgetItems", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ; ListViewGadget(0,10,10,200,100)
  ; For a = 1 To 10 : AddGadgetItem (0, -1, "Item "+Str(a)) : Next    ; add 10 items
  ; ButtonGadget(1, 10, 120, 150, 20, "Clear Listview contents")
  ; Repeat
    ; Event = WaitWindowEvent()
    ; If Event = #PB_Event_Gadget
      ; If EventGadget() = 1
        ; ClearGadgetItems(0)
      ; EndIf
    ; EndIf
  ; Until Event = #PB_Event_CloseWindow
; EndIf
I prefer the method of jaPBe because it's easier to uncomment the lines (when reading source).

Could this features be added to the editor ?

Re: PureBasic Editor improvement

Posted: Tue Nov 05, 2013 11:20 pm
by Tenaja
Droopy wrote:I prefer the method of jaPBe because it's easier to uncomment the lines (when reading source).

Could this features be added to the editor ?
I like the first idea, but this one would have to be optional--I find the "first character comment" much easier in every way. It is one of the things that is most annoying about Japbe! The first-character style is much cleaner looking, does not mess with indentation, many lines can easily be uncommented (using delete and down-arrow OR the uncomment shift-ctrl-b)...

Re: PureBasic Editor improvement

Posted: Tue Nov 05, 2013 11:25 pm
by IdeasVacuum
I agree with Tenaja - with the comment char in the left column, the code is also compatible with UltraEdit. Also, it distinguishes between a few lines of code commented out in sequence and a line that is in fact a comment.

Re: PureBasic Editor improvement

Posted: Wed Nov 06, 2013 12:16 am
by davido
I, too, prefer it at it is.

Re: PureBasic Editor improvement

Posted: Wed Nov 06, 2013 6:38 am
by ozzie
Droopy wrote:Comments in the PureBasic editor is less readable than JaPBe
JaPBe use this tags :

Code: Select all

; standard comment
;/ the background of this line is green
;- The background of this line is grey
I use jaPBe and the above is one reason that I do. I have a line containing nothing but ;- before each Procedure and Macro so I get a grey line between all my Procedure etc. I find this makes it easy to see where Procedures start and end. I use ;/ for 'important' comments as the green background makes them stand out from other comments.

So +1 for this feature to be added to the PB editor.

Re: PureBasic Editor improvement

Posted: Wed Nov 06, 2013 7:04 am
by Danilo
ozzie wrote:
Droopy wrote:Comments in the PureBasic editor is less readable than JaPBe
JaPBe use this tags :

Code: Select all

; standard comment
;/ the background of this line is green
;- The background of this line is grey
I use jaPBe and the above is one reason that I do. I have a line containing nothing but ;- before each Procedure and Macro so I get a grey line between all my Procedure etc. I find this makes it easy to see where Procedures start and end. I use ;/ for 'important' comments as the green background makes them stand out from other comments.

So +1 for this feature to be added to the PB editor.
If this gets added to the IDE, i would like it to be more general. If we could configure it (add new characters/words and specify colors), it could be useful.
For example:

Code: Select all

;TODO - this line has background color 2 (green)
;BUG  - this line has background color 3 (dark red)

Re: PureBasic Editor improvement

Posted: Wed Nov 06, 2013 4:21 pm
by Tenaja
Danilo wrote: If this gets added to the IDE, i would like it to be more general. If we could configure it (add new characters/words and specify colors), it could be useful.
For example:

Code: Select all

;TODO - this line has background color 2 (green)
;BUG  - this line has background color 3 (dark red)
+1 to this!
I have a line containing nothing but ;- before each Procedure and Macro so I get a grey line between all my Procedure etc. I find this makes it easy to see where Procedures start and end. I use ;/ for 'important' comments as the green background makes them stand out from other comments.
You could just change the background color of your procedures...

Re: PureBasic Editor improvement

Posted: Wed Nov 06, 2013 5:06 pm
by Le Soldat Inconnu
I agree with Droopy, can be great.

Another point in PB IDE, ";{-" is not supported like ";-"

Re: PureBasic Editor improvement

Posted: Sat Nov 16, 2013 1:26 pm
by Thunder93
When I disable / comment lines out on the IDE screen via right-click Edit Menu, it places the semicolon at the very first of that line. When 'Enter'ing to move to the next line it breaks my existing indentation system and puts me to the very beginning on the next line. It doesn't really bother me how they do it, but when entering from the commented line to a new line, it should preserve my existing indentation system.

Re: PureBasic Editor improvement

Posted: Sat Nov 16, 2013 1:38 pm
by Danilo
Thunder93 wrote:When I disable / comment lines out on the IDE screen via right-click Edit Menu, it places the semicolon at the very first of that line. When 'Enter'ing to move to the next line it breaks my existing indentation system and puts me to the very beginning on the next line. It doesn't really bother me how they do it, but when entering from the commented line to a new line, it should preserve my existing indentation system.
When I write a comment and press <RETURN>, I expect the cursor to have the same indention as the first visible character
on the (commented) line before. If not, you simply press <TAB> or <BACKSPACE> until you arrive at the location you want. I do that sometimes, it is no problem.
It is how it usually works, because in some way it makes sense to continue on same indention as last line, except for special block starts like 'Select', 'If', etc.,
that start a new indention block.

Re: PureBasic Editor improvement

Posted: Sat Nov 16, 2013 3:23 pm
by Thunder93
Alright, I started up a new source instead of working with existing sources. I'm experiencing something different which makes me assume that my existing sources needs to be completely formatted via right-click Edit Menu with the new IDE.


Anyways now I'm with another dislike / annoyance.

For instance using the following example;

Code: Select all

If 1 = k
  If 1 = i
    If 1 = ONE$
      If 2 = TWO$
        CommentMe.s = "This Line To be commented out."
      EndIf
    EndIf
  EndIf
EndIf

When I commented out the line containing CommentMe.s then enter from that line to the next line. It indents the line properly and moving the semicolon, the spaces and what follows .. over to the proper positioning. However when I remove the comment via right-click Edit Menu. It removes the semicolon but doesn't restore the original line positioning as it originally was before commenting it out.

Commented it out;

Code: Select all

If 1 = k
  If 1 = i
    If 1 = ONE$
      If 2 = TWO$
;         CommentMe.s = "This Line To be commented out."
      EndIf
    EndIf
  EndIf
EndIf
Entering off that commented line;

Code: Select all

If 1 = k
  If 1 = i
    If 1 = ONE$
      If 2 = TWO$
        ;         CommentMe.s = "This Line To be commented out."
        
      EndIf
    EndIf
  EndIf
EndIf
Removing the comment;

Code: Select all

If 1 = k
  If 1 = i
    If 1 = ONE$
      If 2 = TWO$
                CommentMe.s = "This Line To be commented out."
        
      EndIf
    EndIf
  EndIf
EndIf

Re: PureBasic Editor improvement

Posted: Mon Nov 18, 2013 4:38 pm
by Le Soldat Inconnu
@Thunder93 : Your remarks is in another subject
http://www.purebasic.fr/english/viewtop ... =3&t=56677

Re: PureBasic Editor improvement

Posted: Mon Nov 18, 2013 8:41 pm
by freak
I would like to keep the block comments at the beginning of the line if possible. However, if somebody has a good idea how to better handle comments and the auto-indent, please post here: http://www.purebasic.fr/english/viewtop ... 46#p431046

Re: PureBasic Editor improvement

Posted: Mon Dec 02, 2013 2:24 pm
by Phantomas
Please, add CTRL + SHIFT + ARROW_UP/ARROW_DOWN shortcut for move lines like in Notepad++:
Image

Also:
CTRL + 0-9 NUMBER for select desired TAB like in FireFox:
Image

Re: PureBasic Editor improvement

Posted: Mon Dec 02, 2013 2:59 pm
by PB
> so I get a grey line between all my Procedure etc.
> I find this makes it easy to see where Procedures
> start and end

There's a setting in the PB IDE that automatically
colors procedure backgrounds different to the rest
of the source code.