I am trying to experiment with grammars (they have many dark points
for me), and I have make this simple grammar that does perfectly well
all but the "foldingStopMarker"
{ scopeName = 'source.vaughan';
firstLineMatch = '^Vaughan)';
foldingStartMarker = '^\s*Libro';
foldingStopMarker = '^#$';
patterns = (
{ name = 'keyword.other.english';
match = '^.+#';
},
{ name = 'keyword.other.spanish';
match = '[^#]*$';
},
);
}
I have tried many forms of closing the folding, yet the C {} pairs
but it never works for closing in my grammar. Observe that the # is
not considered any other pattern, but it does not work as stop marker
in any way.
-- Thanks for your help
- Juan F.
Thanks, that worked a charm
I've modified it to /\\ref\{\s*\}+(\s.*)$/i in order to get a comment as well, although it gives me the whole paragraph. Is there any way to limit the number of following words to, say, 10?
Thanks,
baptiste
Something like
/\\ref\{\s*\}/
in the Pattern section of the preferences ought to be enough. The
double backslash gives a "real" backslash (it's usually used to
escape other characters, such as the "\s*" to denote any amount of
space between the braces above, or conversely, again as above, to
indicate a *literal* brace). Having the "\s*" inside the braces means
that if you accidentally leave blank space inside it'll still be
flagged.
Cheers,
Paul
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Hi,
Working on a big latex project, I find the TODO bundle very useful for custom notes. Now I would like to add a TODO item which scans the project for the regular expression /\ref{}/ , that is an empty reference, and list them together with a few words of the paragraph they belong to. I just don't understand regular expressions well enough to do that!
best regards,
baptiste
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Hi!
I wrote this little Applescript to use the "mateup"-shellscript w/out
opening the terminal each time.
Save the script as an application bundle and just call it from QS or
whatever you're using for the most easiest way to open it.
It will show you what it updated as soon as it is finished and can
then be "entered away"
do shell script "mateup 2>&1" user name "your_user_name" password
"password_of_your_user" with administrator privileges
set the_output to the result
get paragraphs of result
choose from list (result) with empty selection allowed
Niels
Hi,
I'm using tm_dialog r7586.
I tried to invoke a warning alert but the following error message
appeared:
tm_dialog: [NOTE: this exception originated in the server.]
Invalid parameter not satisfying: aString != nil
Can someone verify this or is it my fault ( "$DIALOG" -e -p
'{message="HALLO";}' )?
Thanks,
Hans
Hello,
probably this not even is a TextMate problem, but I want to make sure
that it's not before I spend hours of research what I'm doing wrong...
I know that some of you, just like me, use ProFont as editing font in
TextMate (and I'm talking about the original pre-OSX version, not
ProFontX). ProFont includes the font outlines as well as bitmap
versions for some sizes; as far as I can see TextMate uses this
bitmap versions for screen display.
In the days of the classic MacOS, those bitmap versions were stored
in the resource fork of the file; but nowadays it's possible to
create a TrueType font with embedded bitmap fonts which are stored in
the data fork. I've been using FontForge [1] to create such a font,
but when using this font in TextMate, it clearly does NOT use the
bitmapped version but rather the outlines which are somewhat fuzzy at
small sizes.
So I guess that I'm doing something wrong when I create the ttf file
from FontForge, but this is what I want to make sure: Does TextMate
support such "TrueType with embedded bitmap" fonts or will it always
use the outline no matter what I do?
Kind regards,
Tobias
[1] http://fontforge.sourceforge.net/
Something for the todo list...
If anyone s doing any work on the CVS bundle... is there any chance
you could add a 'Remove file' option?
I've had a look at it... but my Ruby is just not up to it.
R
--
Richard Dyce MA (Cantab.) MBCS MIET
http://dyce.com
Hi,
I have two questions regarding to the internal language grammar.
1) Is it possible to look for the internal markups which TM is using
like
"<support.function.perl>(.*?)</support.function.perl>"
directly?
I only know the way to use the 'magic keyword' in a tmCommand
"<key>inputFormat</key><string>xml</string>" and parse the output.
2) Is there a way to modify the current language grammar dynamically?
Example:
{ scopeName = 'text.plain';
fileTypes = ( '' );
patterns = (
{ name = 'my.tag';
match = '(a)';
}
);
}
Then I write a command or what ever to change
match = '(a)';
in
match = '(b)';
If I do so I have to quit TM and restart it. A 'Reload Bundles'
doesn't work.
[I don't know whether it is possible to write an Applescript to
control TM in that respect.]
2a)
Or to use an external file which holds the actual 'match' expression
for a given pattern.
2b)
Or to change the current used language grammar by using a tmCommand.
Many thanks in advance,
Hans
Hi,
I wonder where the project file (.tmproj file) should be located. Do
you save in the root folder of your project? Or do you save the file
outside of the project?
The project file remembers other files relatively, so after making
the file, I'd rather not to move it.
A problem I oftern encounter is svn bundle tries to add the project
file, though I can exclude the file from the commit.
I wonder how people work with others using TextMate. I'm very
interested in your workflow with project files.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
Cliff Pruitt wrote:
> I'm honestly not putting down the desire for the feature, it's just
> not an "expected" feature in an editor. Am I making sense?
Not really ... I think a read-only mode should be a standard feature
of any serious editor. Just consider past examples e.g. vi, Emacs,
Edt, possibly even TECO (but my memory fails me here; digression:
TECO is probably the most powerful/dangerous/sparse/delightfully
cryptic text (character) editor that's ever existed; Emacs used to be
written in it).
On Jul 19, 2007, at 11:30 AM, Andy Armstrong wrote:
> I think you've missed the point Cliff. There are all sorts of reasons
> why you'd want to open a document read-only. Other editors have great
> r/o support (vim/gvim springs to mind). In general just because you
> don't want to change the document doesn't mean you don't want to work
> with it in a familiar user interface will all the syntax highlighting,
> clever selection modes, folding etc that TextMate brings.
I would agree with Andy here ... I often work with multiple (source)
files open and it would highly inefficient/clumsy to use a different
application for reading as well as deal with the unexpected
consequences of entering stray characters into a source file ...
(leading to new but likely less useful permutations of code ...).
Harry.