Is there any way to access current scope (class name or function name) inside a snippet? I am trying to write a snippet for super(CurrentClassName, self).get(*args, **kwargs) but seems like I can't really replace CurrentClassName with actual class name. Does anyone know how to do that?
-
no, you'd have to do this via a plugin.MattDMo– MattDMo2013-07-26 14:57:00 +00:00Commented Jul 26, 2013 at 14:57
Add a comment
|
2 Answers
Sorry snippets are primarily meant for reusability; you can do precisely as you say above but cannot insert specific things - you would have to write your own plugin in order to add this functionality as it would require things like a specific way of selecting things to modify and replace which would be specific to it.
Comments
For future Googlers, someone has made such a plugin: