In attempting to make a TitlePicker, a fellow tiddleur proposed how tying [[ in the editor should automatically add closing brackets and put the caret in between, as is done in some other software. Is this possible? I.e to trigger an action when a string is typed in the edtior, including controlling the position of the caret?
The background is that, for the TitlePicker (and many other similar tools to come) it is problematic to identify a string segment via regexp when it is unclear what distinguishes the end of the segment - for example to know if [[this tiddler title ends here or here or here... as there are no closing brackets. The problem would totally solved if the closing brackets were automatically added as soon as [[ was typed and one continued to type between the bracket pairs.
<:-)