Simon,
You should take a look at Mitchell's work:
http://caladbolg.net/scite.php and
http://caladbolg.net/scite_snippets.php
Franck.
2007/3/28, Simon Steele <[EMAIL PROTECTED]>:
The mention of TextMate in another thread reminds me of a project I've had
a couple of stabs at for Scintilla/Programmer's Notepad. I love the smart
templates that TextMate and Visual Studio 2005 have.
I'm talking about templates a bit like this:
class [xxxxx]
{
public:
[xxxxx]();
~[xxxxx]();
|
};
When the template is inserted, the cursor is placed in the first
highlighted block showing xxxxx. Whatever the user types is replicated
into the other xxxxx locations. More than one smart block is allowed and
pressing tab jumps between them. Pressing enter in a smart block takes you
to the default cursor location (represented by a pipe in my above
example).
I tried to implement something like this outside Scintilla using python
scripting to handle events and define templates. I could create some
highlighted areas and mirror edits across locations but I found that the
undo model didn't quite fit right and I also had to do a lot of work to
manage the key-press interactions.
I've been thinking therefore that adding this to some version of the
Scintilla code (most likely not the default distribution) would be the
right way to go. Building in the behaviours to manage this constrained
edit mode seems like it would be more simple with access to the
Has anyone done any work on this kind of thing with Scintilla before I
start? Any thoughts about implementation details/methods?
Thanks,
Simon.
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest