As purebasic has a neat indenting feature, I propose to expand it a little bit more;
The editor knows about fold-able code using keywords, and it is able to identify the beginning and end of a code section, the proof is that if you leave the cursor over an if/endif for/next, etc. it can highlight it (it does underline the keywords).
So instead of me having to select manually the section, why not add a function that can select the whole section automatically using the underlying code-block feature and indent it automatically at the press of a keystroke like the F4 does for fold-able code.
This is obvious when one want to indent a whole procedure, and have to scroll the editor to select the entire code within the procedure.
Also another nice addition to the indention could be to get rid of the blank trailing spaces that remain so often at the end of a line.
Yeah I sound lazy, but bear in mind that my hands hurt when typing for too long, and those features I mention could save a lot of typing.
Some little improvements to the editor
-
- User
- Posts: 67
- Joined: Thu Jul 29, 2010 10:53 am
Re: Some little improvements to the editor
Hi Christian,
I can't follow you not wanting to select something manually but I also find this and that uneasy while trying to keep a steady indentation.
Until your request might be considered I'd like to hint you to fine small IDE addon by HeX0R with which your code will be tidied within a second by a mouseclick or hotkey. It's PureBasic opensource and crossplattform and you could even adjust it to your personal preferences.
It always indents the whole code, fills up missing spaces and removes the obsolet ones.
Example / code & link to settings (Einstellungen) : [IDE-Tool]Einruecker
Searching the forums you'll find at least two other similar tools
To me it's a little big helper
cheers ~ Vera
I can't follow you not wanting to select something manually but I also find this and that uneasy while trying to keep a steady indentation.
Until your request might be considered I'd like to hint you to fine small IDE addon by HeX0R with which your code will be tidied within a second by a mouseclick or hotkey. It's PureBasic opensource and crossplattform and you could even adjust it to your personal preferences.

It always indents the whole code, fills up missing spaces and removes the obsolet ones.
Example / code & link to settings (Einstellungen) : [IDE-Tool]Einruecker
Searching the forums you'll find at least two other similar tools
To me it's a little big helper

cheers ~ Vera
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
Re: Some little improvements to the editor
PB 4.51 can do this without any tool :roll:
- Fluid Byte
- Addict
- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
Re: Some little improvements to the editor
Ctrl+A / Ctrl+I 

Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Re: Some little improvements to the editor
AllIndent - yes - but it doesn't handle the spaces and resists personal setting-attempts 

Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
-
- User
- Posts: 67
- Joined: Thu Jul 29, 2010 10:53 am
Re: Some little improvements to the editor
Well It is easy, it is so one doesn't have either to leave the keyboard and pick the mouse, or to hold the shift key and scroll using the keyboard, when you're on a small screen, at the end of the coding section you have either to move the mouse a lot, or use a lot of keystrokes.I can't follow you not wanting to select something manually but I also find this and that uneasy while trying to keep a steady indentation.
If I have the cursor on top of a procedure (over the declaration line) why not indent the whole procedure automatically when pressing ctrl+<something> ????
I think that would be neat.
I'll have a look at it, but to indent everything at once PB can already do: ctrl+a, ctr+iUntil your request might be considered I'd like to hint you to fine small IDE addon by HeX0R with which your code will be tidied within a second by a mouseclick or hotkey. It's PureBasic opensource and crossplattform and you could even adjust it to your personal preferences.
It always indents the whole code, fills up missing spaces and removes the obsolete ones.
What I propose is just to do ctrl+<key> and just indent whatever block code that begins where the cursor is, so for example if I'm over the select statement in a select-endselect block, to have the PB editor to sort what code block without having to select the code beforehand.
This can be very good when you're working in the middle of a bunch of code, and just want to make the current code chunk a bit more readable, without having to indent the whole of the code.