From eb7fa99cc8afbc47306f112eed8f9a68d4cd06ef Mon Sep 17 00:00:00 2001 From: benj Date: Sat, 17 Mar 2018 20:03:19 -0700 Subject: 1. refactored snippets into templates 2. added slime for common lisp 3. created some auto-templates for c --- templates/snippets/python-mode/import_from | 5 +++++ templates/snippets/python-mode/lambda | 5 +++++ templates/snippets/python-mode/print | 5 +++++ templates/snippets/python-mode/print format | 5 +++++ templates/snippets/python-mode/script | 10 ++++++++++ 5 files changed, 30 insertions(+) create mode 100644 templates/snippets/python-mode/import_from create mode 100644 templates/snippets/python-mode/lambda create mode 100644 templates/snippets/python-mode/print create mode 100644 templates/snippets/python-mode/print format create mode 100644 templates/snippets/python-mode/script (limited to 'templates/snippets/python-mode') diff --git a/templates/snippets/python-mode/import_from b/templates/snippets/python-mode/import_from new file mode 100644 index 0000000..767f344 --- /dev/null +++ b/templates/snippets/python-mode/import_from @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: import_from +# key: from +# -- +from $1 import $0 diff --git a/templates/snippets/python-mode/lambda b/templates/snippets/python-mode/lambda new file mode 100644 index 0000000..08b268b --- /dev/null +++ b/templates/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/templates/snippets/python-mode/print b/templates/snippets/python-mode/print new file mode 100644 index 0000000..2392fbd --- /dev/null +++ b/templates/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/templates/snippets/python-mode/print format b/templates/snippets/python-mode/print format new file mode 100644 index 0000000..704cb53 --- /dev/null +++ b/templates/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/templates/snippets/python-mode/script b/templates/snippets/python-mode/script new file mode 100644 index 0000000..3113da9 --- /dev/null +++ b/templates/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 -- cgit v1.2.3