Hi all!
http://pastebin.geany.org/jdRsm/
The linked patch implement 'multicursor' mode in editor.c and give the ability to insert text at different positions at the same time, similar to rectangular selections but at random (user selected) places.
It works like this:
Ctrl+Alt+Click add a new 'multicursor' at click position, without actually moving the caret, you can add as many as you want. Now you are in multicursors mode, every inserted char is inserted also in all the other positions.
To end the mode just move the caret with the arrow keys.
I implemented this in editor.c (and not as an external plugin) because I have plans to also extend the snippets to support multi editing.
Actually the patch is really simple but is just a first test, it is not ready as there are 3 open issue:
1. do you like the feature? :)
2. atm the multimode end when you press up/down/left/right....i don't like it too much, some other idea?
3. is there a way to really show multiple carets? in the patch i'm using the search indicator to highlight the other cursors, but it really should be something like a caret, not an indicator. suggestions welcome
note: this is my first geany patch... plese be kind :P
davemds
---
dave@gurumeditation.it - www.gurumeditation.it