On 15 Aug 2014, at 18:37, riki wrote:
> Please find herewith my custom theme.
> […]
I do not see any issue here.
I saved your theme and switched to it. Then changed langauge to Fortran
— Modern and entered ‘recursive’. This keyword is shown in bold
and with a slight color change (rather subtle though).
The rule in my Fortran grammar does btw not include as many keywords as
yours. Did you edit the grammar? Did you verify that you get the storage
scope (using ⌃⇧P)?
In a .tex file, typing sec + tab prints code for a section header and label. Very handily, the label for the section header syncs with the actual section header the first time the section is typed. However, thereafter, if the section header changes, the label doesn't change. Is it possible to always have the label change whenever the section header changes?
Many thanks
Ross
Hi,
We’re writing a booking (currently LaTeX) and I’d like to be able to use TM themes in the code listings.
Any solutions for that?
We’re using LaTeX packages “listings” + “color” to do the syntax highlighting. It allows statements such as this:
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
Pretty basic… Anyone seen anything better (pygments?) Or even a way to convert themes to this style?
Thank you, and best wishes,
tim
TextMate has keyboard shortcuts to show the file browser
(option+control+command+D) and switch focus to the file browser
(option+command+tab), but I cannot find a keyboard shortcut to open a file
from the file browser. The only way I can find for opening a file from from
the file browser is by clicking on the file with the trackpad. Is there a
keyboard shortcut available to open files from the file browser?
Cheers
Ross
Hi,
I came across with a rendering bug,
to reproduce it copy the following two lines and paste them into a TM document:
587 3 402 ̃ wa:w.4 NULL NULL NULL NULL
591 3 402 kha:ŋ.4 kha:w.4 NULL NULL NULL NULL
On my machine OSX 10.9.1 TM 2.0-alpha.9503 these lines are rendered as shown in that picture:
The "problem" seems to be that TM is not able to get rid of a TAB {utf8: 09} (and I believe this's true for each CONTROL character) followed by a combing diacritic - in that case a combining tilde {utf8: CC 83}. The actual data in the TM window are correct, you can e.g. look for TAB characters. If you remove the combining tilde TM renders the text correctly.
I'm aware that this is actually my fault since a combining character shouldn't appear after a control character and "more actually" I'm glad that TM had this bug thus I could find my fault ;) but I think TM should do it like other Mac apps e.g. TextEdit.
For safety reasons I attached a UTF-8 text file containing both lines.
Cheers, Hans
I want to modify the regex in the PHP language bundle item that applies the meta.embedded.sql scope to a string. I did this successfully in TM1, but with TM2 I opted to start with a fresh set of bundles and have been having trouble adding this functionality back in.
The PHP code continuing a string of SQL is this:
$db->query("
UPDATE table
SET foo = bar
WHERE foo = '" . function($variable) . "'
");
I tried many variations of the following, added just below the existing meta.embedded.sql rule:
{ name = 'meta.embedded.sql';
begin = '(\$db)->(query)\((")';
end = '(\3)\);';
beginCaptures = {
0 = { name = 'variable.other.php'; };
1 = { name = 'meta.function-call.object.php'; };
2 = { name = 'string.quoted.double.php'; };
};
endCaptures = {
0 = { name = 'string.quoted.double.php'; };
};
contentName = 'source.sql';
patterns = ( { include = 'source.sql'; } );
},
I've even tried simplifying it with only the 'name,' 'begin,' and 'end' and the scope isn't applied where I'd expect it. I can't see why.
I also found this rule (here is only a portion), which I thought I would modify:
name = 'string.quoted.double.sql.php';
begin = '"\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)';
I tried changing this to:
begin = '"[\s\n\r]*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)';
so that it would match the code example above, but the regex doesn't seem to be matching over multiple lines; it only works if the quote mark is on the same line as the UPDATE.
Can somebody please show me how to do this (with whichever of the above rules is more better)?
Once I get a working rule, I would like to add this to a custom bundle that includes the default PHP grammar and adds this modification to it so that I have a stock PHP bundle that is unmodified. Does anybody have an example of an extended PHP bundle so I can see how this should be done?
Thanks thanks,
Quinn
I¹ve upgraded to Yosemite beta and cannot save files. If I try to save a
file, a box pops that says the following:
Failure running ³Strip trailing whitespace on save². interpreter failed: No
such file or directory
What can I do to resolve this?
Thanks
Ross