Page 1 of 1

Editor: 2 wishes for Christmas

Posted: Sun Oct 07, 2007 11:55 pm
by Blue
There are a couple of time-savers that, in my view, would make living with the PB Editor a much better experience:

(1) a function to replicate the currently active line (with, of course, an appropriate keyboard shortcut: may I suggest [Control-J] ? )

(2) a keyboard shortcut to select the word at the current cursor position (i.e. same as double-clicking a word).

While you're at it, maybe you could also look at the following:
It would be much better conceptually if the function that jumps to a marker [F2] were smart enough to redisplay the text so that the targeted line appeared about half-way into the screened page. I find its current behaviour of putting that line at the very top of the screen quite disconcerting; it makes the coder (at least, this coder!) lose the context of the target.

Posted: Mon Oct 08, 2007 9:56 am
by Trond
1: Ctrl+D
2: Ctrl+Left Arrow, Ctrl+Shift+Right Arrow

Posted: Mon Oct 08, 2007 11:20 am
by PB
@Trond: Your shortcuts don't work here.

@Fred: I agree that the editor should put any F2 jumps in the middle of the
page. This has bugged me for some time but I never requested it because
I thought nobody else would want it. I was wrong. :)

Posted: Mon Oct 08, 2007 11:32 am
by Fluid Byte
PB wrote:@Trond: Your shortcuts don't work here.
Of course they do. Maybe you forgot to select something?

Posted: Mon Oct 08, 2007 12:32 pm
by PB
:oops:

Posted: Mon Oct 08, 2007 10:17 pm
by Fluid Byte
Shit happens! :P

Posted: Mon Oct 08, 2007 10:20 pm
by PB
Yeah, I'm having a bad night for coding. Can't think at all! :(

Posted: Mon Oct 08, 2007 11:21 pm
by Blue
Trond wrote:1: Ctrl+D
2: Ctrl+Left Arrow, Ctrl+Shift+Right Arrow
Thanks for the quick answer, Trond.

The 2nd shortcut -- now that you've pointed it out -- seems fairly obvious. Nothing like 20/20 hindsight ! Maybe I should have figured it out on my own... But, notice, that's 2 shortcuts for the one result. isn't that a long-short cut ? :D

But the first one ? Where is it documented ??????? :roll: I think i've read the help file trough and trough, twice, and I can't recall having seen it.

It's not easy being a newbie in PB. It's very much like a cult... or like learrning how to play golf ! You have to want it pretty badly, and you have to learn to stay close to the ground at the beginning...


.

Posted: Tue Oct 09, 2007 10:42 am
by PB
> i've read the help file trough and trough, twice, and I can't recall having
> seen it

PureBasic uses Scintilla for editing, so it'd be in Scintilla's docs. PureBasic
can't have the entire docs for Scintilla in its Help files. But I agree that some
of the more useful keyboard shortcuts should be mentioned.

Posted: Tue Oct 09, 2007 7:50 pm
by Blue
PB wrote:PureBasic uses Scintilla for editing, so it'd be in Scintilla's docs. PureBasic
can't have the entire docs for Scintilla in its Help files. But I agree that some
of the more useful keyboard shortcuts should be mentioned.
Great information. Thanks PB. I'll read the scintilla docs, if I can find them.

I agree with you that PB cannot be expected to republish all the Scintilla info. But if it's something that impacts how the PB editor works, it shoiuld certainly become part of the PB documentation. PB users (especially newcomers) cannot reasonably be expected to know ( or figure out ) the internal plumbings of the PB editor, whether it's provided by Scintilla or another great helper DLL.

If I use a PB plugin to program something having to do with pictures, I certainly don't expect users of my app to know just what the plugins provide. If it's something they ought to know, i'll tell them. Once I use the plugin, it becomes my app.

---------------------------------------
addendum: I just read the Scintilla documentation. Or, rather, had a look at it. There's no way a normally constituted PB user could figure out PB keyboard shortcuts from that documentation.