Hi,

Again, this is directed primarily at Allan, but I'd like to hear your comments.


I like snippets with default values, because they give me a feeling for the layout (yes, thank you, Infininight). I'm also really used to replacing selected text simply by overtyping it with new text. It happens quite often that I try to replace a selected placeholder with something starting with a character that's the first half of a smart typing pair (such as '(', '[' or '{'). This results in the placeholder text getting surrounded by the smart pair, and the selection getting lost, because the insertion point is moved after the second half of the smart pair. It's extremely annoying, because I can't even undo this without breaking the snippet behavior!

I propose a modification to the smart typing behavior. When there is an active selection, typing the first half of a smart typing pair should surround the selected text by the smart pair, and retain the selection.

This can already be accomplished somewhat by creating a snippet bound to '(', etc., containing:
        (${1:$TM_SELECTED_TEXT})
Unfortunately, this breaks the other niceties of smart typing, such as the overtyping of the second half of the smart pair, and so isn't really a solution.


--
(desp)


_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to