init
This commit is contained in:
7
snippets/kotlin-mode/anonymous
Normal file
7
snippets/kotlin-mode/anonymous
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Anonymous class
|
||||
# key: object
|
||||
# --
|
||||
object: $1 {
|
||||
$0
|
||||
}
|
||||
5
snippets/kotlin-mode/closure
Normal file
5
snippets/kotlin-mode/closure
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Closure (function without name)
|
||||
# key: closure
|
||||
# --
|
||||
{ $1 -> $0 }
|
||||
7
snippets/kotlin-mode/exfun
Normal file
7
snippets/kotlin-mode/exfun
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Extension function
|
||||
# key: exfun
|
||||
# --
|
||||
fun $1.$2($3): $4 {
|
||||
$0
|
||||
}
|
||||
8
snippets/kotlin-mode/exval
Normal file
8
snippets/kotlin-mode/exval
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Extension read-only property
|
||||
# key: exval
|
||||
# --
|
||||
val $1.$2: $3
|
||||
get() {
|
||||
$0
|
||||
}
|
||||
11
snippets/kotlin-mode/exvar
Normal file
11
snippets/kotlin-mode/exvar
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Extension read-write property
|
||||
# key: exvar
|
||||
# --
|
||||
var $1.$2: $3
|
||||
get() {
|
||||
$0
|
||||
}
|
||||
set(value) {
|
||||
|
||||
}
|
||||
7
snippets/kotlin-mode/fun
Normal file
7
snippets/kotlin-mode/fun
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Function with no parameters
|
||||
# key: fun0
|
||||
# --
|
||||
fun $1($2): $3 {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/ifn
Normal file
7
snippets/kotlin-mode/ifn
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Inserts 'if null' expression
|
||||
# key: ifn
|
||||
# --
|
||||
if ($1 == null) {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/inn
Normal file
7
snippets/kotlin-mode/inn
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Inserts 'if not null' expression
|
||||
# key: inn
|
||||
# --
|
||||
if ($1 != null) {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/interface
Normal file
7
snippets/kotlin-mode/interface
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Interface
|
||||
# key: interface
|
||||
# --
|
||||
interface $1 {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/iter
Normal file
7
snippets/kotlin-mode/iter
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Iterate over elements of iterable (for-in) loop
|
||||
# key: iter
|
||||
# --
|
||||
for ($1 in $2) {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/main
Normal file
7
snippets/kotlin-mode/main
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: main() function
|
||||
# key: main
|
||||
# --
|
||||
fun main(args: Array<String>) {
|
||||
$0
|
||||
}
|
||||
7
snippets/kotlin-mode/psvm
Normal file
7
snippets/kotlin-mode/psvm
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: psvm
|
||||
# key: psvm
|
||||
# --
|
||||
fun main(args: Array<string>) {
|
||||
$0
|
||||
}
|
||||
5
snippets/kotlin-mode/serr
Normal file
5
snippets/kotlin-mode/serr
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Prints a string to System.err
|
||||
# key: serr
|
||||
# --
|
||||
System.err.println($0)
|
||||
7
snippets/kotlin-mode/singleton
Normal file
7
snippets/kotlin-mode/singleton
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Singleton
|
||||
# key: singleton
|
||||
# --
|
||||
object $1 {
|
||||
$0
|
||||
}
|
||||
5
snippets/kotlin-mode/sout
Normal file
5
snippets/kotlin-mode/sout
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Prints a string to System.out
|
||||
# key: sout
|
||||
# --
|
||||
println($0)
|
||||
5
snippets/kotlin-mode/soutv
Normal file
5
snippets/kotlin-mode/soutv
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Prints a value to System.out
|
||||
# key: soutv
|
||||
# --
|
||||
println("$0 = ${$0}")
|
||||
7
snippets/kotlin-mode/void
Normal file
7
snippets/kotlin-mode/void
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Function returning nothing
|
||||
# key: void
|
||||
# --
|
||||
fun $1($2) {
|
||||
$0
|
||||
}
|
||||
Reference in New Issue
Block a user