Hi again, to all,
I am writing this to get a couple of evaluation thoughts together, on
the Language Grammar, that I wrote for the TXP Bundle.
It is not solely related to that Bundle only, so you may find this
useful, if you attempt a similar approach for other Languages.
I have spent the last two days inspecting this Grammar in detail and
iterating over the current approach and trying to extract the major
mistakes, so I can refactor the Grammar and make it more accessible to
TM's Automation Features.
In a nutshell, the Grammar is largely inspired and adapted from the
experimental XHTML Bundle, following a modular approach,by referencing
repository Items with include rules.
The difference is, that in the experimental XHTML Bundle, each
repository Item is referenced a in recursive manner, and resolves in one
exclusive repository Item that stands for the html tag for html tags as
exclusive root node.
Textpattern Tags on the other hand do not have this requirement, so each
repository Item gets referenced within an include rule,except for their
attributes and values, which do not have an include rule at the root.
In order to make those non root included items easily accessible a
naming convention was used, so that after reformating the code in the
Bundle Editor appears exactly below the Repository Item, that references
them, where there is one for each Tag.
Example:
author-tag =
{
};
author-tagatts = {
};
The major difficulty is in the distinction of single, container, plugin
and conditional tags, plus to get scopes also for the attribute values.
which currently leads to matching conflicts, therefore, the current
version of the Grammar doesn't have full distinction for attribute
values, mainly on the single plugin tags.
One verification, that I have done about the shortcoming of this
Grammar, is that it is wrong not to have a simple include for quoted
single and double strings, which is now the case.
For instance if I used cntrl shift < and then typed txp:article space
and then get the automatic closing quote insertion, the cursor will be
in between "".
At this point verifying Scope with cntrl shift P, I should have at least
a scope of string.quoted.double or any other dist. available.
If this is not the case,all the additional automation possibilities are
lost since I can not have a snippet insertion conditional.
On the other hand, while including a rule for such a scope left me with
the problem of specificity of such rules, making it again difficult to
have a distinct scope of attribute.value, that would match only a
string, that is in between the quotes, but has another scope then
string.quoted.double
To be continued,
regards, marios
Hello. Can I "save a file with line breaks" i.e. have TextMate save
a text file with hard wrap?
(I did a little googling on this topic w/r/t TextMate and found the
answers fairly confusing.)
Thanks!
--andreas
Is anyone out there in TM land using Wordpress and Ultimate Tag Warrior? If
so, I've managed to combine some of my mods and make the UTW tags accessible
from TextMate. There's a whole bundle involved, and you have to replace
your xmlrpc.php file (after backing it up, of course). It's working really
smoothly on my end. If I type fetchtags and hit tab, it gets the entire
database of tags, sorts it and returns a multi-select menu. When you finish
picking tags it inserts a line in the header with a comma-separated list of
your chosen tags.
It's got the functionality to save and modify new and existing tags.
I also got it working with my AutoTag mod, so that it can read your current
post and suggest tags based on a fuzzy search of your database. I could
easily add the Yahoo suggest if anyone was interested, but I've never liked
the results I get anyway.
My biggest question is this, sorry it took me so long to get around to it...
After I've accepted an entire document as input, chosen tags and have a
string ready to print, what's the most elegant way to make sure that string
gets inserted in the blog post headers rather than at the end of the file?
I've attached a few simple commands I hacked up to practice my ruby.
There may be better ways to do these so any input is welcome.
The first one "Show TODO - ignore list" is pretty basic. On the
first line of the script it takes an array of patterns of files to
ignore while parsing your project. Its should be pretty easy to
enter your list even if you don't know ruby, just follow the
example. Ideally I'd like to make it so you can set the list
externally somehow to make it easy.
I wrote this because the TextMate.each_text_file was parsing
everything in the project folder, regardless if I removed it from the
project or not. I have a "vendored" version of edge rails in one of
my project folders, and seeing a list of all of DHH et al.s comments
was hindering my use of the TODO.
The other two commands go together.
"Project Statistics" displays the total word count, line count, and
bytes on the tool tip for the entire project.
"Project Statistics - Full Output" displays the same information for
each file in the project as well as the totals as html
Both of these commands use each_text_file with an ignore list as
well, so they suffer the same limitations and advantages.
I wrote these cause I had to work on a horrible web system from the
pre-standards days all day today and I wanted to see just how ugly it
was. I found out - they have more javascript for their drop down
menus alone then the entire prototype library contains.
William

p.s. Allan: If I run any of these commands, regular todo or my
versions, on a group of files from a top level directory like /Users/
username my textmate will lock up for a very long time, at least
unless of course I have a lot of ignore flags set. Not too hard to
avoid, certainly less than ideal. Is there a better way to iterate
over project files?
p.p.s Thank you for all your hard work and amazing program.
I had no luck changing the key using the DefaultKeyBinding.dict route :(
On Sep 22, 2006, at 1:26 PM, textmate-request(a)lists.macromates.com
wrote:
> From: Allan Odgaard <throw-away-1(a)macromates.com>
> Date: September 22, 2006 12:59:04 PM EDT
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] re: crtl-esc not activating the bundle menu
> anymore
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> On 22/9/2006, at 18:23, ira cary blanco wrote:
>
>> > > I tried every fixes I read about: Setting the prefs in
>> Terminal (I
>> > > don't remember the exact command)
>> > What happens if you set it to another key than ⌃⎋?
>> How can it be set to another key?
>
> http://lists.macromates.com/pipermail/textmate/2006-April/009955.html
Ira Cary Blanco
Marketing & Media
Samson Technologies Corp.
Samson | Hartke | Zoom
voice: 631.784.2200 x107
fax: 631.784.2201
email: blanco(a)samsontech.com
web: samsontech.com
Is it possible to change Ctrl+S shortcut to Ctrl+R?
I often use bash's Ctrl+R for analogous search mode, so this shortcut
makes more sense to me.
BTW: I coudn't find Cltr+S anywhere in menu. Where is it?
--
regards, porneL
Suppose I have a myFile.html file containing a link
<a href="myFile.html#myAnchor"> Go to anchor! </a>
which points to an anchor in the same file:
<a name="myAnchor"> I knew you would come here! </a>
When I load the file in the TextMate HTML window,
apparently, the link to the anchor does not work (when
I click on it, the HTML page goes blank).
What am I doing wrong?
Thanks,
Piero
I am migrating from emacs to textmate. Emacs has compile command. That
basically allows you to run lets make in the directory of the current
file. Is there a bundle out there already?
OK, I'm a dummy! After searching the lists and manual and help, I
still can't find the way to reformat my .java code in TM. How do I
do that?
Thanks!
-- Owen
Owen Densmore 505-988-3787 http://backspaces.net
Redfish Group: 505-995-0206 http://redfish.comhttp://friam.org/
When I post to my blog from TM, it works fine, but a new line gets inserted
at the top of my post:
2006-09-29 23:56:35.942 open[1013] No such file: /name-of-my-post
And then, of course, it doesn't open up in my browser. I'll also note that I
have been able to post to other blogs properly... so it must be something
with my typo configuration?
Thanks!
Adam