From 7a3b877abecb9b2f8ee1200bd2617202b325acd1 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Sat, 20 Feb 2021 21:03:18 +0100 Subject: Update markdown-mode and remove / cleanup some Python snippets --- .emacs.d/snippets/python-mode/classmethod | 10 ---------- .emacs.d/snippets/python-mode/cls | 8 -------- .emacs.d/snippets/python-mode/dec | 14 -------------- .emacs.d/snippets/python-mode/function | 8 -------- .emacs.d/snippets/python-mode/import | 7 ------- .emacs.d/snippets/python-mode/method | 7 ------- .emacs.d/snippets/python-mode/not_impl | 2 +- .emacs.d/snippets/python-mode/pass | 5 ----- .emacs.d/snippets/python-mode/property_getter | 3 +-- .emacs.d/snippets/python-mode/property_setter | 2 +- .emacs.d/snippets/python-mode/scls | 7 ------- .emacs.d/snippets/python-mode/script | 1 - .emacs.d/snippets/python-mode/selfassign | 2 +- .emacs.d/snippets/python-mode/while | 7 ------- .emacs.d/snippets/python-mode/with | 7 ------- 15 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 .emacs.d/snippets/python-mode/classmethod delete mode 100644 .emacs.d/snippets/python-mode/cls delete mode 100644 .emacs.d/snippets/python-mode/dec delete mode 100644 .emacs.d/snippets/python-mode/function delete mode 100644 .emacs.d/snippets/python-mode/import delete mode 100644 .emacs.d/snippets/python-mode/method delete mode 100644 .emacs.d/snippets/python-mode/pass delete mode 100644 .emacs.d/snippets/python-mode/scls delete mode 100644 .emacs.d/snippets/python-mode/while delete mode 100644 .emacs.d/snippets/python-mode/with (limited to '.emacs.d/snippets/python-mode') diff --git a/.emacs.d/snippets/python-mode/classmethod b/.emacs.d/snippets/python-mode/classmethod deleted file mode 100644 index aa78440..0000000 --- a/.emacs.d/snippets/python-mode/classmethod +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: classmethod -# key: cm -# group: object oriented -# -- -@classmethod -def ${1:meth}(cls, $2): - """ - """ - $3 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/cls b/.emacs.d/snippets/python-mode/cls deleted file mode 100644 index 3dbd391..0000000 --- a/.emacs.d/snippets/python-mode/cls +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: cls -# key: cls -# group: object oriented -# -- -class ${1:class}(${2:object}): - """""" - $0 diff --git a/.emacs.d/snippets/python-mode/dec b/.emacs.d/snippets/python-mode/dec deleted file mode 100644 index b22c9e9..0000000 --- a/.emacs.d/snippets/python-mode/dec +++ /dev/null @@ -1,14 +0,0 @@ -# -*- mode: snippet -*- -# name: dec -# key: dec -# group : definitions -# -- -def ${1:decorator}(func): - $2 - def _$1(*args, **kwargs): - $3 - ret = func(*args, **kwargs) - $4 - return ret - - return _$1 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/function b/.emacs.d/snippets/python-mode/function deleted file mode 100644 index 5a39d8f..0000000 --- a/.emacs.d/snippets/python-mode/function +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: function -# key: fn -# group: definitions -# -- -def ${1:fun}(${2:args}): - """""" - $0 diff --git a/.emacs.d/snippets/python-mode/import b/.emacs.d/snippets/python-mode/import deleted file mode 100644 index f34bc39..0000000 --- a/.emacs.d/snippets/python-mode/import +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: import -# key: imp -# group : general -# -- -import ${1:lib}${2: as ${3:alias}} -$0 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/method b/.emacs.d/snippets/python-mode/method deleted file mode 100644 index 985ef0c..0000000 --- a/.emacs.d/snippets/python-mode/method +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: method -# key: m -# group: object oriented -# -- -def ${1:method}(self${2:, $3}): - $0 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/not_impl b/.emacs.d/snippets/python-mode/not_impl index 515e353..97a6cb0 100644 --- a/.emacs.d/snippets/python-mode/not_impl +++ b/.emacs.d/snippets/python-mode/not_impl @@ -1,5 +1,5 @@ # -*- mode: snippet -*- # name: not_impl -# key: not_impl +# key: ni # -- raise NotImplementedError \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/pass b/.emacs.d/snippets/python-mode/pass deleted file mode 100644 index 4734f7f..0000000 --- a/.emacs.d/snippets/python-mode/pass +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: pass -# key: ps -# -- -pass \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/property_getter b/.emacs.d/snippets/python-mode/property_getter index 8bb99dd..408428a 100644 --- a/.emacs.d/snippets/python-mode/property_getter +++ b/.emacs.d/snippets/python-mode/property_getter @@ -7,5 +7,4 @@ def ${1:name}(self): """$1-property""" return self.${2:value} - -$0 +$0 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/property_setter b/.emacs.d/snippets/python-mode/property_setter index a74be67..aa0288d 100644 --- a/.emacs.d/snippets/python-mode/property_setter +++ b/.emacs.d/snippets/python-mode/property_setter @@ -12,4 +12,4 @@ def ${1:name}(self): def $1(self, value): """$1-property setter""" self.$2 = value -$0 +$0 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/scls b/.emacs.d/snippets/python-mode/scls deleted file mode 100644 index 4a10e28..0000000 --- a/.emacs.d/snippets/python-mode/scls +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: subclass -# key: scls -# group: object oriented -# -- -class ${1:class}(${2:super-class}): - $0 diff --git a/.emacs.d/snippets/python-mode/script b/.emacs.d/snippets/python-mode/script index ac15584..2e8cc35 100644 --- a/.emacs.d/snippets/python-mode/script +++ b/.emacs.d/snippets/python-mode/script @@ -10,6 +10,5 @@ def main(inargs=None): """main entry point""" $0 - if __name__ == '__main__': main() diff --git a/.emacs.d/snippets/python-mode/selfassign b/.emacs.d/snippets/python-mode/selfassign index 95d7b2b..efdfaa0 100644 --- a/.emacs.d/snippets/python-mode/selfassign +++ b/.emacs.d/snippets/python-mode/selfassign @@ -3,4 +3,4 @@ # key: sn # group: object oriented # -- -self.$1 = $1 \ No newline at end of file +self._$1 = $1 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/while b/.emacs.d/snippets/python-mode/while deleted file mode 100644 index 7b3539c..0000000 --- a/.emacs.d/snippets/python-mode/while +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: while -# key: wh -# group: control structure -# -- -while ${1:True}: - $0 \ No newline at end of file diff --git a/.emacs.d/snippets/python-mode/with b/.emacs.d/snippets/python-mode/with deleted file mode 100644 index 7fcbd38..0000000 --- a/.emacs.d/snippets/python-mode/with +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: with -# key: with -# group : control structure -# -- -with ${1:expr}${2: as ${3:alias}}: - $0 \ No newline at end of file -- cgit v1.3