On Fri, 02 Jan 2009 19:40:21 +0100, Thomas Martitz thomas47@arcor.de wrote:
Hi,
However, the current patch is far from intelligent and nice. It's a bit hackish (limited to 10 cursors, global struct in editor.c ...), and the next cursor movement is apparently broken once you hit tab normally between "jumps". To be investigated! Also, I changed the
Additionally, dmaphy pointed out another problem: when moving the cursor backwards in a completed snippet and then jump to the next defined cursor position, it's messed up. Testcase: Use the following snippet in some PHP code
class=class %cursor% \n{\n\tpublic function __construct(%cursor%)\n\t{\n \t\t%cursor%\n\t}\n\n\tpublic function __destruct(%cursor%)\n\t{\n\t\t% cursor%\n\t}\n\n\t%cursor%\n}
Then use the snippet: class<TAB> and type "abcd" on the first cursor position, move the cursor back by two positions and press the "Move cursor in snippet" keybinding to jump to the next cursor position. The cursor is then inside "__construct" instead of inside the braces. Maybe we can live with that but it'd be better if it would be fixed though this might be not easy.
hotkey of "go to last used tab" to nothing, so that ctrl+tab is free for this (this is the best hotkey I can find for), feel free to discuss!
This was actually not so good and so I reverted in the attached patch. The keybinding for "Go to last used tab" should be left unchanged, and there is currently no default for the new keybinding. I personally used Super-Tab which seems quite handy but not sure whether it should be the default as I have no idea how many people actually have a Super key.
I also fixed a little bug where the cursor wasn't set correctly for snippets like:
cur=%cursor%%brace_open%\n%brace_close%
The cursor should be before the braces but it was placed after.
Regards, Enrico