From 6df388f9fd100877d0ae46241b58335ebf8ff733 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 10 Oct 2019 13:45:50 +0300 Subject: [PATCH] Make the Java constructor snippet take the class name from the file name --- snippets/java-mode/constructor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snippets/java-mode/constructor b/snippets/java-mode/constructor index 602e49638..c8c705fbb 100644 --- a/snippets/java-mode/constructor +++ b/snippets/java-mode/constructor @@ -2,6 +2,8 @@ # name: constructor # key: c # -- -public ${1:Class} (${2:args}) { +public ${1:`(file-name-base + (or (buffer-file-name) + (buffer-name)))`}($2) { $0 } \ No newline at end of file