summaryrefslogtreecommitdiff
path: root/snippets/python-mode
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--snippets/python-mode/import_from5
-rw-r--r--snippets/python-mode/lambda5
-rw-r--r--snippets/python-mode/print5
-rw-r--r--snippets/python-mode/print format5
-rw-r--r--snippets/python-mode/script10
5 files changed, 30 insertions, 0 deletions
diff --git a/snippets/python-mode/import_from b/snippets/python-mode/import_from
new file mode 100644
index 0000000..767f344
--- /dev/null
+++ b/snippets/python-mode/import_from
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: import_from
+# key: from
+# --
+from $1 import $0
diff --git a/snippets/python-mode/lambda b/snippets/python-mode/lambda
new file mode 100644
index 0000000..08b268b
--- /dev/null
+++ b/snippets/python-mode/lambda
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: lambda
+# key: lam
+# --
+lambda ${1:x}: $0 \ No newline at end of file
diff --git a/snippets/python-mode/print b/snippets/python-mode/print
new file mode 100644
index 0000000..2392fbd
--- /dev/null
+++ b/snippets/python-mode/print
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: print
+# key: print
+# --
+print("$0") \ No newline at end of file
diff --git a/snippets/python-mode/print format b/snippets/python-mode/print format
new file mode 100644
index 0000000..704cb53
--- /dev/null
+++ b/snippets/python-mode/print format
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: print format
+# key: printf
+# --
+print("$1".format($0)) \ No newline at end of file
diff --git a/snippets/python-mode/script b/snippets/python-mode/script
new file mode 100644
index 0000000..3113da9
--- /dev/null
+++ b/snippets/python-mode/script
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# name: script
+# key: script
+# --
+#!/usr/bin/env python
+def main():
+ ${1:pass}
+
+if __name__ == '__main__':
+ main() \ No newline at end of file