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
Doing a ⌃H document lookup in a Ruby on Rails file won't lead me to
the desired documentation. Instead, the lookup disambiguation menu
loops infinitely.
This is, I assume, a problem with my Ruby installation, but it
particularly bites me in TextMate, and I hope someone here can point
me to a solution. I am running Ruby 1.8.6 (supplied with Leopard),
Rails 1.2.6 (supplied with Leopard), ri 1.0.1 - 20041108, and TextMate
1.5.7 (1455). I am not aware of having installed any additional Ruby
or Rails.
If I type "delete" in a Ruby on Rails document, and press ⌃H to look
it up in the documentation, I find among the many choices
"ActiveRecord::Base::delete". Selecting that does not produce the
documentation window, but shows a second context menu containing:
ActiveRecord::Base::delete 1
ActiveRecord::Base::delete_all 2
ActiveRecord::Base::delete 3
ActiveRecord::Base::delete_all 4
Selecting one of these simply reopens the menu, and I'm stymied. I
can't get my documentation.
"ri delete" on the command line produces a list in which every entry
is duplicated. Refining to ActiveRecord::Base::delete shows
ActiveRecord::Base::delete, ActiveRecord::Base::delete_all,
ActiveRecord::Base::delete, ActiveRecord::Base::delete_all
… and once again, I'm stymied. That's why I conclude it's a Ruby/
Rails installation problem. I'm not experienced enough to trace it.
Can anyone offer/point me to a fix?
— F
Lately, i've been experiencing various issues with the Rails Bundle:
- none of the generator tasks (controllers, models, migrations etc.)
work anymore. I just get an empty confirmation window and the tasks are
not run.
- when running any rake tasks, i get "stack level too deep" errors:.
For insatnce, here's the output from "Migrate to current" command:
RakeMate r6193
rake aborted! stack level too deep (See full trace by running task with
--trace) (in /Library/WebServer/railsapps/sparkle)
Done
Rake tasks and generator tasks work perfectly fine from the command line.
I'm using current Rails Bundle from trunk, but also tried the one that
came with the lastest TM release. I'm running on Leopard, Ruby 1.8.6;
projects are Rails 2.0.2, but it also seems to happen with Rails 1.2
projects.
Any ideas? Thanks.
Sebastian
(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
Hi there,
This may be a bit of a newbish question, but hopefully someone can answer it
for me.
I have quite a few JSP files, but a couple of them contain almost solely CSS
information (with some serverside info sprinkled in).
So, of course, I'd like those couple of files to be highlighted as CSS
files, with the CSS bundle to be active for those files.
However, the issue I am running into is that whenever I select the language
for that file, it sticks for all JSPs.
So what would be the best way to get those few files to be read as CSS, but
keeping their same file names, etc?
Thanks in advance for all of your help,
--
View this message in context: http://www.nabble.com/Changing-language-for-a-specific-file-tp14630274p1463…
Sent from the textmate users mailing list archive at Nabble.com.