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
Thanks, Allan, for both the replies.
> I?d argue that ?name? is meta data for the ?content? with the agreed
> upon convention that it uses a format like ??title?[.?type?]? ? a
> resource fork is just another piece of content meta data which is very
> fragile since it won?t survive a lot of the mechanisms used to
> transfer content (unlike the name), so there is little reason trying
> to split up the name into ?title? and ?type? and then store the ?type?
> in a new meta data field.
I agree completely about the resource fork. I'm afraid my comment was
confusing and it seemed like I longed for the days of resource forks
getting lost when you transferred files across platforms. (I'd be just
as happy to be rid of the extension.)
And I filed my first bug report with Apple.
> Make a column selection of the desired width (and with desired indent)
> then hit ?Q and TM will reflow the paragraph to be ?in a box?.
Doh! I knew that and had forgotten it. I feel like such a punk now.
(I'd still like to automate the process, but I want to try to do it
myself.)
Hello, how in TM when I have a few windows open can I get them into a
unified window with tabs? These are usually remote files opened over
ssh in Interarchy.
--
Scott * If you contact me off list replace talklists@ with scott@ *
I am starting to use cmd-Shift-R a lot more to run code through TM in
it's window. Very nice. For quick one off shell scripts I am finding
it invaluable.
I have a few issues. There are more times for me where I am working
in php and I want the output to be html'ized. I see a raw <br /> over
a rendered one. I end up putting in a lot of \n's and such to get
somewhat readable.
Is there any way to toggle the mode on how it deals with this?
Second is control-H, which I use a lot to get to docs in php, this is
suer handy, and I bet it uses webkit to do it's secret little deed.
However, One function may lead me to another, as there are links in
the window. But there is no back button. Is there any way to get
more standard browser buttons in this window? Or heck, I would be
happy to have it just use Safari.
The TM pop up seems to always be set to sort of work like
target="_blank" and spawn a new window, which clutters me up some, and
I end up with 20 windows hiding around. I would like control-h to
replace windows.
Thanks
--
Scott * If you contact me off list replace talklists@ with scott@ *
As the subject line begins: git from the Bundle menu works (as does
working from the CLI), but CTRL+SHIFT+G... gives me the following tool
tip pop-up:
/tmp/temp_testmate.AQcVtg:26:in `open': No such file or directory -
pages (Errno::ENOENT)
from /tmp/temp_testmate.AQcVtg:26:in `entries'
from /tmp/temp_testmate.AQcVtg:26
"AQcVtg" above is variable. Everything else remains the same.
The short version of my question is: what's wrong and how do I fix it?
TM has made me a lazy man, reliant upon keyboard shortcuts. Please
save me from using the pull-down menu.
john
#!/usr/bin/ruby -w
require "#{ENV['TM_SUPPORT_PATH']}/lib/setuplibs"
require 'svn_diff_directory'
require 'shellwords'
#require 'exit_codes'
def get_dirs()
dirs = []
if ENV['TM_SELECTED_FILES']
dirs = Shellwords.shellwords(ENV['TM_SELECTED_FILES']).delete_if
{ |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty? and ENV['TM_PROJECT_DIRECTORY']
dirs = [ENV['TM_PROJECT_DIRECTORY']].delete_if { |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty?
TextMate.exit_show_tool_tip "Neither the selected directories nor
the Project directory are versioned"
end
dirs
end
STDOUT.sync = true
dirs = get_dirs()
dirs.each() { |d|
Dir.chdir(d)
svn = ENV['TM_SVN']? ENV['TM_SVN']:'svn'
puts `#{svn} diff -r 1 .`
}
This script is supposed to generate a full svn diff for the currently
selected directory.
However, it generates no output.
I've set input to none, and output to new document
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
tommy.nordgren(a)comhem.se
Hello all. I'm trying to figure out a way to write a command that will
take a selected block of soft-wrapped text, hard-wrap it to a given
length, and then indent a given number of spaces. I do a lot of
writing using Markdown, and I would like to find a way to make
bulleted lists more clearly marked as such while in plain text mode.
None of the current options under the TEXT menu do what I want. I
don't need the command to ask for the wrap length or the spaces to be
indented, I'm happy to adjust that within the command itself -- once I
get what I want, I won't fool with it for months if not years.
If someone could even point me in the right direction, I'd be happy to
try to hack at something on my own, but I honestly don't know where to
start.
john
--
John Laudun
laudun(a)louisiana.edu
http://johnlaudun.org/
Twitter/Facebook/Flickr: johnlaudun
Sometimes I would like to make a substitution/search or whatever only on a
part of the file, but textmate doens't bother too much if I select
something, neither there are options to do it.
I'm sure there is a way to do it, any help?
--
View this message in context: http://www.nabble.com/Substitute-only-here%21-tp22914227p22914227.html
Sent from the textmate users mailing list archive at Nabble.com.
In Bill's defense, I have long had this problem with the Finder. If I
create a file in Textmate but assign it no extension, a blank document
icon is assigned the file and the default application -- no matter how
hard you try to change it through the Finder -- to open the file is
always TextEdit.
As many people have pointed out, this is indeed a Finder problem, but
it makes it no less frustrating for users who do not wish to have
extensions on text files. (In the old days, wasn't that what the
resource fork was for? And wasn't the promise of the modern OSes to
dispense with the file extension system?)
john
Greetings to everyone,
How is it possible to compile a small program via short-cut. Until now
I've used apple-cmd+R (RUN/Compile via xCode) in my .m files
(objective-c). Via command usually I do something like this:
Angel:Fraction atma$ ls
Fraction.h Fraction.m main.m
Angel:Fraction atma$ gcc Fraction.m main.m -o Fraction -l objc
Angel:Fraction atma$ ./Fraction
5 / 10 = 0.5
0 / 0 = 0
Angel:Fraction atma$
Best regards & thanks in advance
Panagiotis (atma) Atmatzidis
email: atma(a)convalesco.org
URL: http://www.convalesco.org
--
The wise man said: "Never argue with an idiot. They bring you down to
their level and beat you with experience."
Guys,
Which screen recording software do you usually use to record TextMate
screen casts?
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
I'm glad to see I'm not the only one trying to do this and
encountering this issue.
Unfortunately, your solution didn't work for me. I was able to install
the older port okay, and `port installed` shows that I have in fact
installed screen 4.0.3_1, and `which screen` shows that I'm running
the binary that I expect to be running, but still I get "mate: failed
to establish connection with TextMate."
Any ideas?
Thanks in advance,
Brian
Hi,
when I want open a file from within TM I mostly want to open a file in
the vicinity of the current file.
So is there a way to have the open file dialog open with the directory
of the current file displayed.
adi
Well I rewrote my little script in Ruby and have had mostly success,
but I need some help escaping things properly. Here's what I'm having
trouble with:
#!/usr/bin/env ruby
arg = STDIN.read
arg.chomp!
arg.gsub!('\\', '\\\')
arg.gsub!("\'", '\\\'')
arg.gsub!("\"","\\\"")
arg.gsub!('\`', '\\\`')
system("pointfree \""+arg+"\"")
This is intended to enclose text selected in TextMate in quotation
marks, and then escape all of the following characters within the the
quotes, and then use that as the argument to pointfree. What's wrong
with how I'm doing it?
Sorry for all of the questions,
Ian
I've just started using Textmate and know very little about it, I was
wondering why the svn-commit.tmp, Regular Expression (Oniguruma), Regular
Expression (Python), Release Notes and Strings File are in the languages
list since they seem to do nothing.
They appeared after installing the Subversion bundle along with a few other
languages.
Thank you for your help.
http://www.nabble.com/file/p22995446/Cropped.png
--
View this message in context: http://www.nabble.com/Unknown-items-in-the-languages-list-tp22995446p229954…
Sent from the textmate users mailing list archive at Nabble.com.
I get the following error running a ruby program in Textmate, but it works
fine running it from the command line. The program creates a lot of strings,
and slightly reducing this just slightly makes the error go away.
I get this in Textmate
...
2 DATE 11 Jan 2001
at top level in 3 TIME 15 at line 56
1 RIN 13
but this on the command line (which is correct)
...
2 DATE 11 Jan 2001
3 TIME 15:56:49
1 RIN 13
Oddly, if I "puts s.reverse" in textmate, I get the right output too
(reversed of course:). I also don't get the error if I print to a file,
rather than printing to the Textmate output window (and I'm only printing
out a very short segment of text from the program).
s = f.to_gedcom
puts s #output window copy gives the error (before
File.open).
File.open('/tmp/xx.txt','w') { |fd| fd.print s } #file
copy is correct
puts s #output window copy gives the error (and also
after File.open)
So is there a heap or stack size issue running ruby from textmate? Any other
guesses at what is happening? It does it under Ruby 1.8.6 and Ruby 1.9.1.
--
View this message in context: http://www.nabble.com/Is-there-a-limited-heap-or-stack-for-running-ruby-in-…
Sent from the textmate users mailing list archive at Nabble.com.