File tree Expand file tree Collapse file tree 9 files changed +106
-165
lines changed
Expand file tree Collapse file tree 9 files changed +106
-165
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ snippet mu
7676# # Class
7777# class
7878snippet cl
79- class ${1: `Filename(' $1 ', ' name')` }
79+ class ${1: name }
8080 {
8181 public:
8282 $1 (${2} );
@@ -87,12 +87,12 @@ snippet cl
8787 };
8888# member function implementation
8989snippet mfun
90- ${4: void } ${1: `Filename(' $1 ', ' ClassName')` } ::${2: memberFunction } (${3} ) {
90+ ${4: void } ${1: ClassName } ::${2: memberFunction } (${3} ) {
9191 ${5: /* code */ }
9292 }
9393# namespace
9494snippet ns
95- namespace ${1: `Filename('', 'my')` } {
95+ namespace ${1: name } {
9696 ${2}
9797 } /* namespace $1 */
9898# #
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ snippet j.u
3939# #
4040# # Class
4141snippet cl
42- class ${1 : `Filename("", "untitled")` } ${2}
42+ class $1 ${2}
4343snippet in
44- interface ${1 : `Filename("", "untitled")` } ${2: extends Parent } ${3}
44+ interface $1 ${2: extends Parent } ${3}
4545snippet tc
46- public class ${1 : `Filename()` } extends ${2: TestCase }
46+ public class $1 extends ${2: TestCase }
4747# #
4848# # Class Enhancements
4949snippet ext
@@ -140,15 +140,15 @@ snippet /**
140140 * ${1}
141141 */
142142snippet @au
143- @author ` system ( " grep \` id -un \` /etc/passwd | cut -d \" : \" -f5 | cut -d \" , \" -f1 " ) `
143+ @author $1
144144snippet @br
145- @ brief ${1: Description }
145+ brief ${1: Description }
146146snippet @fi
147- @ file ${1: `Filename()` } .java
147+ file ${1: name } .java
148148snippet @pa
149- @ param ${1: param }
149+ param ${1: name }
150150snippet @re
151- @ return ${1: param }
151+ return ${1: param }
152152# #
153153# # Logger Methods
154154snippet debug
@@ -170,7 +170,7 @@ snippet wh
170170# #
171171# # Main method
172172snippet main
173- public static void main (String[] args) {
173+ public static void main(String[] args) {
174174 ${1: /* code */ }
175175 }
176176# #
Original file line number Diff line number Diff line change 1+ # # Access Modifiers
2+ snippet po
3+ protected
4+ snippet pr
5+ private
6+ snippet int
7+ internal
8+
19# Packages and imports
210snippet import
311 import $1
412snippet imp_as
513 import $1 as $2
14+ snippet j.i
15+ java.io.
16+ snippet j.n
17+ java.net.
18+ snippet j.u
19+ java.util.
20+
621# Classes and objects
722snippet class:Any
8- class $1 : ${2: Any } {
23+ class $1 : ${2: Any } {
924 $0
1025 }
1126snippet data_class
12- data class ${1: foo } (${0} )
27+ data class ${1: foo } ($0 )
28+ snippet interface
29+ interface $1 ${2: : Foo }
30+ snippet init
31+ init {
32+ $1
33+ }
34+ snippet constructor
35+ constructor($1 ) : this($2 ) {
36+ $0
37+ }
38+
39+ # Grtter & Setter
40+ snippet get
41+ get() = field
42+ snippet set
43+ set(value) {
44+ field = value
45+ }
46+
1347# Functions
1448snippet fun
1549 fun ${1: foo } () {
@@ -23,6 +57,11 @@ snippet fun:Any
2357 fun ${1: foo } (): ${2: Any } {
2458 $0
2559 }
60+ snippet infix_fun
61+ infix fun ${1: foo } ($2 : $3 ) {
62+ $0
63+ }
64+
2665# Conditions and loops
2766snippet if
2867 if ($1 ) {
@@ -41,6 +80,7 @@ snippet if_else
4180snippet when
4281 when ($1 ) {
4382 $2 -> $0
83+ ->
4484 }
4585snippet for
4686 for (${1: item } in ${2: items } ) {
@@ -62,9 +102,46 @@ snippet do_while
62102 do {
63103 $0
64104 } while ($1 )
105+
65106# Exceptions
66107snippet try_catch
67108 try {
68109 $0
69110 } catch (e: Exception) {
70111 }
112+
113+ # KDoc
114+ snippet /*
115+ /**
116+ * $1
117+ */
118+ snippet @au
119+ author $1
120+ snippet @pa
121+ param ${1: name }
122+ snippet @re
123+ return ${1: param }
124+ snippet @th
125+ throws ${1: class }
126+
127+ # Collections
128+ snippet arrof
129+ arrayOf($1 )
130+ snippet arrofnull
131+ arrayOfNulls()
132+ snippet listof
133+ listOf($1 )
134+ snippet mlistof
135+ mutableListOf($1 )
136+ snippet mapof
137+ mapOf($1 )
138+ snippet mapof
139+ mutableMapOf($1 )
140+ snippet setof
141+ setOf($1 )
142+ snippet msetof
143+ mutableSetOf($1 )
144+ snippet hashsof
145+ hashSetOf()
146+ snippet hashmof
147+ hashMapOf()
Original file line number Diff line number Diff line change @@ -81,49 +81,44 @@ snippet youtube
8181
8282# The quote should appear only once in the text. It is inherently part of it.
8383# See http://octopress.org/docs/plugins/pullquote/ for more info.
84-
8584snippet pullquote
8685 {% pullquote %}
8786 ${1: text } {" ${2: quote } "} ${3: text }
8887 {% endpullquote %}
8988
9089snippet unordered_list
91- - ${1: ${SELECTED_TEXT: first} }
90+ - ${1: first }
9291 - ${2: second }
9392 - ${3: third }
94- $0
95-
9693snippet ordered_list
97- 1. ${1: ${SELECTED_TEXT: first} }
94+ 1. ${1: first }
9895 2. ${2: second }
9996 3. ${3: third }
100- $0
101-
10297snippet horizontal_rule
10398 ----------\n
10499
105100snippet strikethrough
106- ~~${1: ${SELECTED_TEXT: Striked Text} }~~
101+ ~~${1: Striked Text } ~~
107102
108103snippet bold
109- **${1: ${SELECTED_TEXT: Bold Text} }**$0
104+ **${1: Bold Text } **$0
110105
111106snippet italic
112- *${1: ${SELECTED_TEXT: Italic Text} }*$0
107+ *${1: Italic Text } *$0
113108
114109snippet heading1
115- # ${1: ${SELECTED_TEXT: Heading 1} }
110+ # ${1: Heading 1 }
116111snippet heading2
117- ## ${1: ${SELECTED_TEXT: Heading 2} }
112+ ## ${1: Heading 2 }
118113snippet heading3
119- ### ${1: ${SELECTED_TEXT: Heading 3} }
114+ ### ${1: Heading 3 }
120115snippet heading4
121- #### ${1: ${SELECTED_TEXT: Heading 4} }
116+ #### ${1: Heading 4 }
122117snippet heading5
123- ##### ${1: ${SELECTED_TEXT: Heading 5} }
118+ ##### ${1: Heading 5 }
124119snippet heading6
125- ###### ${1: ${SELECTED_TEXT: Heading 6} }
120+ ###### ${1: Heading 6 }
126121
127122snippet quote
128- > ${1: ${SELECTED_TEXT: Your Quote} }
123+ > ${1: Your Quote }
129124
You can’t perform that action at this time.
0 commit comments