Skip to content

Commit 6df388f

Browse files
committed
Make the Java constructor snippet take the class name from the file name
1 parent 221f2c3 commit 6df388f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

snippets/java-mode/constructor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# name: constructor
33
# key: c
44
# --
5-
public ${1:Class} (${2:args}) {
5+
public ${1:`(file-name-base
6+
(or (buffer-file-name)
7+
(buffer-name)))`}($2) {
68
$0
79
}

0 commit comments

Comments
 (0)