Re: [Pydev-code] Re: parentheses autocompletion
Brought to you by:
fabioz
From: Fabio Z. <fa...@gm...> - 2005-07-12 23:09:04
|
I agree, number 1 seems the best choice for me too. On 7/12/05, Karol Pietrzak (RIT Student) <ka...@ri...> wrote: > =20 >=20 > Fabio Zadrozny wrote: > > Waiting forward to see it... :-) > > > > p.s. I'm also forwarding it to the pydev mailing list > =20 > I was thinking parentheses auto-completion in the context of tuples. Th= e > Java Eclipse editor will remove empty parentheses if your cursor is betwe= en > them and you hit backspace. i.e., > =20 > something() > ^ cursor in between the parentheses, and you hit backspace > =20 > ...you will get... > =20 > something > =20 > It's just one of those niceties that the Java editor gives you. However= , > in Python, () is an empty tuple, and [] is an empty list. > =20 > So what does everyone think would be the best way to approach this? I s= ee > three ways so far (there's probably more). > =20 > 1. Like the Java editor, always delete the two parentheses if you have t= he > cursor between them. > 2. Never delete the two parentheses. Just delete the left parenthesis > (current, simple behavior). > 3. Sometimes delete the two parentheses, based on the context. I'm not > sure what kind of algorithm we could employ here because I couldn't think= of > an example where I _wouldn't_ want the editor to delete both parentheses = for > me. > =20 > (1) is easiest to implement and I think I prefer it, so if I get the go > ahead I'll code that up. > |