[Lazarus] [fpc-pascal] Persistent blocks in Lazarus
lazarus at mfriebe.de
Mon Jul 27 14:36:09 CEST 2009
Jürgen Hestermann wrote:
> > Martin Friebe schrieb:
>> I added this (enable via editor options).
>> Test on latest SVN / snapshot.
> That's absolutely fantastic!
> And even much better than in Delphi (at least in Version 7, where
> persistent blocks are used as search default - when existing - which
> is realy annoying).
Are you sore? I think Lazarus does too. But persistent or not, Lazarus
only uses "one line" blocks as default. So any multi-line block is
> I wasn't expecting someone to add this (and so fast).
> Thanks a lot.
> But now that we have it, may I ask for yet another change? ;-)
> Is it possible that Ctrl+Q,B and Ctrl+Q,K jump to the beginning and
> end of the persistent block (even if hidden)? Mnemonics are: B and K
> are first and last character of "BlocK" in the same way as for
> Ctrl+K,B and Ctrl+K,K.
I made it work for hidden blocks.
> I just saw in the key map that these commands should already exist.
> But they do not work. The commands jump somewhere (but not to the
> beginning/end of the block) and afterwards the block does no longer
> exist (not even Ctrl+K,H brings it back).
Here they do. If they still jump to random locations, please give exact
directions how to reproduce. Also make sure (if you use SVN) that you
did a "clean" build.
The other thing you may find about the 2 block points is that some
IDE/Editor actions may change them (even is the block is shown => it
would hide it). The reason is that a lot of IDE stuff (like codetools)
used the selection to modify the text (this would work, that a new
selection would be set, replaced, and cleared). All this had to be
changed. I did so, for the stuff I found. If I missed anything, I only
need to know what.
BTW column mode: should work the same as in non-persistent:
- you can use the alt key (alt left mouse; or alt shift cursor keys)
- there are three commands in the keyboard section, to change the 3
block modes (normal, column, line). You can assign whatever you want
there, and then use the normal commands to set thee block
Syncro edit mode: It will stop offering (hide the icon) syncro edit, on
a persistent block, as soon as you edit any text (inside or outside the
block). In order to get it back start a new block, or hide/unhide the
current. (extending the current block will NOT work)
In delphi the icon stays, but is no longer updated (that is if you edit
the inside of the block, and remove the last word with multiply
occurrences the icon still shows / if you add the first such word, the
icon would still not show, if it hadn't been there).
More information about the Lazarus