I am sending the patch I have created for the css language definition
to the list for anyone who is interested to check out. I am also
including an example of why I created it. The example saved as
a .css.rb file and can be executed with cmd-R in TextMate to produce
the resulting css file in the same folder.
I have tried every possible way I can think of to do this without
changing the CSS language definition and don't believe it is
possible. If someone can do it, I would love to learn! :)
There is a post from Allan here: http://comox.textdrive.com/pipermail/
textmate/2006-April/009943.html that says this kind of thing may be
supported in 2.1 at the earliest, but for now it is not possible.
Enjoy!
Matthew
The example:
#!/usr/bin/env ruby
require 'erb'
css = <<HERE #css
<% width = 50 %>
#header
{
/* the header is twice as wide as the content */
width: <%= width * 2 %>px;
}
.some_content, .some_other_content
{
width: <%= width %>px;
}
HERE
File.open(__FILE__.sub(/\.rb$/, ''), "w") do |file|
file.puts ERB.new(css, 0, '%<>').result
end
HERE
File.open(__FILE__.sub(/\.rb$/, ''), "w") do |file|
file.puts ERB.new(css, 0, '%<>').result
end
The patch:
7d6
< { include = '#ruby'; },
12d10
< { include = '#ruby'; },
64d61
< { include = '#ruby'; },
69,70c66
< patterns = (
< { include = '#ruby'; },
---
> patterns = (
73c69
< }
---
> },
80d75
< { include = '#ruby'; },
138,148d132
< ruby =
< { name = 'source.ruby.embedded.css';
< begin = '<%+(?!>)=?';
< end = '%>';
< patterns = (
< { name = 'comment.line.number-sign.ruby';
< match = '#.*?(?=%>)';
< },
< { include = 'source.ruby'; },
< );
< };
Hi,
I recently got interested in starting to learn ruby. Since then I
have done a few things. I have installed the newest ruby (1.8.4) to
my /usr/local/bin/ . I also learned about TextMate, so I went and
downloaded it. I played around with it and noticed that i could run
the ruby script within textmate using Run Script. However, when I do
this, i get two errors. One is /bin/bash: line 3: cat: command not
found. This is at the beginning. After it says program exited
normally, it says /bin/bash: line 8: rm: command not found. Also, it
doesn't show any of the script as having run normally (didn't output
anything). Does anyone know whats wrong? Thanks!
I am not a computer programmer, but want to create a language for
mysel;f as part of a bundle. I have made some progress, but there's a
code being used here and I can't figure out what it means.
I am referring to what comes after the word match, i.e.
match = '[_]([^\\_ ]|\\.| .[^\\])*[_]';
match = '^[^\t].*((\.|\-|\?|\:|\;|\,)\s*)';
or
match = '\/\/\s*.*$';
Is there a website somewhere that might help me to decode this?
Thanks.
--
Lawrence Goodman
lawrencegoodman(a)gmail.com
Check out my blog: http://goodmanorama.blogspot.com
Does anyone have a copy of the TM bundle for Liquid mentioned here:
http://blog.leetsoft.com/2006/03/16/liquid-textmate-bundle
The site it links is down and my attempt at a bundle is amateurish at
best :P If you've got a copy, can you send it to me off-list? Much
appreciated!
--
Stephen Caudill
http://exdolo.com/
I have made a small addition to the css language definition that
allows for embedding ruby code in the css. I would like to
contribute this addition to the bundle and am not sure of the
appropriate way to do so. Can anyone fill me in on the best way to
submit bundle updates to the community?
Thanks,
Matthew
Hey all,
i'm in search of a * GOOD * xhtml indenter that's to say indenting
like :
<a href="..."
onclick="..."><img src="..."
alt="..."
title="..."/></a>
and not (* BADLY *) like :
<a href="...">
<img src="..." .../>
</a>
because in that case blank spaces are added ...
if it doesn't exists, is it simple to write a "snippet" (never done) ?
best
Yvon
Is there anyway to recover a file lost when TextMate crashed? I was
submitting a post using the blogging bundle. When it asked for the
name of the post, I tried to scroll up in the document to see my
paragraph. After that, TextMate would not respond at all. I could not
get back to that dialog box or access the document.
Since I had just copied all the text, I thought it was safe to Force
Quit TextMate. After restarting TextMate I was shocked to find my text
was not on the clipboard. Now, I am desparate to recover that file.
I've checked in /Users/JN/Library/Caches/TextMate for any files, but
didn't have any luck. Anyone else have any ideas where TextMate might
store a file that is being edited but is not currently saved?
Maybe I missed this in the release notes, but TM used to reopen all
my working files when I launched it, and now it doesn't.
I'm searching the help and release notes to no avail... has this been
disabled?
Cheers,
--
Josh DiMauro
josh(a)metacarpal.net
http://blog.metacarpal.net
When trying to use the "Fetch Post" command in the Blogging Bundle I
get this error...
/usr/lib/ruby/1.8/xmlrpc/parser.rb:469:in `parseMethodResponse':
Missing return value! (RuntimeError)
from /usr/lib/ruby/1.8/xmlrpc/client.rb:410:in `call2'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:399:in `call'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/metaweblog.rb:31:in `getRecentPosts'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/blogging.rb:541:in `fetch'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/blogging.rb:540:in `popen'
from /Library/Application Support/TextMate/Support/lib/progress.rb:
11:in `call_with_progress'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/blogging.rb:540:in `fetch'
from /tmp/temp_textmate.0T31h8:3
TextMate 1.5.2 (1183)
WordPress 2.0.3
Using the Blogging Bundle that's in SVN as of this morning
burn http://mad@burn.madworld.com/xmlrpc.php?rsd
Any ideas?
Thanks,
Madison
I tried adding the following comment to the blog with no luck:
once again - you are my hero!
I hadnt really been using "wrap selection as link" before today...
One thing that caught me though -- can you grep the selection for
http, and/or edit the snippet to be:
<a href="http://${1:`
# if the clipboard contains a single line, let's use that
export __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100
if [[ $(pbpaste|wc -l) -eq 0 ]]
then pbpaste|sed 's/&/&/g'
else echo http://site.com/
fi
`}">${TM_SELECTED_TEXT:Link text...}</a>
--
dc
-----
David Clark
Web Specialist
Institute for Community Inclusion (http://www.communityinclusion.org/)
david.clark(a)umb.edu
(617) 287-4318