Hi all,<br>Had spare time this week end, so I started working on a little project...<br>If some of you use Gedit on Linux, Textmate on Mac, or E texteditor on Win, you may be familiar with the concept of multi-edit....<br>
if not check this video:<br><a href="http://media.jon-walsh.com/content/journal/pages/multi-edit/demo.ogv">http://media.jon-walsh.com/content/journal/pages/multi-edit/demo.ogv</a> (made the author of the Multi-edit plugin for gedit)<br>
<br>it's one the feature of gedit that really DO save me some time...very nice for small refractoring...<br><br>the closest thing approaching in Geany (and basically all scintilla-based stuff I believe...) is the zero-width rectangular selection...  <br>
you'll find a patch for editor.c for an embryonic start on this....<br>the code is awful I reckon...just a draft...<br>the idea behind it is:<br>you click somewhere you want to edit...<br>a subsequent Control+Atl+click somewhere will start a multi edit session... and keep storing these positions...<br>
if you add a char, and multi edit is on, it will appear to all positions stored before (this is happening is on_char_added)<br>if you delete, it was a bit more complicated as handling the message SCN_MODIFIED gave weird result....so basically i added a <br>
callback on the delete key...that will call on_char_deleted....deleting at all mult edit positions...<br><br>a regular click will cancel the multi edit session...<br><br>for the moment I only implemented the case where multi edit positions are below the first editing positions (adding and deleting are moving positions around...and it's not easy to keep track of these movements...)<br>
there is no indicators showing the other editing positions...(trying to find how to change locally the background of the editor)<br>I need to implement more protections (ex: for exemple, if you change the document with keyboard shortchuts, and dont click anywhere at all, multi edit is not erased, causing pb)<br>
would probably nice to implement to start a session without mouse...<br>refine the whole thing to sum up :D....<br><br>you can try it out nevertheless and point out what i missed<br>jimmy<br>