On Jan 24, 2006, at 10:02 AM, Allen wrote:
> Ah okay -- so basically it's the conversion you want help with?
yes.
> I assume it's because you are not familiar with any programming
> language (which I must say, your bundle is pretty impressive if you
> are not -- even if you are, it still is impressive -- do you mind I
> link to the intro screencast in the RSS feed as an example of
> behavioral patterns in TM? I can keep a local cache of the bundle
> if you're concerned about bandwidth).
I'd be glad to host the screencast, if bandwidth becomes a problem,
I'll let you know. And yes, I know exactly zero about programming
languages. The first time I used a regexp was for this bundle.
> I would suggest using htmldoc [1] for the HTML -> PDF conversion.
I'll check it out.
> So what you want is to make a regular expression to match each
> construct in your format, which you already did in the language
> grammar, and then as the replacement string you specify how it
> should be transformed. Here you can use $& to refer to the entire
> match and $1-$n for captures (stuff captured with (…)).
Okay, based on what you posted here before, I added a few things that
were missing and synced these with the language def.
#!/usr/bin/perl -p
s/&/&/g; #ampersands
s/</</g; #reserved for HTML
s/>/&lgt;/g; #reserved for HTML - maybe this is unnecessary?
s/^EXT\..*$/<h2>$&<\/h2>/; #scene heading
s/^INT\..*$/<h2>$&<\/h2>/; #scene heading
s/^I\/E\..*$/<h2>$&<\/h2>/; #scene heading
s/^[A-Z].*\-\s[A-Z].*/<h2>$&<\/h2>/; #arbitrary scene heading ending
with a time
s/^[A-Z].*\-\s*$/<h2>$&<\/h2>/; #arbitrary scene heading NOT ending
with a time
s/^\w.*$/<p>$&<\/p>/; #paragraph
s/\/\/(.*)\/\//<!-- $1 -->/g; #comments
s/\*(.*)\*/<em>$1<\/em>/; #italics
s/^(\t{4})([^\t].*)$/<dl>$1<dt>$2<\/dt>/; #characters
s/^(\t{3})([^\t].*)$/$1<dd class="parenthetical"> $2 <\/dd>/;
#parenthetical
s/^(\t{2})([^\t].*)$/$1<dd>$2<\/dd><\/dl>/; #dialogue
s/^(\t{10})([^\t].*:)$/$1<h3>$2<\/h3>/; #transition (right)
s/^[A-Z].*:\s*/<h4>$&<\/h4>/; # transition (left)
The only one that's not working properly is the last one. It's
baffling to be because it's the same regexp as in the language.
> If you need further help, let me know (as I have no idea what your
> shell/programming skills are).
I have no programming skills other that those I've already
demonstrated. Zip
There are a few steps left in the process that need to be addressed.
Next the HTML marked-up text (as generated by the above script) needs
to be inserted into an actual HTML document with doctype
declarations, CSS etc. And somehow (again, I have no idea how) it
needs to be transfered to a PDF authoring environment (htmldoc or
whatever).
Lastly, thank all of you. It's great to give something to a community
and get so much back.
Hi,
I was trying to find an XML editor for large XML files. I tried to
open a 108 MB (genome data in XML) file in TextMate but it failed.
BBedit opens te file ok. Is there an upper bound to the amount of
data you can edit?
Cheers - francis
PROBLEM:
The feature of all mac apps that I use the most is search.
Specifically find selection & find again. I use that feature to step
through every instance of that selection throughout my code. One
feature that I would love to see is a back button for selections.
Every time you do a search or scroll through your document & select
something, to get back to the last thing you were working on you have
to have set a bookmark & remember which bookmark you were last
looking at, or you have to manually find that place in your code again.
I work on other peoples old janky ASP 'classic' and quickly slapped
together ASP.NET code on a deadline. Anything to help me make quick
work of navigating through the (massive mountain of fetid spaghetti)
code the better.
SOLUTION:
If there was a way for the program to note every time you move the
selection more than 'a little bit' & log that information
sequentially, all you'd have to do to get back to what you were last
looking at would be to hit the back button. bam bam... done, no
thinking.
I know the system is extremely extensible, i'm sure there is some way
for me to 'roll my own' system for doing something similar.
(1) I'd need a command to get the current input location row & column
(2) log that information somewhere
(3) a command to get the last input location from 'wherever' and then
(4) a command to set the input location to 'that location'
??? I think i could figure all this out with applescript and bbedit,
but i'm still rather green when it comes to hard-core UNIX hacking.
Anyone have any suggestions? ??
IDEA: Maybe a quickie version of it would be to undo the last edit,
which would take me back to the last place I was, but then redo my
last action without moving the input location so I don't lost any
work. hmm...
Maybe there's another solution to my problems that i haven't
considered. What does everyone else do?
I have been using TM (1.5 (906)) off and on for a couple of days now
and I noticed this evening that typing had become glacially slow. I
ran the Activity Monitor and noticed that as I type, cocoAspell
(2.0.2) was using about 70% of the processor on a 1.5 GHz PowerBook
G4. I turned off "Check Spelling As You Type" and the problem went
away. I haven't noticed this problem in any other app for which I am
checking spelling as I type. Is this a known issue and/or is there
some way for me to fix it? This is under Mac OS X 10.4.4.
Thank you,
-- Gary
> On 24/01/2006, at 13:34, Allan Odgaard wrote:
>
>> On 24/1/2006, at 5:55, John Johnson wrote:
>>
>>>>> I've managed to hose the binding for my keypad Enter key [...]
>>>> Is this only in TextMate that it's a no-op or system wide? [...]
>>> It is system wide. I'll continue to search the web.
>> My first guess would be that it's the keyboard. You may want to try
>> and clean it and/or try connecting another keyboard (if you have
>> one available).
>
> Curiously, my Enter key doesn't work either. At all. Except it does
> wake the machine up from sleep. But even the keyboard viewer doesn't
> show it being pressed.
Since I've switched to a Mac and started using TextMate I've wanted
to bind the keypad enter key to the TextMate "Next File Tab"
command.
Is this possible with OS/X? The keyboard shortcuts preference
panel doesn't distinguish the "main" return key from the keypad
enter key.
Stu
Hi,
Is there a way to pervent TextMate from using the Option key
to toggle the selection type?
It's conflicting with another key binding I have for the Option
key :(
This is a deal breaker for me and TextMate is the best editor
I have seen on OSX so far.
Thx
Haris wrote:
> Oliver,
>
> The screencast is very nice!
> The main problem for me is that I don't know the first thing about
> what things a screenwriting bundle should be doing. If you ask very
> particular questions about how certain tasks could be accomplished,
> I'm sure you'll find that lots of people will be able to help you.
> But most of us are just not familiar with screenwriting software,
> and screenplay formats in general. I actually looked at your bundle
> the last time you posted, but couldn't really understand what most
> commands are for, since I've never in my life seen a screenplay.
> Seeing the screencast makes some things click.
> So please, set some particular goals for commands/conversion tools,
> and you have a good chance of getting people to help out. For
> instance, what would you want the conversion tool to do? Give us
> some examples of how the result should look.
> You've done a great work so far, and it would be nice to see this
> bundle pushed even further.
>
> Haris
Okay, I guess most people had no idea what I was doing when I posted
my screenwriting bundle because I didn't describe what the bundle
does and how it does it. My mistake.
I've posted a new screencast that goes into much more detail
regarding what I the bundle to be able to do. Grab it here: http://
www.ollieman.net/files/screencast2.mp4
The ultimate goal is to end up with a PDF which contains text that
conforms to the Studio Format. The Studio Format is a industry-
standard layout which all professional screenwriters work in and is
the very purpose of screenwriting software. Fortunately for us, the
format is very strict as it is modeled after what a typewriter is
capable of.
You can find more information on the Studio Format and an example of
it at http://www.ollieman.net/files/bundles/
---
In another screencast, I intro the bundle and what it's designed to
do from a writer's perspective. Grab it here: http://www.ollieman.net/
files/screencast-intro.mp
Hi,
I have some small suggestions to the HTML, CSS and Markdown Bundle.
# HTML
## Refresh Running Browser(s)
Change Scope to `text.html, source.css` so the Browser can be
refreshed when editing the CSS file.
## Minor syntax stuff
php-source = { patterns = (
{ name = 'comment.line.number-sign.ruby';
match = '#.*?(?=\?>)';
},
{ name = 'comment.line.double-slash.ruby';
match = '//.*?(?=\?>)';
},
{ include = 'source.php'; },
);
};
Ruby mixed with php?
# Experimental/CSS
What about those Experimental Bundles? I use the CSS syntax from
there and it would be nicer if it was in the CSS bundle. Because
calling the Gear (Bundle Stuff) menu (Control-Escape) puts you there
and not in the CSS bundle. The experimental CSS syntax has been
around for quite some time and I wonder if it still is work in
progress? It seems to be better than the official CSS Syntax anyway.
# Markdown
## Suggestion: Markdown with [SmartyPants](http://daringfireball.net/
projects/smartypants/)
“Preview”/“Preview in Browser” or “Convert Document/Seletion to HTML”
Pipe it through `Smartypants.pl` (must be added to the repos.) to
have nicer HTML.
There should not be any problems so one could add it to the default
commands instead of creating an additional variant with SmartyPants.
I wonder why John Gruber did not combine them in the first place.
# Conclusion
That's it for now.
Have a nice day,
Soryu.
PS: Why do I not simply make those changes for myself? I did but then
I won't be able to use better bundle items from the repository or
even a new TextMate release because my changed override them. I know
Allan has something on the todo to manage this but it's not short term.