[Lazarus] IDE, indentation after inserting from clipboard

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Nov 28 14:50:09 CET 2016


On Mon, 28 Nov 2016 13:38:11 +0100
Jürgen Hestermann via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> In the editor of the IDE, when I put the cursor somewhere and paste multiple lines from the clipboard
> then only the first line is indented (starts where the cursor is) but all following lines are not indented
> (start from column 0).
> For example, if I have this code snippet in the clipboard:
> 
> case X of
>     1 :
> else
>     end; { of case }
> 
> and paste it at column 4 then I get
> 
>     case X of
>     1:
> else
>     end; { of case }
> 
> instead of
> 
>     case X of
>        1 :
>     else
>        end; { of case }
> 
> so I have to indent lines 2-4 manually each time I paste it.
> Is that how it should be?
> I would like to have the whole block indented in the same way as the first column.

Not yet implemented.
At the moment pasting at Col>1 pastes the text without reformatting.
When you paste at Col 1, and you have option 'Codetools/General/On
paste from clipboard' enabled the IDE will auto indent/unindent the
pasted text, each line the same amount.
Otherwise it pastes without reformatting the text.


Mattias


More information about the Lazarus mailing list