Anyone got a bundle for python that works better? The built in one uses bizarre colors, the folding support doesn't work properly (and, less importantly, the nifty automatic quote closing doesn't handle """ and ''' quoted strings).
I looked at the wiki, but didn't see anything for python. Any hints on improving python support would be appreciated.
Regards,
-- Russell
On Jan 27, 2005, at 0:54, Russell E. Owen wrote:
Anyone got a bundle for python that works better? The built in one uses bizarre colors, the folding support doesn't work properly (and, less importantly, the nifty automatic quote closing doesn't handle """ and ''' quoted strings).
The "elif" keyword is mispelled as well, it highlights "elsif" instead.
On 27. jan 2005, at 0:54, Russell E. Owen wrote:
Anyone got a bundle for python that works better? The built in one uses bizarre colors
Perhabs the person who made it will think your preferences are bizarre, so that's hardly a question of "better" :-p.
the folding support doesn't work properly
I don't know the details, but I am pretty sure the folding support works as good as it current can, since TM puts some limitations on it here.
(and, less importantly, the nifty automatic quote closing doesn't handle """ and ''' quoted strings).
I don't know what those are, but if we are talking about 'heredoc'ish strings, spanning multiple lines, that's another limitation in TM, since syntax rules are currently applied on a per-line basis.
I looked at the wiki, but didn't see anything for python. Any hints on improving python support would be appreciated.
You can always have a go at it yourself as well :-).
On Jan 27, 2005, at 3:11 AM, Sune Foldager wrote:
(and, less importantly, the nifty automatic quote closing doesn't handle """ and ''' quoted strings).
I don't know what those are, but if we are talking about 'heredoc'ish strings, spanning multiple lines, that's another limitation in TM, since syntax rules are currently applied on a per-line basis.
TextMate actually highlights these strings fine, but I think the issue is that you'd like to type three quote marks and have TextMate do the right thing (insert six quotes with the insertion point between the middle pair). Right now, you end up with four quotes.
Chris
In article e03c91ced1e5a42f90752966671be1c9@cyanite.org, Sune Foldager cryo@cyanite.org wrote:
On 27. jan 2005, at 0:54, Russell E. Owen wrote:
Anyone got a bundle for python that works better? The built in one uses bizarre colors
Perhabs the person who made it will think your preferences are bizarre, so that's hardly a question of "better" :-p.
I respectfully disagree.
Of the many text editors I've tried (including Qued/M, BBEdit, CodeWarrior IDE, Pepper, Alpha, Python IDE, IDLE, XCode, JEdit, NEedit and SubEthaEdit), only TextMate has ever used a black background by default. Even TextMate uses a light color by default, but uses black for python and perhaps some other languages.
Even the python bundle for TextMate has this comment: // Somebody has a Halloween fetish.
And it isn't just the background. Once that's like, some of the other colors also need tweaking (because they were designed -- if you can call it that -- to be read against black). Once I realized that, I posted this question.
Being able to customize things like this is a nice feature. But not having "normal" behavior by default is likely to be a turnoff for potential buyers.
(and, less importantly, the nifty automatic quote closing doesn't handle """ and ''' quoted strings).
If I type " to start a string, the program immediately adds a trailing quote, i.e. displays "I", where I is the insertion cursor. This is neat, but it gets a bit strange if one is starting a triple-quoted string. It'd be cool if this smarts could be made smart enough to handle that case well -- and that's what I was asking. Learning to live with it or learning how to disable it are both perfectly reasonable alternatives.
-- Russell
On Jan 27, 2005, at 23:46, Russell E. Owen wrote:
Of the many text editors I've tried (including Qued/M, BBEdit, CodeWarrior IDE, Pepper, Alpha, Python IDE, IDLE, XCode, JEdit, NEedit and SubEthaEdit), only TextMate has ever used a black background by default.
Think Different is the slogan of this platform! :)
[...] But not having "normal" behavior by default is likely to be a turnoff for potential buyers.
Tell me about it -- some doesn't even download it because of the black background in the screenshots. Anyway, 1.1 will have style sheets, if 1.0 had reasonable defaults I wouldn't be able to make a huge deal about this addition ;)
[...] but it gets a bit strange if one is starting a triple-quoted string. It'd be cool if this smarts could be made smart enough to handle that case well -- and that's what I was asking.
I actually did not know about triple quoted strings. What are these good for (in PYthon, that is)?
Learning to live with it or learning how to disable it are both perfectly reasonable alternatives.
You can disable it in prefs / text editing (it's the smart typing checkbox).
But alternatively, make a snippet with content: """$1""" and make the trigger e.g. Ps (python string), then when you type Ps + tab it'll expand to the triple quoting with the caret inside, and you can press tab again (after typing your stuff) to skip the last 3 quotes.
According to Allan Odgaard:
I actually did not know about triple quoted strings. What are these good for (in PYthon, that is)?
"docstrings" which enables to give a label to a given method.
You can use them anywhere; they're like HERE documents in Perl.
print """first line second line third line"""
Etc.
Actually, Doc strings are just plain strings (you can use single-quoted strings too). They do not interfere with the code because they simply evaluate to themselves.
Ole
On Fri, 28 Jan 2005 15:12:03 +0100, Ollivier Robert roberto+textmate@keltia.freenix.fr wrote:
According to Allan Odgaard:
I actually did not know about triple quoted strings. What are these good for (in PYthon, that is)?
"docstrings" which enables to give a label to a given method.
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr Darwin snuadh.freenix.org Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004 ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
In article 3756d97505012806421b00fe0a@mail.gmail.com, Jan-Ole Esleben esleben@gmail.com wrote:
You can use them anywhere; they're like HERE documents in Perl.
print """first line second line third line"""
Etc.
Actually, Doc strings are just plain strings (you can use single-quoted strings too). They do not interfere with the code because they simply evaluate to themselves.
Exactly. I just wanted to add that python triple-quoted strings can use """ or ''' as the delimiter (just as python can use " or ' as the normal single-quoted string delimiter).
-- Russell
On 28 janv. 05, at 00:05, Allan Odgaard wrote:
On Jan 27, 2005, at 23:46, Russell E. Owen wrote:
Of the many text editors I've tried (including Qued/M, BBEdit, CodeWarrior IDE, Pepper, Alpha, Python IDE, IDLE, XCode, JEdit, NEedit and SubEthaEdit), only TextMate has ever used a black background by default.
Think Different is the slogan of this platform! :)
[...] But not having "normal" behavior by default is likely to be a turnoff for potential buyers.
Tell me about it -- some doesn't even download it because of the black background in the screenshots. Anyway, 1.1 will have style sheets, if 1.0 had reasonable defaults I wouldn't be able to make a huge deal about this addition ;)
Just to balance things, the black background (and the nice ruby syntax colors) caught my eyes first and made me download TM. I'm spending too much time in front of a screen and, white-hurts-eyes. So I can't wait 1.1... to make all the backgrounds dark. ;)
I actually find it really useful to have different background colours for different languages - it reminds me not to add trailing ;'s everywhere!
Hadley