summaryrefslogtreecommitdiff
path: root/.emacs.d/mysnippets/text-mode/python-mode
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/mysnippets/text-mode/python-mode')
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/__3
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/class54
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/def35
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/defm33
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/for4
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/ifmain4
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/mprop23
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/mpropg11
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/mpropsg17
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/prop15
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/propg9
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/propsg12
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/pscript12
-rw-r--r--.emacs.d/mysnippets/text-mode/python-mode/while4
14 files changed, 0 insertions, 236 deletions
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/__ b/.emacs.d/mysnippets/text-mode/python-mode/__
deleted file mode 100644
index a67dc49..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/__
+++ /dev/null
@@ -1,3 +0,0 @@
1#name : __...__
2# --
3__${init}__ \ No newline at end of file
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/class b/.emacs.d/mysnippets/text-mode/python-mode/class
deleted file mode 100644
index 72f339b..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/class
+++ /dev/null
@@ -1,54 +0,0 @@
1# -*- coding: utf-8 -*-
2# name: class
3# contributor: Orestis Markou
4# contributor: Nishio Hirokazu
5# contributor: Yasser González Fernández <yglez@uh.cu>
6# --
7class ${1:ClassName}(${2:object}):
8 """$3
9 """
10
11 def __init__(self, $4):
12 """$5
13 ${4:$
14 (let* ((indent
15 (concat "\n" (make-string (current-column) 32)))
16 (args
17 (mapconcat
18 '(lambda (x)
19 (if (not (string= (nth 0 x) ""))
20 (concat "- " (char-to-string 96) (nth 0 x)
21 (char-to-string 96) ":")))
22 (mapcar
23 '(lambda (x)
24 (mapcar
25 (lambda (x)
26 (replace-regexp-in-string "[[:blank:]]*$" ""
27 (replace-regexp-in-string "^[[:blank:]]*" "" x))) x))
28 (mapcar '(lambda (x) (split-string x "="))
29 (split-string text ",")))
30 indent)))
31 (if (string= args "")
32 (make-string 3 34)
33 (mapconcat
34 'identity
35 (list "" "Arguments:" args (make-string 3 34))
36 indent)))
37 }
38 ${4:$
39 (mapconcat
40 '(lambda (x)
41 (if (not (string= (nth 0 x) ""))
42 (concat "self._" (nth 0 x) " = " (nth 0 x))))
43 (mapcar
44 '(lambda (x)
45 (mapcar
46 '(lambda (x)
47 (replace-regexp-in-string "[[:blank:]]*$" ""
48 (replace-regexp-in-string "^[[:blank:]]*" "" x)))
49 x))
50 (mapcar '(lambda (x) (split-string x "="))
51 (split-string text ",")))
52 (concat "\n" (make-string (current-column) 32)))
53 }
54 $0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/def b/.emacs.d/mysnippets/text-mode/python-mode/def
deleted file mode 100644
index f82f791..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/def
+++ /dev/null
@@ -1,35 +0,0 @@
1# -*- coding: utf-8 -*-
2# name: def
3# contributor: Orestis Markou
4# contributor: Yasser González Fernández <yglez@uh.cu>
5# --
6def ${1:name}($2):
7 """$3
8 ${2:$
9 (let*
10 ((indent
11 (concat "\n" (make-string (current-column) 32)))
12 (args
13 (mapconcat
14 '(lambda (x)
15 (if (not (string= (nth 0 x) ""))
16 (concat "- " (char-to-string 96) (nth 0 x)
17 (char-to-string 96) ":")))
18 (mapcar
19 '(lambda (x)
20 (mapcar
21 '(lambda (x)
22 (replace-regexp-in-string "[[:blank:]]*$" ""
23 (replace-regexp-in-string "^[[:blank:]]*" "" x)))
24 x))
25 (mapcar '(lambda (x) (split-string x "="))
26 (split-string text ",")))
27 indent)))
28 (if (string= args "")
29 (make-string 3 34)
30 (mapconcat
31 'identity
32 (list "" "Arguments:" args (make-string 3 34))
33 indent)))
34 }
35 $0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/defm b/.emacs.d/mysnippets/text-mode/python-mode/defm
deleted file mode 100644
index dc25827..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/defm
+++ /dev/null
@@ -1,33 +0,0 @@
1# -*- coding: utf-8 -*-
2# name: defm
3# contributor: Yasser Gonz¨¢lez Fern¨¢ndez <yglez@uh.cu>
4# --
5def ${1:name}(self, $2):
6 """$3
7 ${2:$
8 (let* ((indent
9 (concat "\n" (make-string (current-column) 32)))
10 (args
11 (mapconcat
12 '(lambda (x)
13 (if (not (string= (nth 0 x) ""))
14 (concat "- " (char-to-string 96) (nth 0 x)
15 (char-to-string 96) ":")))
16 (mapcar
17 '(lambda (x)
18 (mapcar
19 '(lambda (x)
20 (replace-regexp-in-string "[[:blank:]]*$" ""
21 (replace-regexp-in-string "^[[:blank:]]*" "" x)))
22 x))
23 (mapcar '(lambda (x) (split-string x "="))
24 (split-string text ",")))
25 indent)))
26 (if (string= args "")
27 (make-string 3 34)
28 (mapconcat
29 'identity
30 (list "" "Arguments:" args (make-string 3 34))
31 indent)))
32 }
33 $0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/for b/.emacs.d/mysnippets/text-mode/python-mode/for
deleted file mode 100644
index 84f3ddd..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/for
+++ /dev/null
@@ -1,4 +0,0 @@
1#name : for ... in ... : ...
2# --
3for ${var} in ${collection}:
4 $0 \ No newline at end of file
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/ifmain b/.emacs.d/mysnippets/text-mode/python-mode/ifmain
deleted file mode 100644
index 6224923..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/ifmain
+++ /dev/null
@@ -1,4 +0,0 @@
1#name : if __name__ == '__main__': ...
2# --
3if __name__ == '__main__':
4 $0 \ No newline at end of file
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mprop b/.emacs.d/mysnippets/text-mode/python-mode/mprop
deleted file mode 100644
index 8a17317..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/mprop
+++ /dev/null
@@ -1,23 +0,0 @@
1#contributor : Simeon Simeonov <blackmore@pichove.org>
2#name : @property foo ... getter & setter & deleter
3#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
4# --
5@property
6def ${1:foo}(self):
7 """
8 """
9 return self._$1
10
11@$1.setter
12def $1(self, value):
13 """
14 """
15 self._$1 = value
16
17@$1.deleter
18def $1(self):
19 """
20 """
21 pass
22
23$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropg b/.emacs.d/mysnippets/text-mode/python-mode/mpropg
deleted file mode 100644
index eb60b49..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/mpropg
+++ /dev/null
@@ -1,11 +0,0 @@
1#contributor : Simeon Simeonov <blackmore@pichove.org>
2#name : @property foo ... getter
3#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
4# --
5@property
6def ${1:foo}(self):
7 """
8 """
9 return self._$1
10
11$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropsg b/.emacs.d/mysnippets/text-mode/python-mode/mpropsg
deleted file mode 100644
index 0665f5e..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/mpropsg
+++ /dev/null
@@ -1,17 +0,0 @@
1#contributor : Simeon Simeonov <blackmore@pichove.org>
2#name : @property foo ... getter & setter
3#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
4# --
5@property
6def ${1:foo}(self):
7 """
8 """
9 return self._$1
10
11@$1.setter
12def $1(self, value):
13 """
14 """
15 self._$1 = value
16
17$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/prop b/.emacs.d/mysnippets/text-mode/python-mode/prop
deleted file mode 100644
index 107730a..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/prop
+++ /dev/null
@@ -1,15 +0,0 @@
1# contributor: Mads D. Kristensen <madsdk@gmail.com>
2# name: prop
3# --
4def ${1:foo}():
5 doc = """${2:Doc string}"""
6 def fget(self):
7 return self._$1
8 def fset(self, value):
9 self._$1 = value
10 def fdel(self):
11 del self._$1
12 return locals()
13$1 = property(**$1())
14
15$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/propg b/.emacs.d/mysnippets/text-mode/python-mode/propg
deleted file mode 100644
index 7e994b6..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/propg
+++ /dev/null
@@ -1,9 +0,0 @@
1#contributor : Julio Carlos Menendez <godinblack@gmail.com>
2#name : _get_foo ... foo=property(...)
3# --
4def _get_${1:foo}(self):
5 return self._$1
6
7$1 = property(_get_$1)
8
9$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/propsg b/.emacs.d/mysnippets/text-mode/python-mode/propsg
deleted file mode 100644
index e09d82a..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/propsg
+++ /dev/null
@@ -1,12 +0,0 @@
1#contributor : Julio Carlos Menendez <godinblack@gmail.com>
2#name : _get_foo ... _set_foo ... foo=property(...)
3# --
4def _set_${1:foo}(self, value):
5 self._$1 = value
6
7def _get_$1(self):
8 return self._$1
9
10$1 = property(_get_$1, _set_$1)
11
12$0
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/pscript b/.emacs.d/mysnippets/text-mode/python-mode/pscript
deleted file mode 100644
index 8fdb376..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/pscript
+++ /dev/null
@@ -1,12 +0,0 @@
1#contributor : Simeon Simeonov <blackmore@pichove.org>
2#name : script setup
3#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
4# --
5#!/usr/bin/env python
6# -*- coding: utf-8 -*-
7
8def main():
9 $0
10
11if __name__ == '__main__':
12 main()
diff --git a/.emacs.d/mysnippets/text-mode/python-mode/while b/.emacs.d/mysnippets/text-mode/python-mode/while
deleted file mode 100644
index 704dd7c..0000000
--- a/.emacs.d/mysnippets/text-mode/python-mode/while
+++ /dev/null
@@ -1,4 +0,0 @@
1#name : while ... : ...
2# --
3while ${condition}:
4 $0 \ No newline at end of file