[...] 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.
I know this is done with a shell command (right?) but I have no idea how to do this.
(I assumed the four tabs needs to be at the begin of the line):
yes, correct.
{ completionCommand = 'perl -pe "s/^\t{4}($TM_CURRENT_WORD.*)$|.* \n?/$1/" <"$TM_FILEPATH"'; disableDefaultCompletion = 1; }
this is exactly what I'm looking for. but... it doesn't seem to be working, in fact, it seems to be *excluding* everything in the splay.character scope. Any ideas?
(the completion command ought to get the entire document as stdin, but it currently doesn't).
bummer.
On 17/12/2005, at 13:28, Oliver Taylor wrote:
{ completionCommand = 'perl -pe "s/^\t{4}($TM_CURRENT_WORD.*)\ $|.*\n?/$1/" <"$TM_FILEPATH"'; disableDefaultCompletion = 1; }
this is exactly what I'm looking for. but... it doesn't seem to be working, in fact, it seems to be *excluding* everything in the splay.character scope. Any ideas?
Works fine for me. Please provide a test file and the steps you take.
And to experiment, try opt-cmd R (Text -> Filter Through command…) with the command to see which list it produce (e.g. set output to show as tool tip).