Is there any way to parse the open document (via regex search) and return the results as choices for TextMate::UI.complete?
The command might search for "$TM_\w+" so each time I want to type $TM_SOMETHING I could get a list of completions built from what I've typed elsewhere in the document.
I've got a basic TextMate::UI command up and running http://pastie.textmate.org/421465, and as for a parser I've been using this command: http://pastie.textmate.org/421473 to complete stuff thats been indented by 4 tabs (only bummer about this command is that the document needs to be saved).
I'd love to combine these commands, but since I don't know Ruby I don't have any idea what to do. (I scraped both those commands off this list).
Thanks in advance.