> his indeed works but I do think I need to be a bit more specific.
> Lets look again at the line:
>
> ATOM 14 CA GLN A 2 -27.648 -9.581 30.325 1.00 10.00
>
> My goal is to have both the 'ATOM' string and the 'GLN' string colored
> differently.
>
> Using ^(ATOM|HETATM)\b I can color the ATOM part.
> Using \bGLN\b I can color the GLN part.
>
> The problem is that I only want the GLN part to be colored if the line
> starts with ATOM. In your reply the complete part starting with ATOM
> up to GLN gets colored.
>
> Marc
Dear all,
Thanks for all comments and tips on my "Conditional regex" question.
Nevertheless I'm still a bit of a novice when it deals with regular
expressions.
Although I can see the logic in many of your tips I'm still unable to
put the
bits and pieced together into a functional expression.
Would anyone of you be so kind to provide me with a more elaborate
answer/example?
Thanks,
Marc
>> I believe this is the correct firstLineMatch for AS3:
>> package\s?([\w\.]*)\s?{
>
> You need to add a ^ assertion to the beginning of that at least. And
> you need to make sure it can't get triggered in D, Doxygen, Groovy,
> Java, JavaScript, Processing, Scala. (The languages I quickly scanned
> to see have a package keyword that could get tripped up)
I did some quick research:
- The Java-based languages use a semi-colon, rather than a brace.
- D uses 'module' to define its packages.
- Before I added the firstLineMatch, my files were coming up as
plain-text. If there's a language this pattern conflicts with,
TextMate doesn't know about it out-of-the-box.
Here's a slightly-modified version that caps the ends of the string.
It also makes the { optional (in case someone puts his braces on the
next line):
^package\s?([\w\.]*)\s?{?$
> I used \bAS3\b because comments are as likely to be found on the
> first line as package declarations. So, for anyone who wanted to,
> adding 'AS3' would help TM identify ActionScript 3 over ActionScript
> files.
>
> I've also taken the liberty of adding 'AS3' into the comment header
> for the same reason.
I'd venture a guess that package ... { is the handily the most common
first line of an AS class; however, why don't we use either method?
(^package\s?([\w\.]*)\s?{?$)|(\bAS3\b)
Note: I get this as a first line if I do new AS3 class from template:
package .var.folders.NQ.NQfuLuLLE+aVJJfvkTLNwU+++TI.-Tmp- {
I imagine I'll have plenty to contribute in the way of bundlie-
goodness. I don't personally use a version control system, and I'm
not wed to any of them. Is there any sort of utility that will enable
me to contribute to any of them, so I could fork somebody on github
and somebody else on bitbucket without having to mess with git and hg?
Thanks,
B
Hi,
I've been using TextMate for almost a year now and like it very much.
I'm trying to stay off my mouse and here is one task I think I should be
able to do without using mouse. From time to time, I copy some code to a
new editor window and run. What is the keyboard shortcut to invoke the
file type dropdown in the bottom of the editor?
Thank you.
Cao
Hello everybody,
I use TextMate mainly for LaTex editing.
In LaTex, I often use a package "jurarsp". This package works by way
of running BibTex on a file with the extension *.rsp.aux (okay,
admittedly the," rsp"-part is not the file extension, but you get the
gist, I hope). In TextMate, I set all my LaTex projects to run the
latex, bibtex, etc. commands on a master file. Now I want to create a
custom command that would run bibtex on the master_file.rsp.aux file,
where the "master_file"-part would automatically be the name of the
master file of the current project. The bibtex command already
achieves this by using this simple syntax:
texMate.py bibtex 1
However, simply adding .rsp.aux after the 1 does not work. So I guess
what I am looking for is a command or regular expression that would do
the following: get the name of the current master file without
extension, and add the extension .rsp.aux to this name. Maybe that is
very simpe question I am asking but I promise you that I duly
researched the mailing list and could not find an answer.
Thank you for any suggestions,
JJ
My LaTeX bundle is latexmk.pl to compile LaTeX documents, but I have no idea
where this file is. I have search my entire hard drive. Where
does latexmk.pl reside?
--
W.P. McNeill
http://staff.washington.edu/billmcn/index.shtml
Sent from Seattle, WA, United States
Hello all,
I'm developing a bundle for handling biomolecular structure files (PDB
files). I'm now working on
getting the language description sorted out. In doing this I ran into
a regex problem.
The situation:
A PDB file is essentially a table. One line from such a table can be
as follows:
ATOM 14 CA GLN A 2 -27.648 -9.581 30.325 1.00 10.00
In the language description I would like to use a regular expression
construct that
matched 'GLN' only if the line starts with either 'ATOM' or 'HETATM'.
This seams like
a conditional regular expression but my attempts to implement it at
such have failed
so far.
Can anyone help?
Thanks,
Marc
>> ball.graphics.beginFill // inserts the following grep error into my
>> file:
>> grep: /Users/brenton/Library/Application Support/TextMate/Bundles/
>> ActionScript 3.tmbundle/support/data/completions.txt: No such file or
>> directory
>> ();
>
> This is a bug I need to fix. Could you could let me know if both of
> the following exist for you:
>
> ~/Library/Application Support/TextMate/Bundles/ActionScript 3.tmbundle
> ~/Library/Application Support/TextMate/Pristine Copy/Bundles/
> ActionScript 3.tmbundle
>
Both exist. completions.txt is in Pristine Copy (and Support is
capitalized in the bundle but not in the error. This could cause
problems on case-sensitive file-systems).
>> I've heard great things about TextMate. I'm still yet to find an
>> editor that rivals FlashDevelop on Mac, but I'm hoping to change
>> that. =)
>
> Contributions are most welcome :) Ideally by forking the bundle on
> github:
>
> http://github.com/simongregory/actionscript3-tmbundle/tree/master
Considering, but then I'd need to have Git. =P
Thanks!
Brenton