[Lazarus] [fpc-pascal] Persistent blocks in Lazarus
Andreas Berger
Andreas at TheBergerClan.org
Wed Jul 22 13:43:29 CEST 2009
Persistent blocks:
Keyboard:
- Ctrl-K + B or Ctrl-K + Ctrl-B will define the beginning of the
block. If it is before the end of the block the block is shown even if
it was hidden before.
- Ctrl-K + K or Ctrl-K + Ctrl-K will define the end of the block. If
it is after the end of of the block the block is shown even if it was
hidden before.
- Ctrl-K + H or Ctrl-K + Ctrl-H will hide\unhide the block.
- Shift-Up / Shift-Left / Shift-PgUp / Shift-Ctrl-Home /
Shift-Ctrl-Left / Shift-Home:
1) If the cursor was not at the beginning of the block then a new
block is defined and the old one removed. The block end is at the
original cursor position and the block beginning is at the new cursor
position.
2) If the cursor WAS at the beginning of the block then the block
is extended by placing the block beginning at the new cursor position.
- Shift-Down / Shift-Right / Shift-PgDn / Shift-Ctrl-End /
Shift-Ctrl-Right / Shift-End
1) If the cursor was not at the end of the block then a new block
is defined and the old one removed. The block start is at the original
cursor position and the block end is at the new cursor position.
2) If the cursor WAS at the end of the block then the block is
extended by placing the block ending at the new cursor position.
Mouse:
- The mouse works similarly. Dragging the mouse with the left button
pressed will either define a new block if the start position was not at
the block start (up) or end (down). If the drag start position was at
the block start when moving up or at the block end when moving down the
the block is extended.
- To mark a column-based block use Shift-LeftMouseButton. Wordstar used
to use Ctrl-K + N or Ctrl-K + Ctrl-N to turn on/off colum based blocks,
but this does not seem to work in delphi.
- Persistent blocks are moved when a Ctrl-K + V or Ctrl-K + Ctrl-K +
Ctrl-V is pressed.
- Persistent blocks are copied when a Ctrl-K + C or Ctrl-K + Ctrl-K +
Ctrl-C is pressed.
- Persistent blocks are moved to the clipboard with the normal windows
commands (Ctrl-Ins or Ctrl-C). However, the block is not unmarked with
this command.
- Persistent blocks are pasted from the clipboard with the normal
windows commands (Shift-Ins or Ctrl-V). In this case the old block is
undefined and the pasted block becomes the new persistent block.
- Persistent blocks are moved to the clipboard with the normal windows
commands (Shift-Del or Ctrl-X). Persistent block start and block end are
then positioned at the original block start.
- Persistend blocks are deleted via Ctrl-K + Y or Ctrl-K + Ctrl-Y or
Ctrl-Del. Persistent block start and block end are then positioned at
the original block start.
- Ctrl-K + I or Ctrl-K + Ctrl-I indents a persistent block
- Ctrl-K + U or Ctrl-K + Ctrl-U unindents a persistent block
- Ctrl-Q + B or Ctrl-Q + Ctrl-B will move the cursor to the beginning of
the persistent block.
- Ctrl-Q + K or Ctrl-Q + Ctrl-K will move the cursor to the end of the
persistent block.
Editing inside the persistent block (inserting chars or deleting them)
will grow or shrink the block acordingly.
I hope I did not forget anything.
Martin Friebe wrote:
> I am trying to figure out how they work....
>
> - Block is kept, if cursor moves away. (obvious)
> - Shift Cursur keys:
> - Block is extended if cursor was next to block
> - New block is started , if cursor was away from block.
> (could also be used to extend the block, like shift-left-mouse)
> - Block is kept, position/size adjusted if text is typed before, or into
> the block (exception, column mode block is not adapted)
> - ctrl-c copies the block, at any time
>
> annoyances I found in turbo explorer (the free delphi), not sure if they
> are supposed to be.
> - Move the caret via mouse (left click) => block is undone
> - paste/ctrl-v : the newly inserted text is selected as new block?
> (this means the current block is lost)
>
> That's all the knowledge I have about them sofar.
>
> Anyone wants to update me?
More information about the Lazarus
mailing list