diff options
| author | Igor Gnatenko <ignatenko@src.gnome.org> | 2015-01-08 14:50:25 (GMT) |
|---|---|---|
| committer | Igor Gnatenko <ignatenko@src.gnome.org> | 2015-01-09 06:29:25 (GMT) |
| commit | 367b6f4bfa7bfa2307c0215981752dda10cbc788 (patch) | |
| tree | 3410905ff8b3f020e45eb504cafd3769248e02fe | |
| parent | f2e4fca6ce1ed85f54a90f34fd38e0e40cb4eb58 (diff) | |
| download | gnome-builder-367b6f4bfa7bfa2307c0215981752dda10cbc788.zip gnome-builder-367b6f4bfa7bfa2307c0215981752dda10cbc788.tar.xz | |
snippets/python: add some basic templates
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=742592
Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
| -rw-r--r-- | src/resources/snippets/python.snippets | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/resources/snippets/python.snippets b/src/resources/snippets/python.snippets index 568debb..96bfab7 100644 --- a/src/resources/snippets/python.snippets +++ b/src/resources/snippets/python.snippets @@ -1,3 +1,6 @@ +snippet python + #!/usr/bin/env python + $0 snippet gpl # ${1:$filename} # @@ -34,3 +37,20 @@ snippet lgpl # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. $0 +snippet import + import $0 +snippet from + from ${1} import $0 +snippet def + def ${1:function}(${2}): + $0 +snippet class + class ${1:Foo}(${2:object}): + def __init__(self{3}): + $0 +snippet main + def main(): + $0 + + if __name__ == "__main__": + main() |
