I'm trying (for the first time ever) to make Textmate do syntax-
highlighting. The files I want to highlight are JUNOS router
configuration files. My beginning grammar is
{ scopeName = 'source.junos';
fileTypes = ( 'junos' );
foldingStartMarker = '\{\s*$';
foldingStopMarker = '^\s*\}';
patterns = (
{ name = 'keyword.other.junos';
match = 'groups|system|chassis|interfaces|forwarding-options|snmp|
routing-options|protocols|policy-options|firewall|routing-instances';
},
{ name = 'comment.block.junos';
match = '/\*[^\*]*\*/';
},
);
}
When I set the language to JUNOS, folding works but the keywords or
comments stay the default color. Do I need to do something else to
see color highlighting? (assume nothing is too dumb - I'm a newbie
to this)
Assuming I get this working, is there a repository of grammars where
I can share it? And maybe find grammars for other odd languages?
-- Pete
Hi,
Recently I've been finding that textmate seems to be indenting/
autoindenting to the wrong number of chars. I've got the indentation
set to 'Soft Tabs: 2' but I'm finding that when I tab along, I'll end
up indenting to a odd number of chars, eg 3 or 5. I'm also finding
that when I'm writing HTML, if I use Ctrl< to writing the opening and
close tag, then press enter, I'll only be indented 1 char in from the
containing tag, not two as expected.
Any ideas?
---
Jeremy
Hi!
I just tried to render with the filename "Problem Set 5.tex" but it
failed because it seems to "think" that Problem, Set and 5 are three
different documents - here's the output:
atexmk: This is latexmk, John Collins, 26 February 2007, version:
3.08n. **** Report bugs etc to John Collins . **** Latexmk: Could not
find file [Problem] ------------ Run number 1 of 'pdflatex
-interaction=nonstopmode -file-line-error-style Problem' ------------
Latexmk: restoring last Problem.aux file Latexmk: Did not finish
processing file: Latex failed to generate a log file Latexmk: Could
not find file [Set] ------------ Run number 1 of 'pdflatex
-interaction=nonstopmode -file-line-error-style Set' ------------
Latexmk: restoring last Set.aux file Latexmk: Did not finish
processing file: Latex failed to generate a log file Latexmk: Could
not find file [5.tex] ------------ Run number 1 of 'pdflatex
-interaction=nonstopmode -file-line-error-style 5.tex' ------------
Latexmk: restoring last 5.aux file Latexmk: Did not finish processing
file: Latex failed to generate a log file
And I have now the files in the directory of tex-file:
5.aux
5.aux.bak
Problem Set 5.tex
Problem.aux
Problem.aux.bak
Set.aux
Set.aux.bak
texput.log
Removing the spaces from the filename helps. Something should be done
about the error output…should be somehow formatted but I think that
already in discussion…
As written in the subject: it's the actual SVN-checkout of the LaTeX-bundle
Niels
Dear list,
It would appear that the 'Execute Line / Selection as Query' command
in the SQL bundle is not working for multi-line selections.
Am I going mad (missing something?), or can someone else confirm this
problem please. Even better if you know how to fix it.
Thanks
Jez
Hello
I would like to extend the sql language definition to support
PostgreSQL's dollar quoting semantics.
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-S…
Ideally, I'd like to be able to fold dollar quoted strings as they're
often used for large chunks of text, particularly function
definitions.
What is the right place to start in order to implement this? Should I
modify the existing sql bundle?
Andrew
Sample:
$sql = "INSERT INTO table (field) VALUES ('".$foo."')";
The bundle in 1.5.6 (1405) doesn't break out of SQL syntax
highlighting properly on the string. To fix sql-string-double-quoted
and sql-string-single-quoted change:
end = '"';
to regex:
end = '.*?"';
Forgive this PHP programmer if Ruby regex differs and there's a
better fix than this!
I think I'm done with HTML anchors after this. The named anchor
commands have evolved into a full indexing bundle due to a positive
response. Apparently I'm not the only one who gets relegated to
creating long listings with anchored indexes at the top, despite my
protests. So the bundle includes the original commands, plus fully
automated index creation, including even/odd row classes, sub-
indexing for multiple sections, and indexing with summaries.
Everything is inserted as snippets for modification.
The bundle includes a help file and can be found at my blog.
http://blog.circlesixdesign.com/2007/07/13/html-indexing-bundle/
Thanks,
Brett
Hey all, this might be SLIGHTLY off topic but I don't think it is.
I'd really like to write a command to execute SQL statements against
SQL server, but I'm not sure of a command line tool that I can use
with the command. Not to mention there are plenty of times I'd
rather use a tool like the mysql cli tool rather than a full GUI
app. Is anyone using anything from the command line that works well
for them with SQL Server?
- Cliff
On 6/25/07, at 8:37 PM, Ryan Wilcox said:
>Hello all,
>
>I use the Pascal bundle quite a bit, and - while the Pascal bundle
>is MUCH better about understanding what a (to use the C term)
>prototype is vs a definition, it still fails when looking at
>functions (pascal methods that return a value).
I have a change for the Pascal Prototype regex. With this regex it passes all the tests in my previous email on this topic (<http://article.gmane.org/gmane.editors.textmate.general/20600>)
(I believe) The solution is simple:
add (: \w+)? to existing meta.function.prototype.pascal regex so it is:
\b(?i:(function|procedure))\b\s+(\w+(\.\w+)?)(\(.*?\))?(: \w+)?;\s*(?=(?i:attribute|forward|external))
If someone could check this out and commit this change (or one like it) to the Pascal bundle I'd be very grateful.
Thanks so much!,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
In the previous version of TextMate when I submitted a highlighted set of
queries to MySQL it would execute them all in order and show the results.
In the new version it only seems to execute the first SQL statement out of
the highlighted group. This is a big problem for me because I only use
TextMate to edit and submit stored procedures which require at least three
separate statements to be submitted (delimiter change, my stored procedure,
delimiter change back.) Does anyone know of a way to fix this in the new
version? Or if not can someone point me to link of the previous version so
I can reinstall it?
Thanks
--
Dave
i have 3 mac computers, and i updated textmate to the latest version, one by
one. seems that mtasc is not working anymore, i get a colored blank swf all
the time.
is working for you, macuser?
I've installed, deleted the symbolic link, installed again, but still
not working.
edit in textmate is in the menu, but clicking it just makes a ping
noise.
suggestions?
TIA
Hello,
I'm running build 1405 and when trying to use the "Show Changes"
feature, when doing a svn log on my project I get the following:
svn: invalid option character: c
Type 'svn help' for usage.
Anybody else experiencing this?
Thanks
When trying to configure the SQL Bundle, I get the following error in
my console.log, http://pastie.caboo.se/77638. I'm using a fresh
install of Textmate v1405. No other textmate plugins are installed
besides the ones that are installed by default.
Hi,
in 1.5.5 and 1.5.6 is a bug in the "Find in Project" Dialog. Here is
how you can reproduce it:
- open a project
- open "Find in Project"
- set "Find:" to aaa.bbb
- set "Replace:" to ccc.ddd
- activate an other TM window (e.g. the project window)
- re-activate the "Find in Project" dialog
- doubleclick bbb from the "Find:"
- copy
- doubleclick ddd in the "Replace:"
- paste
bug: a blank is inserted before the pasted bbb in the "Replace:" field
cheers,
Alex.
I had a few days left of my trial period when I received a software
update and I haven't been able to open PHP files anymore with that
version.
I tried to downgrade and the newest version that can handle PHP-files
is Version 1.5.5 (1368).
What happens when newer versions try to open a PHP-file they open
them without any syntax colouring, stay up for a few seconds and crash.
The following attachments are the crash log and an example PHP-file.
Is the PHP-bundle doing something nasty or am I doing something wrong?
Regards,
Stefán Vignir Skarphéðinsson
Attached is a patch file containing the changes between the CVS
version of the Latex bundle and my version. They are as follows:
1a. Improve the parsing of %!TEX lines, so that it conforms to the
behaviour of TeXShop. Previously it was too strict about the format;
in particular it demanded a single space following the = sign, rather
than arbitrary whitespace. (Oddly, a single space before the = sign
*is* required.)
1b. Do not ignore "file not found" errors in options.rb. (Why was this done?)
2a. The second group of changes concerns the error handling in the
'Typeset & View' command. Previously, detection of errors depended on
parsing the output of the TeX command. However, it is difficult or
impossible to do this reliably, because of the variety of forms that
error messages can take. The new code also looks at the exit value of
the tex process.
2b. While working on the latexErrWarn.py script, I noticed that the
code detecting the -v (verbose) option was broken. I have fixed it;
but, to conform to existing behaviour, this option is no longer passed
to the script.
3. Allow per-file setting (in a %!TEX line) to override the global
$TM_LATEX_PROGRAM setting. For backwards compatibility reasons, an
exception is made for latexmk. There is a new option
$TM_LATEX_COMPILER which does over-ride everything; this should be the
recommended way of using frameworks like latexmk in the future.
Eventually the latexmk exception should be removed.
Robin
A new version of Latex Watch is available, which fixes a number of
bugs. It's available here:
http://www.puffinry.demon.co.uk/LaTeX%20Watch%202.5.dmg
Latex Watch takes a lot of the hassle out of using Latex, by quickly
updating the document preview whenever you save a change to your
source file. It saves you having to manually recompile all the time,
and it's also quite a bit faster too. See the included help file for
more details.
Changes since 2.4:
- Delete .watcher_pid file on exit. (I think this was broken by 2.3.)
- Fix bug introduced in 2.4 that broke TeXShop updating.
- Use a sanitised name for the .foo.* files, because format names containing
spaces don't seem to work (so we would fail for filenames with spaces in).
- Change into the working directory, rather than using the full path, to
avoid problems caused by special characters in the name of some ancestor
directory.
- Quote Applescript strings, so that filenames containing special characters
(backslash and double quote) will not cause Applescript errors. (They do
still cause problems with PDFSync in Skim: see
https://sourceforge.net/tracker/?func=detail&atid=941981&aid=1753415&group_…)
- Catch the obscure case where the filename ends in ".tex\n", which
would previously cause mysterious-looking problems.
- Remove the 'hide extension' attribute on the .tex file, if TeXShop is
used as the viewer, otherwise updating will fail for interesting reasons
that I won't go into here.
Robin
Hi,
Since the last update I'm having problems with the ActionScript
bundle and XTrace. All my debugging code now gets printed out in the
flash movie rather than in the XTrace window as it used to before.
I think I've done all the necessary steps:
1. Add my folder in the security settings in Flash
2. Fire up XTrace
3. Add the trace argument to mtasc.yaml
Firstly nothing displayed in the preview window. The .swf file ran
fine in a browser but not under TextMate. I modified the build
script (point c below) to represent the file as a proper URL rather
than a file:// path and this worked, but I still don't get any debug
out, nor do I get a security warning.
I made a few tweaks to the mtasc build script:
a. Add the command it used to build the swf as a comment in
underneath the HTML
b. Allow for the 'app' yaml statement to be an array of files rather
than a single file
c. Allow me to prefix a location to the swf file, such that the
output HTML is:
http://localhost/~gaby/game/blah.swf
rather than
/Users/gaby/Sites/game/blah.swf
Which made the preview work.
I'm really stuck here as I found the XTrace output invaluable,
whereas the in-swf version is next to useless as the important data
always runs off the edge of the movie! Help! I'm going mad!
Gaby
--
Junkets for bunterish lickspittles since 1998!
http://www.playr.co.uk/
Hello,
I'm trying to use the database browser with TextMate 1.5.6 (1405)
with Postgres 8.2.1. I've configured the SQL Bundle and when I try to
activate the browser, I see this error message:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/
SQL.tmbundle/Support/bin/db_browser.rb:178:in `abort': cannot convert
Array into String (TypeError) from /Applications/TextMate.app/
Contents/SharedSupport/Bundles/SQL.tmbundle/Support/bin/db_browser.rb:
178 from /Applications/TextMate.app/Contents/SharedSupport/Bundles/
SQL.tmbundle/Support/bin/db_browser.rb:167:in `html' from /
Applications/TextMate.app/Contents/SharedSupport/Bundles/SQL.tmbundle/
Support/bin/db_browser.rb:167
I've already made the password prompt regex change suggested in
another posting, but that did not help.
Thanks for looking into this.
-B
Dear friends!
I am using Textmate for my LaTeX projects (writing arcticles at the
university).
I want the following macro: I want to mark a text that I have written
and then I want to push a special keyboard shortcut to activate it.
Example: "This is a text and it is just an example."
I want to mark the word "text", push a keyboard shortcut and then it
should create automatically:
"This is a \frqq text\flqq\ and it is just an example."
Can this be realized with TextMate?
Kind regards!
Chris (Austria)
For what it's worth, here's a refined version of this morning's
quickie HTML anchor commands. I'm definitely open to input.
They're tied to CTRL-SHIFT-R. That's probably something else's
shortcut, too, but I've lost track. There are two commands so the
shortcut gives you a menu with 2 options. Creating an anchor just
gives you a snippet with a suggested name based on the selected
text. Creating an anchor link gives you a list of all of the current
named anchors in the page and lets you select what to link to.
Thanks,
Brett
I had to whip this up this morning for a site that had a ton of named
anchor tags. There may have been something previously but I missed
it. If you highlight the text to link and hit CTRL-SHIFT-A, it will
give you a dialog with a suggested name for the anchor. Confirming
the dialog after any necessary modifications will create the href
link to the anchor and copy the name of the anchor to the clipboard.
Then you place the cursor or highlight the text to become the anchor
and hit CTRL-SHIFT-A again. It will create the anchor from the
clipboard. This makes for rapid index development.
The only drawback is that my current system of using the same
keyboard shortcut twice means if you hit undo after pasting the
anchor you lose the clipboard and have to start that anchor over from
the beginning. It may be wise to separate the two functions, but I
didn't want to take up more shortcuts than necessary ;).
Brett
Hi,
I'm using Version 1.5.6 (1405) with Postgres 8.2.4. I've configured my setup
in the SQL Bundle,
but when opening the Databrowser nothing shows. I get the display of
"Databases" but there are no databases shown. When I add a wrong one, the
databrowser will complain that the db is unknown.
I can post mor information when necessary.
CU
Christian
--
View this message in context: http://www.nabble.com/SQL-Bundle%3A-Postgres-with-Databrowser-shows-nothing…
Sent from the textmate users mailing list archive at Nabble.com.