G;day all,
I'm an infrequent TM user, as I spend 90% of my time in FileMaker
Pro, but do some occasional work in XSLT. I was wondering if someone
could help with an issue with indenting in XML. I've got some code
that looks like the following as output in XML :
<Style>
<Data>Some text Here.</Data>
</Style>
<Style>
<Data>Some text Here.
Some more text here.</Data>
</Style>
This has been indented using the "Indent Selection" option.
Obviously I'd like it to work the same on the second set of text as
it does on the first. I'm told you can change this via the bundle,
but grep and regex are like greek to me. Is this something I can
modify, or this maybe intended behaviour?
Thanks,
Nick
Apologies for using bandwidth on the main mailing list, but my attempt to
contact textmate-owner(a)lists.macromates.com bounced with a "not allowed
to post" message, though I am subscribed to the list. The message I sent to
the owner follows:
Hi,
Is there any way to get a *daily* digest from the textmate-request
list? I am receiving several e-mails each day, all relatively small sized,
instead of a single digest per day. Each of these is labelled
"textmate Digest"
and carries a few messages, rarely more than five to seven. I understand,
when the digest reaches a reasonably large size having it split up, but today,
so far (and the day is only half over here), I have received digests at
0:19+0000 16K textmate Digest, Vol 31, Issue 14
3:14+0000 20K textmate Digest, Vol 31, Issue 15
6:41+0000 17K textmate Digest, Vol 31, Issue 16
12:00+0000 9K textmate Digest, Vol 31, Issue 17
15:53+0000 15K textmate Digest, Vol 31, Issue 18
That's a total of 77K in five separate messages; looking back over time, it
seems as if no digest is ever allowed to grow much over 20K (the largest
since I subscribed is 30K and there is only one of those; most are 20K or
below). That seems way too low for a *digest*. The digests from the gcc
list, for example, are regularly in the 50-80K range, and are much more
useful in keeping related topics together than the textmate list is. Thanks
in advance for your response.
--
Vic
Hi there,
There's any quick and dirty hack that allows me to use multiline TODO
tags? I checked the code but it is Ruby -and I don't want to learn it
right now to just hack it. But maybe writing a perl similar would be
nice :-)
Thank you.
--
Igor Sutton
igor.sutton(a)gmail.com
Hello,
I'm trying to use dialog.rb to open custom made dialogs (Nibs) in Ruby
but so far have not succeeded.
Reading the code, it looks like this should work:
Dialog.new(:nib => "path/to/nib")
but I get an error.
I'm using shell code now, but would love to use the nicer Ruby syntax ;)
Any advice?
Thanks in advance
--
Ale Muñoz
http://sofanaranja.comhttp://bomberstudios.com
Here's another snapshot, for those who are interested.
I've made it into its own bundle for the moment, for ease of installation.
This version should have more robust error handling, and does its best to
work
with the 3.6.x versions of GV. (Unfortunately they're all pretty buggy — the
best
version is still 3.5.8 — but it does its best.)
Many thanks to Zettt, who went out of his way yesterday to help me identify
the problems he was having.
PDF support will come in a later version, which I'll probably call 2.0. (You
might
like to mentally prepend "0." to all these version numbers. This is clearly
still
alpha code.)
Robin
Here's a script I hacked together last night.
If you're writing something with lots of complicated diagrams (like my
thesis, to pick an example at random) then you often have to go through
several compile-view-edit cycles before any particular diagram looks right.
This involves a lot of tedious waiting. The obvious way to speed it up is to
try and reduce the time between making an edit and seeing the results.
Hence this script. The idea is that you can 'watch' a LaTeX document, so
that whenever you save a change the display is updated as quickly as
possible to reflect the change.
The script is currently somewhat inflexible in its assumptions. It compiles
.tex -> .dvi -> ps, and uses gv as the PostScript viewer. If other people
are interested, I can certainly make it more configurable. That's why I'm
posting it here.
The reason for the aparently-perverse choice of gv as the viewer is that
ps2pdf is really, really slow, so if you want a fast cycle – and you're
using PostScript specials – you need to view the DVI or PS directly. I don't
know a DVI previewer that works with the PostScript specials I use, so that
leaves PS. I don't know of anything else for the mac that can display PS as
quickly as gv (I'd love to be enlightened here), and gv is very pleasant to
use once you get used to its idiosyncratic interface.
Anyway, that means you'll need to have X11.app and gv installed for it to
work. As I say, this can potentially be changed, but that's the current
situation. You also need to have gv in your $PATH.
Apart from avoiding PS->PDF conversion, the main trick I use to speed up the
update cycle is to build a custom TeX format file for the document. The
preamble – i.e. anything before \begin{document} – is compiled into a
special format when the file is watched. Thereafter, when the file is
updated, the preamble is merely inspected to see whether it has changed. If
it hasn't, the previously-generated format is used. Assuming you don't
change the preamble very often, this is a big win if you load a lot of large
packages. It halves the compile time of the document I'm currently working
on.
Attached are two files:
Watch document.tmcommand
A TextMate command that invokes the watcher. Copy this into your favourite
bundle. (If you try to watch a file that's already being watched, you're
given the option to stop watching it. Alternatively you can just close gv,
and it will stop watching. Note that quitting TextMate will *not* stop the
watcher.)
latex_watch.pl
A Perl script that does the real work. This should be placed in the
directory Support/bin inside the same bundle that you copied the command
into. (You probably need to create that directory.)
If something doesn't work, you _should_ get a nice error dialog telling you
what went wrong.
I'd really appreciate any feedback. I think that, with some more
flexibility, something like this could be useful to a lot of people.
Robin
I have an NFS share from my linux server and mount this on my Mac.
This NFS share is an svn working copy and its repo is local to the
same server. So the svn url is file:///path_to_repo/trunk.
If I try to use the subversion bundle in TextMate, it tries to use
direct file access to the repo instead of svn+ssh access. Is there a
way I can let TextMate know to use svn+ssh for this working copy?
thanks, ke han
Hi there
Am loving GTDAlt - I've tried 'em all and this is the one for me it seems.
I notice that in the latest build of TM, that when I attempt to set a
date for an action, an error is generated:
/tmp/temp_textmate.Ie4gRD:3:in `require': No such file to load --
/Library/Application Support/TextMate/Support/lib/plist (LoadError)
from /tmp/temp_textmate.Ie4gRD:3
Any clues on this would be appreciated.
Richard Sandilands
Recently, every time I launch Textmate, my system plays an alert
sound. I checked the console log and it's displaying this:
2007-03-29 18:51:50.872 TextMate[284] error reading file
/Library/Application Support/TextMate/Themes/Mac Classic.tmTheme
2007-03-29 18:51:50.980 TextMate[284] loadPlugIn: Dialog plug-in with
same bundle identifier (com.macromates.dialog_plug-in) already loaded
What do I need to do to fix this?
Thanks!
Does anyone use http://www.stclairsoft.com/DefaultFolderX/? It doesn't work
in TextMate's open dialog, but seems to work in every other. That's very...
very... very sad, and very, very painful. Anyone know why that might be? Any
idea how I might get it to work? The only thing I notice is that TextMate
has a 'Show hidden files' option; so wonder if its using a custom dialog
instead of the standard one.
Thanks in advance.
-S
I am unable to use the File/New from Template/Python/* menu item, or to
create a new file in an open project, by any of the available means
(application File menu, control-click in project drawer, use gear icon
menu). I gather, from following several different Google searches, that my
problem(s) has/have something to do with the search path that Textmate is
using to look for the template files, but I can find no information
regarding what I have to change or how I have to change it to make the
correct path(s) available to TM.
I know that the Python.tmbundle file lives in "/Library/Application
Support/TextMate/Bundles/", but when I add that directory to my PATH in
~/.bash_profile, that doesn't change anything.
I would be really, really grateful for a simple "do it this way" solution to
my problem.
Thanks.
Richard
Hi everyone,
I'm using a regular expression to find groups of text that I need to
replace. But instead of replacing the actual text that I have
selected, I want to simply append some text to the end of the line
that has been returned. For example, if I search in the project,
retrieving ten different lines of code, how to do I insert a specific
string of text (e.g. "Put this text at the end of the line") at the
end of each of those lines?
Is there a way to do this?
Thanks in advance!
Everyone/Anyone,
I'm new to Textmate (and just about everything else), and I just
finished reading the Textmate book (some sections got a thorough once-
twice-thrice-over). Very good book, now I'm hooked on Textmate.
I'm just an amateur web developer looking to increase my skill and
knowledge. Textmate has been a great companion as It allows me to get
out of Dreamweaver and into the code, but I find that I have lost
some of the "project management" features of Dreamweaver. ie, being
able to transparently upload completed development files from within
the application. (Sure I can still get it done with Transmit, but it
is clunky.) I searched the textmate discussions and wiki and came
away with the conclusion that SVN is the answer. Problem is I know
nothing about SVN... or where to start.
So, my question is... "What is SVN, can I really use it to manage a
production website, and what is the best place, resource, book to get
information on how to install, configure, and use it?" Sounds dumb
right. Well we all have to start somewhere.
(I googled it and found more information than I can shake-a-stick
at. So I thought that I would ask a smaller community that may
better understand my situation and give a little more intelligent mac-
oriented feedback.)
Thanks,
Ethan
So, my copy of JEG2's TextMate book has arrived down under, and I'm
really enjoying getting a better understanding of TextMate.
Being an avid AppleScripter, this was my first attempt at a bundle
command--to look up a selection in a FileMaker database:
osascript <<-ENDSCRIPT
set title to "${TM_SELECTED_TEXT}"
if title ≠ "" then
tell application "FileMaker Pro Advanced"
if not (exists window "HachetteTitles") then open alias
"Path:To:My:Database.fp7"
set cell "_Search" of layout "Titles" to title
do script "Search For Title"
set href to cell "_Search" of layout "Titles"
set img to cell "_thumb" of layout "Titles"
end tell
if href ≠ "" then set title to img & href
end if
return title
ENDSCRIPT
I know this script method works fine outside of TextMate, but no
matter what I do I get errors running it inside TextMate:
31:32: syntax error: Expected “then”, etc. but found unknown token.
(-2741)
I'd certainly appreciate any help diagnosing this one.
--
Tim Mansour <tim(a)neologica.com.au>
Is there any way to copy source out of TextMate such that the
formatting stays intact?
I.e. I want to be able to paste code into Pages, preserving font,
format and color.
b.bum
Hi everybody,
I have been using Textmate together with PDFView on my powerbook w/
out any problems.
Recently I moved my account to Mac OS X Server. And it won't work
till then.
On the local machine I installed Latex/Textmate/PDFView.
A test with Texshop worked w/out any problems. But when I cmd-R in
Textmate no
preview is shown (the pdf is typesetted correctly, though).
TM_LATEX_VIEWER is set to PDFView, but nothing happens.
What do I need to do?
Thanks
Chris
–––––––––––––––––––––
Christoph Biela
biela(a)glr.tu-darmstadt.de
–––––––––––––––––––––
Looks like I answered my own question here. It seems that tidy
requires ALL PHP start tags to be <?php and not just a <?. Hummm,
bummer, but that's ok, I think I can live with that. Thanks and sorry
for the bother.
Ron
====================
Newbie here, please excuse the apparent non-TextMate related
question. Has anyone seen a bundle or suggestions on using tidy (or
something) to convert old style HTML to newer transitional XHTML
without screwing up embedded PHP (or other) code? It seems that by
default tidy can really fowl up embedded PHP structures. I have a lot
of old PHP-based documents that I'd like to get somewhat brought up-
to-date.
Thanks,
Ron
*******************************************************
* Ron Patterson, Email: rpatter(a)asd20.org *
* Web Services, Phone: 719.234.1707 *
* Academy School District 20, FAX: 719.234.1706 *
* Web Site: http://www.asd20.org *
*******************************************************
If I write (a perfectly valid HTML4):
<div id=foo>
TextMate highlights everything up to next quoted string as an ID
attribute. The fix for it is to set:
end = '(?<=''|")|(?!>)';
for tag-id-attribute in HTML's language definition.
There's even no scope for non-quoted attributes. I've managed to add it
using back-assertions (?<=[^=]) for attribute and (?<==) for scope of
uquoted string.
I'm not sure if these are proper solutions - does TM understand something
like 'adjacent scopes'?
--
regards, porneL
I'm new to TextMate, but after reading James Gray's book, I'm eager to
become a "power user"...
I installed the Perforce bundle (using the GetBundle bundle) and just
tried it for the first time. I selected Perforce->Diff With Base with
a file open that I've already ran `p4 edit` on in the command-line,
and I get:
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to perforce failed.
perforce: host unknown.
I double-checked that $P4PORT is set properly, and I can run Perforce
fine from Terminal (and from BBEdit). Do I need to do something else
to setup the bundle? (Is there a way to find documentation for
bundles that I haven't found yet?)
I also noticed that all the key equivalents in the Perforce bundle are
"^$". Is this a sign of some kind of problem?
--
Daryl
Hello. I'm sure the people that set this up have a better
understanding of things than I do, but I'm curious…
Why are all the functions listed in the "Completions" preferences and
listed in the functions.txt file that's used by the "Completions for
Word" command?
Couldn't the Completions preferences be changed to something like this:
{ completionCommand = 'cut -d % -f 1 "$TM_BUNDLE_SUPPORT"/
functions.txt | grep -i "^$TM_CURRENT_WORD"'; }
So the list of functions would only need to be maintained in one place?
FWIW, I tried the above, and `"$TM_BUNDLE_SUPPORT"/functions.txt`
doesn't seem to be pointing the file. I got it to work by giving the
explicit complete path to the file, but that's obviously not what we
want stored in the preferences by default. Could it be that
TM_CURRENT_WORD is defined in the Preferences context, but
TM_BUNDLE_SUPPORT is not?
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
>> Hi. I have the following TM snippet (scope = source.php, tab
>> trigger = eoq):
>>
>> <<<EOQ
>> ${0}
>> EOQ;
>>
>> My snippet works fine, except: the trailing EOQ needs to always be
>> placed at the beginning of a line. Currently, the trailing EOQ
>> winds up at the same indent position as the beginning "<<EOQ".
>>
>> Does someone know of a way to move the caret to the beginning of a
>> line within a snippet? [...]
>>
>
> You can have it inserted without the snippet being indented to the
> current level, the following trick works for tmSnippet files as
> well: http://lists.macromates.com/pipermail/textmate/2007-March/
> 018523.html
Thanks for the quick reply, Allan (and sorry for my replying
previously without a subject; I am new to the list and this was my
first posting).
I tried it, but I must not be putting the disableOutputAutoIndent key
in the correct place (I tried several). Below is the contents of my
snippet's plist file. Where would I place the
disableOutputAutoIndent key code below?
<key>disableOutputAutoIndent</key>
<true/>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string><<<EOQ
${0}
EOQ;
</string>
<key>name</key>
<string>EOQ (eoq)</string>
<key>scope</key>
<string>source.php</string>
<key>tabTrigger</key>
<string>eoq</string>
<key>uuid</key>
<string>12260674-90D0-426D-84F4-C4F314216C06</string>
</dict>
</plist>
Hi,
would it be possible to set a selection in the current document by
using a tmCommand?
Example:
('|' is indicating the caret position)
-This is a te|xt line.
I invoke a tmCommand which calculates the starting point of a
selection, and it sets the selection to e.g.
('[' and ']' indicate the selection)
-This [is a te]xt line.
Thanks!
Best,
Hans