Is there a way to automatically have TextMate change to a specified
theme based on the bundle that is selected?
An example is, when I select to make a Screenwriting bundle file, I'd
like it to automatically change to my screenwriting default theme
instead of whatever is currently there.
I've been extremely frustrated trying to figure this out.
Thanks in advance!
I have a SVN project with a few externals. Every time I go to
commit, it automatically includes these external folders in the
window and marks them with and X. What happens, is that if im not
actually commiting inside one of the external directories, the commit
fails.
What I want to do, is that if there is an "X" item, I want it
deselected by default. If you need a screen shot to understand what
I'm talking about, I can give it up.
If someone could either fix it or toss the code my way so I can mess
with it, it would be greatly appreciated.
Eric Coleman
I don't really understand why, but the "Edit in TextMate" command
works for me in Firefox, even though it is not visible from the Edit
menu at all. Or, more specifically, it works in my blog's post
composition window (Wordpress 2).
Does anyone know why?
Dan
It works fine from TextEdit. What might be up? Thanks,
Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Running the Show TODO List command, I get the following error:
/tmp/temp_textmate.jfDKQP:25:in `initialize': No such file or
directory - /Users/markkalderon/Documents/TheHub/Research/
ColorPluralism/Drafts/Trunk/Philosophy.bib (Errno::ENOENT) from /tmp/
temp_textmate.jfDKQP:25:in `open' from /tmp/temp_textmate.jfDKQP:25
from /tmp/temp_textmate.jfDKQP:24:in `each' from /tmp/
temp_textmate.jfDKQP:24 from /tmp/temp_textmate.jfDKQP:23:in `call'
from /Library/Application Support/TextMate/Support/lib/textmate.rb:
63:in `scan_dir' from /Library/Application Support/TextMate/Support/
lib/textmate.rb:56:in `each' from /Library/Application Support/
TextMate/Support/lib/textmate.rb:56:in `scan_dir' ... 10 levels...
from /Library/Application Support/TextMate/Support/lib/textmate.rb:
56:in `each' from /Library/Application Support/TextMate/Support/lib/
textmate.rb:56:in `scan_dir' from /Library/Application Support/
TextMate/Support/lib/textmate.rb:73:in `each_text_file' from /tmp/
temp_textmate.jfDKQP:23
I am using TM 1.5.1 (985) on OS X 10.4.6. Any help would be appreciated.
All the best, Mark
I typically use TextMate for two different things: administrating/
updating websites and LaTeX. For Websites I use UTF8, but for LaTeX I
have to use Latin1 (since this is what my co-workers use).
However, when I load the website project, every time a file is saved,
Latin1 is used instead of UTF8. Is there a way to make that encoding
stick, preferably on a per-file basis (at least on a per-project
basis)? I suspect that this should be very easy to implement (via
metadata) …
Or is there another way to make TextMate respect my choice of encoding?
Thanks a lot.
Max
A newbie question. I'm looking for a way to update bumdles
automatically. I don't know much about subversion, but I got it
working, and could download bundles without a problem. Now I would
like to automatize this workflow. Copying the text onto Terminal
window is a little hassle. I tried saving the terminal window, but
only could save the Window Setting.
--
Teck
Hi,
I committed a complete rewrite of the Mercurial[1] bundle to the
repository.
The Mercurial shortcut is now ctrl + shift + M. I know this key
equivalent is already used in some other bundles, but it's the best
we could find.
I don't know if there are many Mercurial users here, but if you are
one, please give me your feedback.
[1]http://www.selenic.com/mercurial/
--
FredB
Not sure if this fits anywhere in the bundles, but I've added a
BalanceJr-like command to my personal bundle that makes navigating
Ruby, HTML and XML code a lot easier. Check it out if you're
interested: http://blog.inquirylabs.com/2006/05/02/new-feature-
intelligent-jump/
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
I've noticed that the HTML comments are slightly restrictive. If I
have the following code:
<p>
some text, <!--- order now --->
</p>
<div class="msg">
....
it will highlight everything from the start of the comment, to the
end of the page. How do I fix that without going through all the
flies to fix the comments?
Eric Coleman
> I'm observing some strange behaviour with the YAML folding markers:
> the folding stop marker does not appear when there is some whitespace
> on the closing line this despite of the regex matching \s*. It works
> fine if the line is completely empty, however.
I haven't found a way around this. The problem is that if you have
nested folds:
key: "value"
another_key:
yet_another_key: "another_value"
It needs to choose one to fold to. In order for this to work it
matches the indent levels of the start and stop lines.
> I also thought it helpful to add [^#] after the initial ^ in the
> folding start marker regexp so that comments containing words
> followed by colons do not appear as folding markers (as with the
> default database.yml that Rails 1.1.2 generates).
Just added it to the repo now.
___________________
Ben Jackson
Diretor de Desenvolvimento
+55 (21) 2256-1022
ben(a)incomumdesign.com
http://www.incomumdesign.com
I'm observing some strange behaviour with the YAML folding markers:
the folding stop marker does not appear when there is some whitespace
on the closing line this despite of the regex matching \s*. It works
fine if the line is completely empty, however.
I also thought it helpful to add [^#] after the initial ^ in the
folding start marker regexp so that comments containing words
followed by colons do not appear as folding markers (as with the
default database.yml that Rails 1.1.2 generates).
foldingStartMarker = '^[^#]\s*.*:(\s*\[?| &.+)?$';
-- Paul
If one opens a file in TextMate and then renames that file in the
Finder, TextMate does not pick up the change and saving the opened
file will result in the file being saved with its original name.
I only mention this as I am user coming from BBEdit and am used to it
picking up file name changes upon activating the editor window.
I'm not sure which is the best approach but I like the idea of files
not being dependent on their name; the ability to re-open a file
despite its name having been changed is a great thing so perhaps this
should apply to when a file is currently opened?
Thanks in advance,
-- Paul
I often hear in this list how Command-/ comments/uncomments the
selection with the appropriate commenting characters, however,
anytime I use it it _always_ uses C-style comments (/*...*/).
I have an up to date /Library/Application Support/TextMate checked
out from Subversion and I've poked at ~/Library/Application Support/
TextMate and couldn't find anything there that would create this
behavior.
Is there anything I need to do to enable this smart comments. And if
not, how can I debug this?
Thanks,
-Oscar
--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
sorry for so many messages...
>> I don't speak Perl, so I was just talking generally... but each of
>> those \t's is a tab, so maybe remove two?
>Yeah, it works to remove two of the tabs, but since I also don't speak
>Perl I can't tell why it's doing that. And that sort of bothers me,
>that it is clearly marked as inserting two, but it actually inserts
>four.
So it works when there is text to paste in, but when it falls back to
just positioning the cursor, only two tabs are inserted.
Hi list -
"xhtml2article" (in the Markdown bundle) has definitions to transform
xhtml meta-tags/info into LaTeX definitions/tags. Can I define this
meta-information, such as the author, in the Markdown file? If not,
how do I get this meta-info into LaTeX?
Thanks for any hint.
With regards
- Stefan
> I don't speak Perl, so I was just talking generally... but each of
> those \t's is a tab, so maybe remove two?
Yeah, it works to remove two of the tabs, but since I also don't speak
Perl I can't tell why it's doing that. And that sort of bothers me,
that it is clearly marked as inserting two, but it actually inserts
four.
Anyone speak Perl?
> Set the output to "Insert as snippet" and wrap it in ${0:...}? you'll
> need to escape the ... bit of course.
Do you mean this:
#!/usr/bin/perl -w
$m1=$m2='';
$c=1;
while(<>)
{
if(/^\t{4}(.+)[\r\n]+$/)
{
$m1=$m2;
$m2=$1;
}
$c++;
last if($c==$ENV{'TM_LINE_NUMBER'});
}
print "\n\n\t\t\t\t\${0:\$m1}";
...'cause that seems to work but inserts two too many tabs now.
First off, Allan, for build 989 you're my hero.
Second,
> If I understand the problem correct, the script below does that.
> Input set to 'Entire Document', Output to 'Insert as Text'.
> Gerd
Seems like you understand it quite well. I'll test it over the next
few days to see if it holds up. Looks like it will.
One small thing... Ideally, the text that is grabbed and placed via
the script should end up being selected so that it can easily be
over-ridden. Is there an easy fix for the script that will do that?
Thanks a lot guys.
If you try to run an untitled Ruby file, the Ruby bundle saves a temp
file, and then runs that. In Python, we are first required to save the
file somewhere. I find myself saving lots of files in the trash or in
/tmp. What do people think of changing the Python run command to mimic
the Ruby run command? I would just change it myself, but perhaps
someone has a reason to prefer the existing behavior.
-Jacob
Allan recently isolated a bug I found to be in the regular expression
library TextMate uses and we're waiting for a response. While we wait
I was looking to implement the feature that crashed TextMate and I
hoped you all could help me out with some ruby or perl (or whatever)
voodoo.
The bug is explained here: http://ollieman.net/videos/find-bug.mov
The expected behavior is explained here: http://ollieman.net/videos/desired.mp4
It works the rest of the time, it's just when at the beginning of the
document that it crashes.
Thanks in advance for any help.
--oliver
P.S. Are these videos a good way to ask questions? I feel like it's
difficult to articulate without actually showing you.
> 1. When triggered the macro looks backwards from
> the cursor position for lines beginning with four tabs?
Yes. Specifically, four tabs followed by a letter, number or punctuation mark.
> 2. The first such line is skipped and the second such
> line inserted where the cursor is.
Two lines down from where the cursor is, yes.
> What is supposed to happen if there is only one such line
> in the document. (I know it crashes, but what is it suppose
> to do?)
Just insert the cursor in the expected position (two lines down and
four tabs in) with no text.
Hello all,
I'm relatively new to TextMate, only been using it for a few weeks,
and I have decided it quite possibly the best way for me to develop
my games, programs and websites in. Unfortunately it when I
downloaded it did not do any BlitzMax, which is one of the main IDE's
I use. I began to look around and I couldn't find one anywhere.
Anyway I began to develop my own, and I have just today gotten it to
a working stage. There are still limitations in it, which I'm looking
in to on how to correct.
Anyway, here is a link to a post on my blog about it, and where you
can download it. I hope people like it, as it has taken quite a bit
doing and learning of TextMate's bundle system.
Tom
http://www.freepgs.com/bluelaser/blog.php
When a snippet with the same tab trigger/key command is activated you
get a menu item with which one you would like to select.
Unfortunately you can't use [C-n or C-p][1] so you must either use
the mouse or the arrow keys. How about each snippet is assigned a
number which would activate the snippet?
[1]: Please fix this :)
-- Daniel
A new TmCodeBrowser version is available here:
http://www.cocoabits.com/TmCodeBrowser/
This update is recommended to all TmCodeBrowser users. It deals with
ctags occasionally hanging and prevents TextMate to hang also when
this happens.
To install:
- Save all open files in TextMate (just in case)
- Download and open the dmg
- Double-click on the bundle
TextMate will take care of the installation.
Gerd
When I watched the sqleditor screen-cast, I swear I watched him open
a per-project variable list (like the Preferences -> Advanced ->
Shell Variables).
Why don't I see this? and if it's there, how do I open it? I want to
set a bunch of variables per-project instead of globally.
Regards,
Eric Coleman
Greetings everybody,
When you're recording a macro, an ugly logo, which seems to be partly
taken from iPhoto's, appears at the bottom on the right hand corner
of the window. I replaced it with a beautiful red dot and here's the
result :

Of course, it's also pulsating, like the previous one.
If you like it, here's the file that you have to put in TextMate.app/
Contents/Ressources. Hit "Replace" at the message the Finder will
prompt.

Urbanose
POST
User-Agent: Xnntp/beta04 (PPC Mac OS 10.3)
Dear List,
I've recently discovered TextMate and am – so far - quite impressed because it
integrates so well with the environment (vim and emacs don't [yet]) and still
has some useful features and extensibility.
However, I have got two simple questions, to which I don't really find a good
answer on the web (my fault, probably):
– I'm not sure who develops the R bundle; the highlighting is quite okay, the
comments aren't (commenting uses C style by default; this doesn't work). I
copied over the Python or Perl definitions (#) with the right scope marker.
Is such a trivial change this worth asking for a svn account, or where should
such suggestions be directed?
– One feature from Emacs' reftex mode (for LaTeX) I'd like to have in TextMate
would be the recursive scanning for section commands, i.e. seeing all the
sections etc. from the current master document and all (recursively) included
files. Is this possible and I am to stupid to find it (perhaps using the
wrong search terms)? This is an extremely practical thing for longer
documents, because one can go from (the file containing) part I (or a file
included by it) to a chapter in (the file containing) part III (or a file
included by it).
Have a nice Labour Day,
Cheers,
Theorik
I seem to have discovered an infinite loop bug in ctags, which
TextMate depends on.
1. Create a new document
2. Paste in the text "This is a buggy <Java> program"
3. Change file type to Java
4. Save
At this point, TextMate beachballs and I have to force quit. After
that, I find that a ctags process is still running and consuming 100%
of the CPU. Can anyone reproduce this?
Trevor
P.S. TextMate 1.5.1 (948)
Hi all,
I've just watched the insert_html_tag movie, and I cannot reproduce the
"overtype the tag name"
action, where replacing the opening tag - p by div - is mirrored at the
closing tag.
When I do it, the closing tag is not modified.
"tab into the body of the tag" doesn't work either (it just inserts a
tab character, instead of having the cursor jump into the tag body area).
What am I doing wrong?
Alain
Hey all,
This is a bit OT, as I'm pretty sure the problem is not restricted to
the mate binary, but seems to be affecting any shell command that
triggers a GUI event. /usr/bin/open is throwing the same error, as is
growlnotify.
Does anyone have any idea what this might be related to? Thanks,
Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Regarding the recent R discussion, this came across the R users list
today. The author has put together some scripts that interacts with
the console version of R via vim. He's reported that it doesn't yet
work on OS X, but perhaps his code may be useful for working out some
of the problems/goals that people have been raising with TextMate/R.
http://www.uft.uni-bremen.de/chemie/ranke/index.php?page=vim_R_linux
Cheers-
-Alan
Explain this, anyone!
Type "chocolate" then press the keyboard shortcut for "Insert Open/
Close Tag (With Current Word)" ("^-<).
I get
<chocolate />
When I expected to see
<chocolate></chocolate>
eh?
"pudding" gives me
<pudding></pudding> but
"chocolatepudding" gives me
<chocolatepudding />
Is this one of them Easter Eggs? ;)
eo
Hi,
I just tried dragging several selected image files from a Finder
window into an HTML document, and the code it generates is very
incorrect:
<img src="/Users/john/Pictures/P1010012.JPG" width="1024" height="768"
alt="<img src="/Users/john/Pictures/P1010013.JPG" width="1024"
height="768" alt="P1010013" />" />
It looks like it's putting the second image tag into the placeholder
for the alt attribute. Dragging more will continue the problem over
and over.
Is this a known problem?
Thanks!
jt
Hi,
Just for the record, what is the "official" convention for naming
snippets? For example, I have a snippet like this:
array date(${1:\$array}; 0)
set array($1; ${2:date})
What should the associated snipped be named?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
There seems to be a bug in the HTML display window of TextMate.
1. Save the following Java code as test.java (the misspelling of
"String" is intentional):
class test
{
private java.util.LinkedList<Strin> blah;
}
2. Open the file and hit Command-B to build
On my TextMate, I see a line that looks like this:
private java.util.LinkedList<Strin> blah;
It looks like TextMate is properly escaping the greater-than
character but forgot about the less-than character. Is there a way to
fix this on my end, or do I have to wait until the next bug-fix
release of TextMate?
Trevor
I'm thinking about buying TextMate and am curious
about future versions - such as:
1. What's planned? Is there a roadmap somewhere?
2. When?
For me, sftp integration is a big deal. Right now I check out locally and use
rsync to update the server (before you make other recommendations, I've tried
cyberduck, interarchy, I DO use SVN, etc.), and it's borderline tolerable.
Joe
I know this doesn't belong here, but Im looking for some quick
information:
I have the following structure:
branches/
tags/
trunk/
In my repository. Inside trunk is version 1 of our application. I
want to start on 1.1 which is actually a major rewrite of almost
everything.
So I create a 1.1 branch. and remove all files in the branch
Now, when I'm finished with the 1.1 branch, how do I merge it into
trunk? can/do I just remove everything in trunk and merge the branch
stuff down? The entire file structure is changing for version 1.1
Any insight would be appreciated :)
Eric Coleman
I have a follow-up to Aparajita's recent thread about adding
FileMerge support to TextMate. I really like the idea, but as Chris
pointed out, it shouldn't be necessary to clone the Subversion bundle
or add special environment variables to TextMate. That's because
Subversion isn't hard-coded to use diff; it can run any utility you
want, as long as its arguments are diff-compatible. All you need to
do is add a diff-cmd setting to ~/.subversion/config.
The problem, though, is that TextMate is hard-coded for diff. If you
look at the svn_diff.rb file in the Subversion bundle, it forces svn
to run diff instead of the user's diff-cmd. I think the best
solution, then, is to change this file so that it's not hard-coded.
Not only would this add support for FileMerge [1], but it would add
support for any other diff utility, as well.
With that goal in mind, I've modified svn_diff.rb and posted my
changes here:
http://vocaro.com/trevor/files/svn_diff.rb
To try it out, simply replace your existing svn_diff.rb with this
one. You'll then be able to specify a custom diff utility by setting
the diff-cmd variable in ~/.subversion/config [2]. The next time you
run a Subversion diff command, TextMate will automatically run your
preferred diff utility. If you comment out the diff-cmd line (or
delete the config file entirely), TextMate will go back to using the
standard diff utility as before.
The only functional change here is that if you specify a custom diff-
cmd and a file has no changes, you'll see no output when doing a diff
on it, not even a tooltip [3]. The problem here is that with the
regular diff, no output means no changes, but with custom (graphical)
diff utilities, usually nothing is printed to stdout, even when there
are changes. So, the command can't simply look at stdout and know
whether changes were detected or not.
With that caveat, I hope some of you can try this out and let me know
what you think. I'm hoping that with the proper vetting it can be
checked into the repo. After all, it's a pretty low-impact change. No
new bundles, no new commands, just different behavior when specifying
a custom diff-cmd. (If none is specified, TextMate works exactly as
it did before.)
Trevor
[1] Unfortunately, opendiff (FileMerge's command-line launcher) is
not diff compatible. You'll need a wrapper script like this one:
http://vocaro.com/trevor/files/filemerge (It's buggy, though.
Although it works great for diffs against BASE, whenever the network
is involved, such as diffs with HEAD or PREV, it sometimes works,
sometimes doesn't. Can anyone help?)
[2] I've posted an example config file here: http://vocaro.com/trevor/
files/config
[3] When no custom diff-cmd is specified, you'll get a tooltip that
says "No differences found."
Three times a charm, or so they say. Now properly:
I've created a bundle for textmate that allows one to edit data (for instance, html templates) stored inside a MySQL database. More info and a simple screencast can be found at http://vivified.net/journal/sqledit-textmate-bundle
I hope someone finds this useful -- I did.
cheers,
Bastiaan Terhorst
Hello,
Is there anyway for texmate to have the gutter stick to the left side
of the window even when scrolling horizontally? I've seen it
mentioned several times in the wiki and the consensus seemed to be
that it would be added in 1.3, but in 1.5.1 I still can not find it.
Thanks
Mark
I'm interested if anyone else can duplicate this behavior.
It seems like I'm hitting some kind of performance ceiling when typing
in lines with more than 400 characters.
1. type "lorem" then tab.
2. click in the middle of the generated text-block and repeat.
3. repeat this several times.
On my machine (with a completely fresh install of TextMate build985)
my typing slows down to about half-speed.
The key here is that the slowdown only happens when you are typing in
the middle of the text-block; that is to say, in the middle of a very
long line. When typing on a new line, everything seems normal.
Is TextMate ill-equipted to handle lines this long or is my machine
messed up? Anyone else out there see this same thing? Any suggestions?
Is it on the agenda to add support for folders within the bundles, so
we can group commands, snippets, etc.?
I've got about 50 commands in my bundle now and I'm sure they are all
very confusing to anyone that opens up the commands, but if I would
group the commands (arbitrarily) I'm sure people could find things in
the bundle much faster.
Hi,
Is there a keyboard shortcut to close the most recently opened HTML
tag? For example, I typed
<h1>something
then hit some key combo that would automatically insert the </h1>? (I
was just watching the TurboGears video and it looked like he was
auto-closing his tags. It looks like an older version of TextMate.)
I searched the online manual and did a search of this mailing list,
but couldn't find anything.
Thanks!
jt
It looks like the latest update to the Active 4D bundle has claimed
the .html extension. If I open an HTML file that wasn't created in
TextMate, the language gets set to Active4D (HTML). Sure, it's easy to
switch, but how do I change it back so it defaults to HTML?
Thanks!
jt
thanks a lot for this Chris...i will definitely be taking this for a
test drive, as i am using ExpressionEngine for a few of my current
projects...keep us updated with any enhancements/additions you make
to it....