Skip to content

Commit a340200

Browse files
authored
Merge pull request #348 from r-darwish/java-constructor
Make the Java constructor snippet take the class name from the file name
2 parents 2ec2ada + 6df388f commit a340200

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)