[wingide-users] Released 2 new scripts: `flip` and `deep-to-var`
ram at rachum.com
Sat Feb 25 06:11:38 MST 2012
I released 2 new scripts for Wing IDE, `flip` and `deep-to-var`:
`flip` is a simple one: It flips between `True` and `False`.
`deep-to-var` is more complex. Here is its description:
Create a variable from a deep expression.
When you're programming, you're often writing lines like these:
html_color = self._style_handler.html_color
location = context_data['location']
event_handler = super(Foobsnicator, self).get_event_handler()
What's common to all these lines is that you're accessing some expression,
sometimes a deep one, and then getting an object, and making a variable for
that object with the same name that it has in the deep expression.
What this `deep-to-var` script will do for you is save you from having to
the `html_color = ` part, which is annoying to type because you don't have
autocompletion for it.
Just write your deep expression, like `self._style_handler.html_color`,
this `deep-to-var` script, and you'll get the full line and have the caret
on the next line.
Suggested key combination: `Alt-Insert E`
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wingide-users