Well, I've been having quite a time of it with tab-triggered
commands. From looking through the many existing bundles, I'm not
surprised it took me this long to notice this bug(?), there are very
very few commands that use tab triggers.
The problem is that a tab-triggered command will empty the line that
I use the tab-trigger within when in fact the command is supposed to
replace or alter the line in some way, not delete it.
I first noticed the behavior when using Mike Mellor's GTD2 bundle and
at first thought that it was his scripts that weren't working on my
system. After some back and forth communication between Mike and I, I
was able to see that this problem happens with MOST commands that are
tab-triggered.... MOST but not ALL. I could understand all of them
not working, but most of the few that exist in the bundles I have
active don't work while one does.
Here's a list of the commands and their bundles:
GTD2:
delegate (python script)
wait (python script)
undo state change (python script)
done (python script)
Objective-C:
alloc (ruby script)
super (doesn't seem to, but haven't the time to layout test code)
(python script)
The one example that does work is...
Ruby:
word_wrap() (ruby script)
The only common thread I can see is the path to the executable at the
top of the shell script.
The ones that fail all are shell scripts in which they define the
path to the exec file at the top:
#!/usr/bin/env python
#!/usr/bin/env ruby
But then, there are other scripts that AREN'T tab-triggered and also
use shell scripts with the defined path that work.
I'm using TextMate Version 1.5.3 (1269) on OSX 10.4.8 on a 1GHz
PowerPC G4 powerbook.
Any help narrowing this problem down would be greatly appreciated.
Thanks
Mike
I know it's probably something obvious I'm not doing, but I'd really
like to be able to preview an HTML document in a project while
editing a linked CSS file. Every time I open a preview on the HTML
document and switch to the CSS file in my project, the web preview
closes. Is this normal?
I've been doing fine with using the "Refresh open browsers" command
and split off commands to shift-refresh firefox and exclusively
refresh Xylescope, but having the instant feedback in the web preview
would be great, especially when combined with the current ability to
pipe through your PHP installation.
Thanks,
Brett
OK -- I'm diving into the GTD2 bundle's way of doing GTD. Cool enough.
The URLs for the GTD Active View List seem broken. At least,
clicking 'em does not bring up the file/line as I would expect.
The URLs produced are of the form:
txmt://open/?url=file://personal&line=7
Clearly, the file path is incorrect.
b.bum
When editing a mail, double quoted blocks have this scope:
text.mail.markdown
text.html.markdown
meta.block-level.markdown
markup.quote.markdown
markup.quote.markdown
Shouldn't it be "markup.quote.double.markdown" or something?
Or is it possible to apply different colors to different quotation
levels like that?
Thanks
--
FredB
Hi all,
[apologies if this appears more than once; been having posting trouble]
guerom00 wrote:
> Hi there,
>
> This a feature request : I would like to be able
> to cancel a “Find in Project”.
> Because while TM searches, it basically freezes
> for any other actions...
>
> TIA :)
More generally, this brings up the question of why the system (not just
TM!) becomes unresponsive, and why the search is so slow (at least for
projects that include whole directory trees).
Yours,
Andrew
Version 1.5.3 (1215).
I have an Xcode project directory, which a TextMate project file
encompasses. The directory contains a "build" subdirectory. It would
be very undesirable to include that directory (and a couple of others,
such as .xclassmodels, also some binaries like a Stuffit archive) in
the TextMate project, as project-wide searches take much, much longer
when (I assume) the search interrogates all the files in the build tree.
So I select the build folder in the project list and press backspace.
TextMate asks if I want a remove-from-project or a delete-file.
Remove, please.
Shortly thereafter (it may be related to deactivating and reselecting
TextMate), the build folder appears in the list again. Grz.
I have double-checked that I am dealing with a TextMate project file,
and not a directory window.
Some of the re-added files and folders have been modified while
TextMate is running; most have not.
I had used a directory window before switching to a project.
I originally populated the project by dragging the Xcode project
directory into the file list.
What am I missing? Or what is TextMate missing? It may be my problem,
as searching for "project file reincludes folders" turns up nothing in
a list-archive search.
— F
Thanks Allan.
The code works perfectly! I've tried to insert a variable inside...
<${1:ul}>
${TM_SELECTED_TEXT/(.+)(?:\n(.+))?/ <li class="${3:odd}">$1<\/li>(?2:
\n <li>$2<\/li>)/g}
</$1>
...and this is the result...
<ul>
<li class="${3:odd}">dfadfadfadfadfad</li>
<li>fadfadfadfdaf</li>
<li class="${3:odd}">afdfadfdafd</li>
</ul>
How can we adjust the class to be the next tab stop with a default? I
also adjusted your code to allow for a clean indentation of the li
elsments.
Thanks for the help. :)
Hello,
Forgive me if this question has been asked, I searched but found
no answer. I am working on a bundle that is a subset of the ruby
bundle and I would like to have some macros similar to the ones in
the ruby bundle, namely the macros that automatically insert the
requires. Looking at the macros in the ruby bundle, they are very
clean:
- moveToBeginningOfDocumentAndModifySelection:
- executeCommandWithOptions:
{
command = "insert_requires.rb yaml";
input = selection;
output = insertAsSnippet;
}
- insertSnippetWithOptions
etc.
Since, there is no real bundle editor, I am trying to replicate this
process for macros under my bundle. If I were to get to the step of
executing the command, I hit the key equivalent for this
insert_requires.rb command, but instead of getting a clean looking
macro recording like the one above, I get one who's command is filled
with the exact ruby source code being executed:
{
beforeRunningCommand = nop;
command = "#!/usr/bin/env ruby\n$: << \"#{ENV
['TM_SUPPORT_PATH']}/lib\"\n\nrequire \"escape\"\nrequire \"open3\"\n
\nCURSOR = [0xFFFC].pack(\"U\").freeze\nline, col = ENV
[\"TM_LINE_NUMBER\"].to_i - 1, ENV[\"TM_LINE_INDEX\"].to_i\n\nstdin,
stdout, stderr = Open3.popen3(\"/usr/bin/env\", \"ruby\", \"#{ENV
['TM_BUNDLE_SUPPORT']}/bin/insert_requires.rb\")\nThread.new do\n
code = STDIN.read.to_a\n code[line][col...col] = CURSOR unless
ENV.has_key?('TM_SELECTED_TEXT')\n stdin.write code.join\n
stdin.close\nend\n\nprint stdout.read.split(CURSOR).join('${0}')\n";
fallbackInput = document;
input = selection;
keyEquivalent = "^#";
name = "Insert Missing Requires";
output = insertAsSnippet;
scope = "source.ruby";
uuid = "9FB64639-F776-499B-BA6F-BB45F86F80FD";
}
Can someone please let me know what I am doing wrong here? Do I have
to hand hack the plist file or what?
Thanks in Advance,
Marshall