[TxMt] Re: [LaTeX Bundle] New command for numprint
Alain Matthes
alain.matthes at mac.com
Wed Nov 18 11:45:14 UTC 2009
Le 18 nov. 2009 à 01:00, Alex Ross a écrit :
> Hey Alain,
>
> Your code looks safe. I'm not sure what you meant by safe, but I'm quite sure this won't hurt anything.
>
> I simplified it a little bit, and added the features you wanted:
>
>> #!/usr/bin/ruby
>> # Created by Alain Matthes on 2009-11-15 (www.altermundus.com).
>> # Some simplification by Alex Ross (http://lasersox.net)
>>
>> snippet = "\\numprint{${1:#{$stdin.read || "..."}}}$2"
>> snippet = "\\$#{snippet}\\$$0" unless ENV['TM_SCOPE'].match(/math/)
>>
>> puts snippet
>
> Set Input: Selected Text or Nothing
> Output: Insert as Snippet
Super !
Best regards
Alain
PS : I work actually on a latex-author bundle for latex authors of packages.
I made a new grammar because
I need to see the changes between tex primitives and latex macros;
I need also to see the ifthenelse structure,
and a better grammar for Tikz etc ...
I made a new theme more complete for LaTeX.
In a few days, I will upload all this work on a site for testing
More information about the textmate
mailing list