<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande">I'm creating a custom bundle for screenwriting and I've got most of it down, but I want to leverage textmate's completion abilities. For example, I've got this is the language:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande; min-height: 13.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>{<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>name = 'splay.character';</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>match = '\t\t\t\t+(.*)';</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande"><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>},</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande; min-height: 13.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande">...to define anything that starts with 4 tabs as "splay.character"</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande; min-height: 13.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande">Now, I want to collect all the words in the current document (but only within the "splay.character" scope, and use them as a list for auto-completion. So that when I tab 4 times and type "Ki" then escape, "King John" will pop up.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Lucida Grande; min-height: 13.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Lucida Grande" size="3" style="font: 11.0px Lucida Grande">I know this is done with a shell command (right?) but I have no idea how to do this.</FONT></P><BLOCKQUOTE type="cite"> </BLOCKQUOTE></DIV><BR></BODY></HTML>