[Lazarus] syncro mode[Re: Auto indentation]
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Nov 4 22:00:16 CET 2009
On Wed, 04 Nov 2009 20:51:57 +0000
Martin <lazarus at mfriebe.de> wrote:
> Mattias Gaertner wrote:
> > On Wed, 04 Nov 2009 00:27:20 +0000
> > Martin <lazarus at mfriebe.de> wrote:
> >
> >
> >> Further thought about auto indent (for paste) and syncro/template
> >> mode.
> >>
> >
> > I disabled auto indent during syncro/template editing.
> >
> you need the same for TSynPluginTemplateEdit (template edit, which
> includes it's own syncro mode)
>
> TSynPluginTemplateEdit.Create(FEditor);
> FSyncroEdit := TSynPluginSyncroEdit.Create(FEditor);
Please check svn rev 22435.
>[...]
> > I guess this is the better solution for ecPaste.
> > Can you add such an event?
> >
> >
> Yes, the question is, if it is ok for codetools, since it would be
> called before the paste => that is you have to interpret the
> to-be-pasted text before it is part of the source
np
> At the moment you can indent based on the complete source *after*
> the paste
>
> The alternative is a combination:
> - in the OnPaste event you store the text to be pasted (as well as
> the mode normal, column ....)
> - in the OnIndent, you take the final caret pos and you know how far
> to go back (since the pasted text always ends at the final caret pos)
>
>
> I'll update you, when I got it done.
Thanks.
Mattias
More information about the Lazarus
mailing list