God Day all,
What advice do people have for marking up a language grammar containing
statements with a variable (and potentially lengthy) list of parameters,
which are themselves morphologically complex?
I saw here <http://macromates.com/blog/2005/language-grammars/>, the idea
of using $self to re-parse the detected fragment using the whole language
grammar
{ name = "markup.bold.html";
begin = "<b>"; end = "</b>";
patterns = ( // really means ³contains²
{ include = "$self"; }
);
}
And also the idea of using a repository of named rules to direct the second
level of parsing. Are there bundles that use that and upon which which I
could base my work ?
The statements I want to match are of the form
latentVar BY var var var var...;
This should be parsed into <variable.latent> <keyword.BY> <variable.dv>...
The tricky bit is that each variable has its own syntax and can appear n one
of three forms
name // <variable.name>
name@n // <variable.name><keyword.at> <numeric.value>
name*n // <variable.name><keyword.start> <numeric.value>
So that each variable gets matched like this:
\s+(\w+)(((a)|\*)([-\.\d]+))?\s+
A test case might be
e1 BY item1@1 item2 item3*0.51;
It is obviously pretty redundant and unmaintainable to make a big list like
that in a single rule, and ultimately not possible as the variable list
might exceed the rule's length.
Suggestions gratefully received.
Tim
hi TextMate'rs,
i have the key binding blues. i'm an old vi guy and i still cannot
deal with the mouse when writing. so, i want to be able to use
TextMate *without* using the mouse. moreover, i want to be able to
use all the keys on the *home row* of my query keyboard (e.g., a-s-d-
f-g-h-j-k-l-;).
my question is how do i ensure that my keybindings override
everything? for example, TextMate uses ^h in lots of different
bundles and i have to hand-edit a dozen different bundles to change
^h to something else. (i thought control- functions were reserved for
user stuff?).
right now, i'm using KeyBindings.dict in ~/Library/Application
Support/TextMate, like so:
{
/* vi-like navigation */
"^f" = "pageDown:";
"^b" = "pageUp:";
"^w" = "moveWordRight:";
"^h" = "moveLeft:";
"^j" = "moveDown:";
"^k" = "moveUp:";
"^l" = "moveRight:";
"^e" = "scrollLineDown:";
"^y" = "scrollLineUp:";
}
also, is there anyplace that has the definitive documentation for
what the keybindings are? (TextMate's 'Show Keyboard Shortcuts' isn't
showing my changes). i'm mostly interested in text navigation and
basic word processing functions. i can't believe that i'm nostalgic
for WordPerfect circa 1990 when everything clearly defined via
function keys and you could by a reference card for it :).
neverthelesss, TextMate has more promise than anything i've seen in
years.
finally, are there example key binding configurations for TextMate
that are emacs-like or bash-like or vi-like?
thanks in advance,
-darren
On 8/4/07, at 12:00 PM, textmate-request(a)lists.macromates.com said:
>>> In your case, you have the build dir in the .xconfig file?
>>> Ideally we would extend our code to also look there.
>> OTOH, would that make a good fall back when we can't find the
>> executable even in $PROJECT_DIR/build ?
>
>Probably not ideal [to get the Executable Path via an AppleScript],
>since it would start up Xcode (if not already running), and would
>require Xcode to have the current project loaded. Personally I do
>not have Xcode running most of the time.
Ok. Then would configuration based environmental variables be useful for the Xcode bundle? You tell the XCode project you're building Debug configuration (and/or X target) and TM will use Debug environmental variables instead of Release ones... or environmental variables specific to that target.
(This would also solve my problem in a round-about way: I could specify a TM_BUILD_DIRECTORY_DEBUG and TM_BUILD_DIRECTORY_RELEASE and, since I specified that I'm building Debug, TM would use TM_BUILD_DIRECTORY_DEBUG to find and launch the app)
Later,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
I have a very simple question: where is the setting with which I can choose
the side the project drawer appears on?
I have a collection of project windows I keep open every time I open
TextMate, and the project drawers are all on the left. However, I just
created a new project and the drawer is on the right and I cannot see any
setting in preferences that controls this, nor can I just drag the drawer
where I want it.
I can hide the drawer, move the window all the way over to the right and
then show the drawer and it pops out of the left where I want it. But come
on! There must be a better way?!
Either it's right there in front of me and I'm not seeing it, or it's
unusual interface shortcoming for such a nice product.
Thank you for your help,
Jay
Hi there,
there seems to be a bug/glitch on the Markdown Bundle.
The command to insert a new list item (currently bound to ↩)
wrongly assumes unordered list items always begin with "*"
If I have a list like this:
- foo
- bar<caret>
pressing 'return' produces this:
*- foo
- bar
* <caret>
which is quite not right :)
I've been taking a look at the code for the command, but it's a little
bit over my head :)
Michael, could you please take a look at it?
Thanks in advance...
--
Ale Muñoz
http://sofanaranja.comhttp://bomberstudios.com
I like the project drawer on the left of my working window.
today it's opened on the right and i can't find a way to make it
switch back.
How do I fix the project drawer position?
TIA
Hi,
A few days ago i realized i have a performance problem with LaTeX documents
within TextMate. I've tested it with HTML and some other languages a few
minutes ago. It seems that only LaTeX has some problems.
When i type a letter on my keyboard it takes about half a second until the
letter gets displayed in the document.
I think you could realize how annoying this is especially when you have to
write some very long text.
What is wrong here? Do i have something running...all the time...which costs
so much time to calculate?
Thanks for any help. (or questions...)
Zettt
--
View this message in context: http://www.nabble.com/Performance-problem-with-LaTeX-Documents-tf4199305.ht…
Sent from the textmate users mailing list archive at Nabble.com.
Good Morning,
When executing certain commands Textmate hangs for a few moments,
then simply erases the selected text instead of executing said
command. Two examples would be "Wrap each selected line in open close/
tag" in the HTML bundle, and "Tidy" in the XML bundle. These commands
have worked fine in the past year of using textmate. Recently I had a
hard-drive failure and had to copy all of my preferences from back-up
- this is the only thing I can think of which would have effected
textamate's behavior. Any ideas?
Thanks,
James Fishwick
Charlottesville, VA
Allan Odgaard wrote:
>On 30. Jul 2007, at 17:35, Ryan Wilcox wrote:
>
>>Since the build dir depends on the active configuration, I am not
>>sure setting the environment variable is that useful, also because
>>you’d have to set this per project.
>In your case, you have the build dir in the .xconfig file? Ideally we
>would extend our code to also look there.
Yes, my build dir is stored in the .xcconfig. Parsing those is no easy matter: you can have environmental variables in there, #include other .xcconfigs...
The annoying thing is that the path is in the project's executable setting: writing the following AppleScript shows the proper path
tell application "Xcode"
tell project 1
set a to active executable
a's path
end tell
end tell
BUT the executable I don't think changes when configurations are switched (right?)
OTOH, would that make a good fall back when we can't find the executable even in $PROJECT_DIR/build ?
Hope this helps,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
TextMate [r1405#17788]
I'm not sure if this is an issue specific to the Erlang bundle.
I want to write the following:
-import (lists, [map/2, sum/1]).
I want to write it using snippets as follows and have my cursor appear
after ending dot:
imp<TAB>lists<TAB>map<TAB>2<^,>sum<TAB>1<TAB>
However the result of this is:
-import (lists, [map/2, sum/1 <CURSOR>]).
Basically I expect surrounding snippets to remain in something like a
stack so that their tab stops are honored prior to the tab key being
accepted as a tab character.
Is this supported in TextMate?