Hello,
I've been fooling around a little with trying to create a language
grammar for guitar tablature, and I ran into a problem with matching
something like this:
E 0-------|--------|--------|
B --0-----|0-------|--------|
G ----0---|--0-----|0-------|
D ------0-|----0---|--0-----|
A --------|------0-|----0---|
E --------|--------|------0-|
I should probably know my TERMINOLOGY better in order to do this, but
I'm calling this thing a "block" for now. Every document will have 1
or more of these. I attempted to write a rule that would match one
these things:
{
name = 'block.tablature';
match = '([A-G].+\n){6}';
}
This doesn't seem to match a section like this, but if I use the find
command with that regexp, the "block" is found and selected. What am
I missing?
-- Michael
A couple of days ago I checked in a new CSS bundle command for doing
a preview. You can find this in the macromates.com subversion
repository:
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/
CSS.tmbundle/Commands/Preview.plist
The goal was to generate a preview HTML page from the CSS rules
declared. It's not perfect, but it's a first stab at it. I've seen
similar functionality in TopStyle (for Windows) and a single-item
preview in CSSEdit (for Mac). The command is bound to Ctrl+Option+Cmd
+P. Note that since it is scoped to source.css, hitting this key
within an HTML document with the caret inside a CSS block will also
invoke the CSS Preview. If this happens, it will submit the contents
of the CSS block as the input to the command (using the new 'Scope'
input option). The command also works on a selection; so if you have
a few CSS rules you want to preview, you can select them first.
Feedback as always is appreciated-- there are still some rough edges
(ie, how to handle absolute-positioned rules or floats), but it's
pretty useful to me already.
-Brad
Is it possible to have certain drag commands that react to URLs being
dragged there from a browser or any other way?
I would love to have a drag command for markdown… but I suppose it
would also be very useful for the HTML bundle etc.
Dan
Hi
I know Textmate has folding, but does it have a feature that old-
school folding editors called "enter fold"
i.e. the ability to hide everything *but* the contents of the fold.
Folding mode in emacs has this - I think the emacs term is
"restricting" the buffer.
I live by this feature - with the right keyboard shortcuts you can
fly around the file without ever scrolling.
If textmate has this, I'm probably going to switch, if not, is there
much chance of it making it into 2.0?
Tom.
There was some talk not too long ago about keyboard-only commits in
the Subversion bundle [1]. Chris Thomas said he would set up the
Enter key (not to be confused with the Return key) to act as the
commit button. However, this only works if you have an Apple
keyboard. Some of us (hint, hint) use non-Apple keyboards, and even
the ones that are designed for the Mac (they have a little Apple icon
on the command keys, for instance) may not have an Enter key [2]. Is
there anything that can be done to accommodate us?
Trevor
[1] http://one.textdrive.com/pipermail/textmate/2005-March/003341.html
[2] http://www.amazon.com/gp/product/B00006FRUI/002-4902042-8352038
On May 12, 2006, at 4:00 AM, textmate-request(a)lists.macromates.com
wrote:
> I suggest the following:
>
> #!/usr/bin/env python
> import sys, os
>
> oldtask = os.environ['TM_CURRENT_LINE']
> sys.stdout.write("DONE " + oldtask[4:])
>
> -Jacob
Jacob -
Cool! I haven't done much coding lately and I guess it shows.
Thanks for the help.
Mike
On May 12, 2006, at 2:01 AM, textmate-request(a)lists.macromates.com
wrote:
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] Linefeeds in commands & snippets
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> This is a Python issue. Python writes a newline to the end of all
> print statements, which is where this is coming from. You could write:
>
> print newtask,
>
> which would not write a newline, but would add a space. In order to
> write -just- the text, this would work:
>
> #!/usr/bin/python
> import os,sys
>
> def texter():
> oldtask = os.environ['TM_CURRENT_LINE']
> # oldtask = "Alligator"
> newtask = "DONE "
> for i in range (len(oldtask)):
> if i > 4:
> newtask = newtask + oldtask[i]
> sys.stdout.write(newtask)
>
> texter()
>
>
> Lindsay
Lindsay -
Thanks for the help, I thought it was something I was doing wrong in
TextMate.
Mike
A while ago, I was try to make a command to add height and width information
to turn a selected word " LBC0001A-1.tif " into code like:
<img src="LBC0001A-1.tif" height="800"/>
"sips", a built in command line tool seems to provide the required
facilities, if anyone is interested in making such a command.
sips -g all /Users/tim/Sites/favicon.png
pixelWidth: 16
pixelHeight: 16
typeIdentifier: public.png
format: png
formatOptions: default
dpiWidth: 95.987
dpiHeight: 95.987
samplesPerPixel: 4
bitsPerSample: 8
hasAlpha: yes
space: RGB
Can also resample and rotate images, etc.
tim
1) The age old problem of tabs versus spaces. Is there a way to have
a command run at file open to convert tabs to spaces or vice-versa?
2) Has anyone put out a bundle to allow hooking into the debugger?
3) Any Zope/Plone bundle in progress? I can't seem to find any.
Thanks.