I have just discovered TextMate, and am so far very happy with it,
but I think I just hit a glitch...
I am trying to edit a SQL load file that is about 5M, which shouldn't
be a problem. However, some of the lines are very long, as a complete
website contents is in a single line. I have no idea how many
characters are in this line, but I suspect about 2M worth.
Anyway, TextMate hangs while trying to work with this file. I can't
do much at all. Even a simple act of scrolling hangs. TextEdit does a
reasonably good job with the file though...
Actually, I don't think it is hanging, as it eventually responds
(about 30 seconds later), but it is so slow that it is completely
unusable. Is this a known problem? For me, it is weird files like
this that we need an editor like TextMate to be able to easily handle.
Thanks...
Jim Leask
Hi!
I'm just working on some Tex-Document which uses several dialogues
which I want to enclose in "< "> (the result are those <<
>>-enclosures in the document). Would be cool if that could be added
to the language grammar.
Thanks in advance
Niels
Hey everyone,
Recent TextMate convert here and boy do I love it - trial expiring
within the week, so will be a paying customer from then on. ;)
Have a question, though, with regards to sorting in the Project Drawer.
Is it possible to have entries sorted by type, and only then by
name? I'd like to keep directories together. (At the top,
preferably. ;)
I found the following reference (and its references) in the mailing
list archives:
http://comox.textdrive.com/pipermail/textmate/2004-December/001971.html
This message seems to imply the sorting is hard-coded.
Alexander Deruwe
Hi Allan and friends,
I have a source tree structure like this:
www/
site/
index.tcl, .adp
one.tcl, .adp
edit.tcl, .adp
item/
index.tcl, .adp
one.tcl, .adp
edit.tcl, .adp
The fact that files are named the same, but in different directories:
- Confuses both the Cmd-Opt-Up "Go to Header/Source" feature, which
will gladly find www/item/one.adp when I'm editing www/site/one.tcl. It
would be good if it would prefer the file in the current directory when
one exists. Otherwise, it's a great feature.
- Similarly, when using Cmd-T "Go to file", which I use almost
exclusively to open up new files now, it would be great if I could
write "itemonetcl" to get item/one.tcl, as opposed to site/one.tcl.
Currently, it doesn't take the path into account at all.
I can see some downsides to changing current behavior, too,
particularly with the Go to file feature.
But let me know what you think.
/Lars
As I set up Reformat Comment commands for the languages I use most
frequently (LaTeX and R), it occurred to me that maybe there's a way
to make a single call to rubywrap more generic, so that we don't need
a command per bundle. This is the result:
#!/usr/bin/env ruby
$LOAD_PATH << "#{ENV["TM_SUPPORT_PATH"]}/lib"
require "escape"
scope = ENV["TM_SCOPE"]
case scope
when /comment\.(block|line)\.number-sign\./
cstring = "# "
when /comment\.(block|line)\.percentage\./
cstring = "% "
end
flags = ""
flags += " -p \"#{cstring}\" "
flags += " --retabify" if ENV["TM_SOFT_TABS"] == "NO"
text =`echo -n "#{e_as(STDIN.read).gsub(/[$`]/, '\\\\\0')}" | ruby "#
{ENV["TM_SUPPORT_PATH"]}/bin/rubywrap.rb" #{flags}`
print e_sn(text)
The parameters are the same as the current command, with the
exception of scope, which I set to "comment.line, comment.block".
I also added a gsub to the command because it was eating latex math
and R symbols ($). There's probably a better solution to that. This
seems to work for me, and should be extended easily by adding lines
to the case statement for other languages. One advantage is that by
specifying the comment character based on the scope, it ought to work
for anything; it catches comments for both bash and perl, for
instance, without any extra effort. I think it's kind of cool.
-Alan
(forgive my noobishness, I had to re-join the list after a long period
of inattention, and cannot respond directly to the original message,
from Thomas Aylott)
> Those few of you who care, please let me know what I need to do
> before I can replace the core bundles with these guys.
I was really excited to see activity related to JavaScript in /Review,
and I immediately switched my checkouts to track the JavaScript and
Prototype bundles in Review. The irony of someone who follows the
commit log feed yet had to re-subscribe to the mailing list is
exquisite, I know.
I've been using them for the past few weeks with few (if any)
noticeable problems, using the Prototype bundle as my chosen grammar
for *.js. That is, until today, when I decided to go poking about the
latest Prototype trunk.
The file generated by `rake dist` has _never_ been small, I'll grant,
but I don't recall so much chugging and whinging by my 2.2Ghz MacBook,
or seconds-long gaps of white syntax colorless-ness when switching
tabs (a beachball will occasionally pop up for a few seconds, even).
My wild shot-in-the-dark hypothesis is that it might be related to the
increased number of `include $base` declarations in the "new" grammar.
To reiterate, this only occurs on files like the `rake dist`-generated
prototype.js, which itself is over 4,000 lines of syntactically dense,
idiomatic (and often beautiful) JS.
There seems to be a regression in the regex literal highlighting, as
it no longer works when the RegExp literal notation is used as a
member of an object with any space separating the key's colon
delimiter and the literal itself. The literals are colored fine when
it begins on the very first character of the line, or when immediately
following a parenthesis. Line 275+ of prototype/trunk/src/selector.js
is a perfect example of this regression.
I narrowed down the cause of this anomaly to the 'string.regexp.js'
key of the Embedded grammar, specifically the `begin` regexp:
(?<=[=(:]|^|return)\s*(/)(?![/*+{}?])
The lookbehind seems to be blocking it; when I remove it, the RegExp
literals in the object values highlight as intended. This does cause
any single `/` to color everything after it as a regexp, but adding an
alternate end-of-line anchor ($) to the negative lookahead seemed to
fix that. (?![/*+{}?]|$)
There is also an oddity with the folding markers, which appears to be
related to the block comment syntax. Line 135 of prototype/trunk/src/
ajax.js:
'Accept': 'text/javascript, text/html, application/xml, text/
xml, */*'
Again, inside an object literal, but this time the "*/*" seems to make
the folding parser think "I need to start a new fold here!", when in
fact it is the last member of the object, and should have no folding
marker whatsoever. Take away the second * (thus turning it into a
block comment closing delimiter), and the folding marker disappears. I
was unable to parse the gargantuan folding regexps in the grammar
clearly enough to suggest a solution.
> The Review Prototype bundle is NOT upgraded for the latest version
> of prototype.
I'd be willing to pitch in on this effort, if you (or whomever "owns"
the bundle) would like. I've done a bit of local hacking on various
bundles, and I can certainly provide examples off-list. The Prototype
grammar itself could use a little cleaning up, I'm sure.
Big thanks to all the bundle contributors for continuing to make
TextMate great! (Oh, and Allan, too :D)
~ Daniel Stockman
evocateur.org
When defining "static variables" in Preferences->Advanced->Shell
Variables, is it possible to include the values of static variables in
the values of others?
For example, I tried defining:
P1 /some/path
P2 $P1/subdir
But the value of P2 is "$P1/subdir", not "/some/path/subdir" as I wish.
--
Daryl Spitzer
Hi all,
I've just installed the Git bundle (on Tiger), and I keep getting
those error messages :
Git log =>
/tmp/temp_textmate.U9qQdq:4: command not found: git log _notes.markdown
Gits status =>
sh: line 2: git: command not found /tmp/temp_textmate.j2NZhz:4:
command not found: git ls-files -o --exclude-per-directory=.gitignore
/tmp/temp_textmate.j2NZhz:4: command not found: git ls-files -m
--exclude-per-directory=.gitignore
Note: when I run those commands in the terminal, they work fine.
Alain
I'm having problems with the standard subversion integration in
leopard. When I try to do a log command in textmate I get the
following in the popup window:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rexml/source.rb:226:in `pos': Illegal seek (Errno::ESPIPE) from /
System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rexml/source.rb:226:in `current_line' from /System/Library/Frameworks/
Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parseexception.rb:
44:in `line' from /System/Library/Frameworks/Ruby.framework/Versions/
1.8/usr/lib/ruby/1.8/rexml/parseexception.rb:28:in `to_s' from /
Applications/TextMate.app/Contents/SharedSupport/Support/lib/escape.rb:
30:in `htmlize' from /Applications/TextMate.app/Contents/SharedSupport/
Bundles/Subversion.tmbundle/Support/svn_helper.rb:90:in
`handle_default_exceptions' from /Applications/TextMate.app/Contents/
SharedSupport/Bundles/Subversion.tmbundle/Support/format_log_xml.rb:171
REXML::ParseException
I don't have any custom bundles loaded and I haven't done anything to
the stock leopard ruby installation. Leopard was a scratch install on
this machine too, so there shouldn't be any cruft left laying around
from Tiger.
Any ideas?
Matt