> Oh, and change .* to .+ to exclude the current word, i.e.:
>
> completionCommand = 'perl -pe "s/^\t{4}($TM_CURRENT_WORD.+)\$|.*
> \n?/\$1/" <"$TM_FILEPATH"|sort|uniq';
That works great. Don't know what changed. thanks.
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:
{ name = 'splay.character';
match = '\t\t\t\t+(.*)';
},
...to define anything that starts with 4 tabs as "splay.character"
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.
>> [...] 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.
> Try: echo '<meta http-equiv="refresh" content="0;
> tm-file:///path/to/file.html">'
That worked perfectly! My compilation time has now been cut down by at
least another second and I can preview my Flash movie in the browser
where it will actually be used.
+1 for Allan.
:D
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Arrr mateys!
I'm a recent TextMate convert, and I absolutely love it ;). Still, I
have a couple of requests... I searched the archives and couldn't find
much about the first two:
1) On my (Belgian) keyboard, typing a [ or ] requires option+shift+( or
). This makes the block indent shortcuts very cumbersome to use because
the command key is also required, meaning it's a 4-key chord each. One
solution would be to add e.g. command+( and command+) as extra shortcuts
for this (which are 2-key chords for anyone else on a Belgian and French
keyboard).
But in many other editors, there is a much easier and intuitive way to
block-indent: just select multiple lines of text, and press Tab or
Shift-Tab. In TextMate, the first just replaces the selection with a tab
(not so useful IMO), and the second does nothing. So, please consider
adding this feature.
2) The bracket matching seems clumsy. The highlighting is only a short
flash, so you need to move the cursor back and forth to see it again.
And because it only highlights the opening bracket, it is often hard to
see which is the matching closing bracket. Especially when you are
around multiple nested parentheses, and you are doing the 'back and
forth' thing to see it flash again. Finally, it does not work in reverse
(highlight the closing bracket when you are at the opening bracket).
I think it would be a much more usable feature if it highlighted both
brackets in a pair, when you are at either of them and did so
permanently (i.e. based on cursor position) rather than just when moving
over a bracket from left to right (i.e. based on cursor movement). It
would also get rid of the artificial pause it has now.
3) I'd like to voice my support for smarter insertion of bracket pairs
in the middle of text (as has been requested before). All too often, I
get 'foo()bar(...)' when I want to wrap 'bar(...)'. Selecting the text
to wrap first (what was suggested before on the list) just doesn't feel
right to me. My instinct groups the bracket with the keyword in front of
it, so doing keyword -> highlight -> bracket is icky. I'd much rather
have no closing bracket inserted when the next character is not an
operator/whitespace/end-of-line.
I hope having a license gives me at least some nag credits ;).
Steven Wittens
When I try to run HTML Tidy I get following error instead of document:
../../src/config.c:331: failed assertion `option_defs[ optId ].type ==
TidyInteger'
It happens for any content.
I'm running latest build on iMac G5, with TM's plist files copied from my
older mac (if that matters...).
--
regards, porneL
Hi there,
This is some Unicode which looks all overlapped (should be characters
delimited by commas on the data lines) and doesn¹t select properly (half
characters not whole characters) or edit properly (several things rather
than one disappear when you press backspace)
Here¹s how it should look
Can give you the file if you need it.
Tim
the "mate" command-line tool is great, but i find myself also wishing
that i had some way to pipe input into a textmate html window, e.g.
rather than
long_running_command | mate
which waits until the command is completed, and then throws the
output in an editable text window, i'd like to be able to say
long_running_command | pre | mate -html
and get a continuously-updated, non-editable window (with the option
of adding javascript and formatting).
i could see how to hack this up myself if there were a way to
initiate a textmate command from outside textmate (i.e. provide
stdin, a command line, and one of the standard output choices
(arguably only "show as html", "show as tool tip", and "create new
document" would really make sense)) -- but i couldn't see how to do
this (i'm no applescript wizard, but i poked through the scripting
dictionary).
is there some trick here i'm missing? if not, consider this a
feature request...
I'm trying to update the svn-commit.tmp language definition to work with
SVK, but am having some difficulty. In SVN, the temporary commit file is
always named 'svn-commit.tmp' or 'svn-commit.2.tmp'. So the following works:
fileTypes = ( 'svn-commit.tmp', 'svn-commit.2.tmp' );
In SVK, the temporary commit file is named 'svk-commitXXXXX.tmp' where
XXXXX appear to be five random alpha-numerics. I haven't been able to
figure out how to match this. Am I missing something?
Thanks,
Sean
Hi,
sometimes I test quicly my html files on the Desktop and I use this
in bundle:
open "http://localhost/desktop${TM_FILEPATH#$HOME/Desktop}"
(after to set for this one the httpd.conf file)
ok, but if an html page has spaces in the filename (I know this is
not correct) the above command doesn't work.
Is it normal?
How to correct it, please?
thanks and regards
Salvo