Even though I'm #1498 I have to admit I'm quite a bundle newbie. One
of the issues that I recently came across was that the Shoulda Bundle
was not recognizing "context" and "should" blocks within test classes.
This is important, because the symbol navigation is extremely useful
for these.
At first I thought there was maybe a conflict or something else going
on, but when I moved these blocks into the root scope of the file they
worked. I realized that the shoulda language was built on
source.ruby.rails, which meant it wasn't being picked up inside
source.ruby.rails.meta.rails.unit_test or
source.ruby.rails.meta.rails.functional_test.
I solved this problem by adding:
{ include = 'source.ruby.rails.shoulda'; },
to those definitions within the Rails bundle.
However I feel dirty. First, because I'm hacking the Rails bundle to
make another bundle work. This seems like it will make upgrading
complicated since I don't imagine there is any kind of granularity
with language updates. Secondly, it feels wrong for the Rails bundle
to define an include of a language that is descended from the Rails
bundle itself. Apparently TextMate handles this properly because it
works fine, but it was a red flag for me. So I guess my question is
am I doing this wrong? What do the bundle gurus have to say on the
matter?
--
Gabe da Silveira
http://darwinweb.net
The thing that caused the problem was -- "Edit each line in selection."
I was able to edit the file without any problem by just doing a search and
replace. I don't know specifically how edit each line in selection works,
but I suspect that it involves quite a few Allocs, Like one for each line,
possibly quite a few more for each line. I was just putting out a warning
that you shouldn't edit the entire file with "Edit each line in selection".
It could have just been my computer, but I suspect that I was abusing this
wonderful feature into something Allan didn't imagine it to be used to do,
because as an expert in line management he would never have gone down the
path I did. I was just appending ",END_NOTE" to each line.
This happened on a Dual Xeon Core 2 Duo Mac Pro with 1GB of ram ( inherited
from our graphics guy who doesn't want to learn FCP).
In my html files I use root-relative paths such as:
<link rel="stylesheet" href="/css/screen.css" type="text/css" />
The Web Preview does not work even though the path is also relative to
the top level of the project, I have to use paths relative to the
current document.
<link rel="stylesheet" href="css/screen.css" type="text/css" />
Is there some way to get Web Preview to work with root-relative paths
for html development?
-Gianni
Hi. Some questions w.r.t. getting themes to work as I prefer:
Firstly, the manual says [1] that "markup.heading.2.html" can be used
in a language grammar. And then subsequently one may use that as a
selector in a Theme. I have tried to use the mentioned selector in a
theme made entirely from scratch, but whatever color I add for that
selector, nothing happens to the styling of the <h2> tags or anything.
Do I need to update the language grammar for HTML in order to get it to
work or what?
Secondly, Brilliance Black seems to be one of the richest themes
arround, with colors for many languages. It has a HTML section. And
below that it has a "markup" section. The markup selection has e.g.
"markup.heading" and "markup.bold". I assumed that "markup.bold" would
turn <b>text/</b> into bold face. But, no - doesn't happen. I have
misunderstood something?
Thirdly: Ideally, what I would like to see was a theme were the /text/
changed styling, more than the tags/code around the text. But TextMate
appears to only be able to have one color for text, namely that of the
"Foreground" color. Am I right? I hope not. Put on an edge, I would much
rather have a permant color for tags etc, but differing colors for text,
depending of the context. Can TextMate do this? Or may I just forget it
at once?
(I have used TextMate for a 2-3 years, but I only used the installed
themes. And there are many things with it that I have not taken
advantage of.)
[1] http://manual.macromates.com/en/language_grammars
Best regards,
Leif Halvard Silli,
Oslo
Greetings TextMate mailing list.
Forgive me if this is child's play, i searched the list archives
thoroughly before posting.
I am trying (for many hours now) to open a .nib file created in
Interface Builder using the "$DIALOG" command from a shell script. My
general objective is identical to the screencast Allan created in 2006
(http://tinyurl.com/df3m9r).
- Open a .nib file
- Wait for user to close nib or hit a ok button
- pass default parameters to the .nib
- capture user input from the .nib to be used later in the .sh file.
Currently i am trying to accomplish this with:
"$DIALOG" nib --load ~/Desktop/Test2.nib --center --model '{ classPath
= "foo"; }' --parameters '{}'
That usually opens the .nib window, when i close the window all i get
is an integer.
Then it usually stops working all together, no matter how many time i
try and execute the line of code (control - R) nothing happens, i have
tried what Allan suggests in the post "So either press ⌃D to
“close” stdin, or give -p '{}' as argument, and things should work
as expected." And i cant get it to work, if i trash TextMate prefs and
reinstall, it works for a bit more.
I am not yet as familiar with Ruby as i would like to be and i have an
immediate need to implement this within an existing bundle using
shell. The screencast made it look so nice and easy...
Best,
</matthew>
-------------------------------------------
Matthew Richmond, Principal/Designer
The Chopping Block, Inc.
481 Broadway, 3rd Floor, New York, NY 10013
p 212.463.7574
f 917.591.7584
http://choppingblock.comhttp://chopshopstore.com
-------------------------------------------
World Domination Through Graphic Design
-------------------------------------------
Hi,
last time I asked, this wasn't possible and I did not follow the latest
development. So here's my question again:
I have a custom html/php dialect. It contains of regions of code that
is either html markup or php code.
<php>...</php>
and
<htm>...</htm>
Inside a php region, you can use <htm> and inside a markup
region, you can use <php> which leads to recursive a structure
that is very helpful for programming (at least for me) but
harder to colorize, fold or autocomplete correctly.
More complex example (outmost default is html markup):
<html>
<head>
<php>
echo convert($title);
</php>
<style> ..... </style>
</head>
<php> init(); </php>
<body>
Result:
<php>
if($someflag)
<htm>
<table border="0">
<php>
foreach $row ($rows)
{
<htm><tr><td></htm>
echo $row;
<htm></td></tr></htm>
}
</php>
</table>
</htm>
</php>
</body>
</html>
Can I customize Textmate so its html and php modules identify my
regions?
/Andreas Pardeike
Hello,
I'm trying to enhance the Matlab bundle. Especially by trying to make
matlab and texmate to interact (shortcut to launch a script etc...).
And I must say I'm pretty bad with shell scripts and regular
expressions.
I've nevertheless managed to do that, and now I'm trying to recreate
matlab "cell mode" : matlab source files are scripts, and it is
possible to divide the script in "cells". When you are in the (awful)
matlab editor, you can run the current cell just with cmd+enter. This
is very useful. The problem is that the cell separator is just a line
like this :
%% Title of the new cell
...That's it, there is no ending marker for a cell : the current cell
ends where the new one starts ! What I've done now is creating a new
"cell" scope delimited by these lines, but as soon as one "%% ...."
line is used to mark the end of a scope, it can't be used to start the
following one.
Here's my descriptor.
contentName = 'meta.cell.matlab';
begin = '%%.*$\n';
end = '%%.*$\n';
captures = { 0 = { name = 'meta.celltitle.matlab'; }; };
patterns = (
# Here I include all the other scope descriptors, because they can
be contained in a cell !
)
For my solution to work, I then have to use two of these "%% ..."
lines, one to end the previous cell scope, and one to start the new
one. This means matlab files need to be modified to work, which is not
so good !
Do you have an idea on how to solve this problem ?
A linked problem (but less important) is that I can't get code folding
to work with cells : a start marker can't be the same as an end marker.
Thank you !
Hello,
When accessing various bundle features I get (LoadErrors).
This is on 10.3.9 using 1.5.7 (1436). On 10.4.9 same version, no errors.
First question, is this version 10.3.9 functional. I could not find anything in
the notes or on the site.
If this is not a 10.3 issue then these are the errors I have been receiving:
This is the Error I get issue php-help:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1:in
`require': No such file to load -- erb (LoadError) from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1
env: ruby -wKU: No such file or directory
I also the this error when issue html tidy:
env: ruby -wKU: No such file or directory
I get both the above from numerous commands.
I searched the thread, and based upon what I can find, I believe my environment
variables are correct.
One guess is an issue with this could be a result of an older Ruby install:
10.3.9 uses Ruby ver. 1.6.8; 10.4.9 uses 1.8.2.
One post referenced a ruby test:
feed these lines to Terminal do you see this output?
=====
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
-e:1: undefined method `url_encode' for main:Object (NoMethodError)
$ /usr/bin/ruby -r cgi -e 'p CGI.escape("a test")'
"a+test"
my results:
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
/usr/bin/ruby: No such file to load -- erb (LoadError)
But the suggestion confused me.
Suggestions?
Thank You,
dmp
Another example of something to avoid, aka things textMate really wasn't
designed for.
-- Open a large file (mine was > 7000 lines)
-- Select the entire file
-- Edit each line in selection
-- start typing.
This brought the computer to its knees.
My bad. Just thought y'all could have a laugh at my expense.
There are, of course, at least a dozen other ways to do what I started to
do: Filter through command, Command, Search and replace ( $ with
[replacement value]), etc
Tschuss,
Brad Tittle
Tech Support
I'm using git to keep different versions and branches of my projects
in repositories. Unfortunately, Project Plus does not properly
recognize files that git watches as well as the status of files that
it (correctly) recognizes as part of my git repository.
I am using `freely' managed projects, i. e. those you can create via
File > New Project and drag files into. I do not (want to) drag my
whole project folder onto the TextMate icon. If I do that, Project
Plus correctly labels the status of my files (part of repository or
not, modified or not modified). The problem is not just cosmetic, I've
discovered that files which Project Plus does not properly recognize
are not part of commits!
The solution is that you need to move the location of a file (e. g. by
reshuffling or so), then, apparently, Project Plus updates the
properties of all files.
Is this a known problem?
Max