I am trying to write a snippet that allows me to write a helpful usage
string for my Python script, and then automatically insert a "if
len(argv) != ..." thing below that:
"""
$TM_FILENAME ${1:args}
"""
if len(argv) != <some regex that counts number of words in $1>:
exit(1)
$0
Depending on the number of words that I enter for args, I want the
appropriate number to be inserted in front of "if len(argv) != ...".
What regular expression can do that?
If a regex can't do that, can I somehow insert the results of a shell
script (e.g. wc) in a regular expression (which, by the way, seems
like a useful thing to be able to do anyways!).
Thanks!
Abhi
Hi,
I've just rolled back from the newest cutting edge release because I've
discovered all my previous Java snippets have been either removed or changed
drastically and I can no longer use textmate to compile my Java classes
without falling over
I was just wondering if it is possible to keep my old snippets and the way
that textmate currently uses to compile Java while updating to the latest
cutting edge update.
Regards
James
--
View this message in context: http://www.nabble.com/Java---Textmate-1496-tp20832061p20832061.html
Sent from the textmate users mailing list archive at Nabble.com.
(Apologies if this is a duplicate post--my previous didn't seem to "take".)
I stumbled upon the description of WebMate, a TextMate plugin that lets you edit
a document (say, HTML) directly in the preview window rather than in source.
Unfortunately, all the links I could find (which eventually pointed to End.com)
were dead.
Does anyone know a mirror site, have a copy of WebMate themselves, or have
suggestions for a replacement?
Many thanks from a happy TextMate user!
jon
/RR (http://responserequested.com)
Hi all,
I keep losing my syntax highlighting in only one certain file type.
I have a JSP bundle that does an include of the source.java scope.
In essence, everything between <% and %> should be treated as Java. The Java
syntax highlighting still works, however, when I open a .java file.
If I blow out my Application Support/TextMate/ directory and start over, it
works fine, and if I add back in the bundle, it will work for a little bit
as well.
But for some reason, after a day or two of editing, everything between <% %>
is colored as plain text.
Here's the really weird part: the scope reads partially correct, and
snippets work, but the syntax highlighting is gone.
When I say the scope works, basically, it will tell me I'm in the proper
scope (text.html.jsp) but it doesn't have the proper scopes for the data
types and such.
Here is the part of my Language portion of the bundle that does the include:
jsp = {
patterns = (
{ name = 'comment.block.jsp';
begin = '<%--';
end = '--%>';
captures = { 0 = { name = 'punctuation.definition.comment.jsp'; }; };
},
{ name = 'source.java.embedded.html';
begin = '<%[!@=]?';
end = '%>';
patterns = ( { include = 'source.java'; } );
},
);
};
Does anyone have any ideas? I am stumped on this one...
(PS. Running Leopard 10.5.5, and running TM 1.5.8 build 1496)
--
View this message in context: http://www.nabble.com/Syntax-highlighting-is-gone...-tp20821869p20821869.ht…
Sent from the textmate users mailing list archive at Nabble.com.
I did some searching on the list before subscribing to see if anyone
answered this. But I couldn't find anything definitive on the
subject. Please forgive me if this has been asked before and feel
free to provide a link to appropriate documentation citing a method...
I would love to have TextMate respond to NetNewsWire's "Post to
Weblog" functionality the same way say - MarsEdit does.
Has anyone developed a way to integrate the two? When I try to simply
selected "Textmate" as my blog editor in NetNewsWire it (not
surprisingly) doesn't work.
TIA
--
David Orriss Jr.
My blog: http://www.codethought.com/blog
Hi all,
I've just updated TextMate to [2008-11-27: REVISION 1496] and in doing
so have noticed that context menus now have ⌘1, ⌘2, etc instead of 1,
2 listed as shortcuts next to them.
As an example the Git bundle is trigger by Ctrl-Shift-G which pops up
a menu that I used to be able to press 1 to Show Uncommitted Changes.
Now that menu item has ⌘1 next to it. (The same thing has happened to
the Subversion menu too.)
Is there anyway to go back to the previous behaviour as this change
breaks my muscle memory?
Cheers,
Paul.
I already sent this message but publication is delayed
for some reason - excuses in advance if the post will be repeated
After updating the Support folder, I am getting
error messages in some of my routines which
use ui.rb. But the errors seem produced by the
lines in ui.rb like
<<<<<<< .mine
and
=======
and similar ones. Strange thing, it seems like the errors
are not related to my routines: a typical example:
/tmp/temp_textmate.LJOoCE:4:in `require': /Library/Application
Support/TextMate/Support/lib/ui.rb:92: syntax error, unexpected tLSHFT,
expecting kEND
(SyntaxError)
<<<<<<< .mine
^
Any help appreciated
Piero
> Well, at least a reason: in Snow Leopard Apple wants to allow menu
> items to trigger without any modifiers at all.
Thanks for the clarification... I have to say it's bad news for my
workflow... I've been going crazy the last couple of days... It's so
ingrained in my system... Plus, trying to get used to it, I keep on
hitting command + # key and switch tab instead... grrr...
At least I know it's because of Snow Leopard now... so I'll do some
kung fu training to get used to it... :'(
Hello. I've been using TextMate for writing Objective-C for the iPhone.The
features that come in the Objecive-C bundle are great but the supported
frameworks for documentation look up and completion do not include the
iPhone SDK / Cocoa Touch Frameworks.
This thread <
http://thread.gmane.org/gmane.editors.textmate.general/25089/focus=25595>
resolved the documentation issue for me but I'm still trying to get
completions for the iPhone specific frameworks/Classes.
So far I have tried to use the Index Headers For Completion command to index
the Cocoa touch headers. I created a TextMate project and copied all the
UIKit framework header files to the project folder.
I ran the Index Headers command but the generated .classes.TM_Completions.txt
and .methods.TM_Completions.txt files where empty.
I then opened the GenerateMethodList.rb script and added "UIKit" => "UI" to
the "translate" array. After doing this some Classes show up in the
generated completions files but the list is far from complete. This is the
generated clas list:
NSValue
NSCoder
UIColor
UIFont
UIViewController
NSBundle
NSObject
NSString
NSIndexPath
UIView
I don't know why the NS* classes show up in the list and I dont know what
sets the UI* classes in the list appart fro all the other UI classes that
didn't show up. I've never written a single line of Ruby and there are a lot
of things I don't understand in the generateMethodsList.rb script
Allan or anybody else, If you are listening, could you please give me some
pointers as to how to index these header files (Along with the other
iPhoneSDK/Cocoa Touch header files) and use them for completions in my
projects?
I would love to help including this in the official Objective-C bundle or
help create a new Objective-C iPhone bundle.
Thanks!
RafaVega
Hi guys,
In adding my own command to convert a HTML document/selection to
Markdown, I discovered that the Markdown bundle's version of
html2text.pl is a few versions old. Since that version, unicode is
handled better - the version included with TM dies with an error when
encountering HTML entities like μ.
May be worth updating it, perhaps.
Cheers,
Mike
--
Michael Tyson | michael.tyson.id.au
m: (+61) 0407 754 124
e: mike(a)tyson.id.au
aim: mikerusselltyson
twitter: MichaelTyson