Editor: 2 wishes for Christmas

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Editor: 2 wishes for Christmas

Post 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.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

1: Ctrl+D
2: Ctrl+Left Arrow, Ctrl+Shift+Right Arrow
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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. :)
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

PB wrote:@Trond: Your shortcuts don't work here.
Of course they do. Maybe you forgot to select something?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

:oops:
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Shit happens! :P
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Yeah, I'm having a bad night for coding. Can't think at all! :(
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Post 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...


.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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.
User avatar
Blue
Addict
Addict
Posts: 964
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Post 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.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Post Reply