summaryrefslogtreecommitdiffstats
path: root/.emacs.d/etc/yasnippet
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2019-05-25 18:41:22 -0400
committerAmin Bandali <bandali@gnu.org>2019-05-25 18:41:22 -0400
commit476f62281409cb1948658c3bb1032f7d2e9f4d2f (patch)
treecf5daa378edbb84ac7b0647d0ffc7830e3c60ff4 /.emacs.d/etc/yasnippet
parent2f5d8190a4a914d9c2f9bfddaa3b9f2417c1c028 (diff)
downloadconfigs-476f62281409cb1948658c3bb1032f7d2e9f4d2f.tar.gz
configs-476f62281409cb1948658c3bb1032f7d2e9f4d2f.tar.xz
configs-476f62281409cb1948658c3bb1032f7d2e9f4d2f.zip
emacs: enable yasnippet globally and add a couple of snippets
Diffstat (limited to '.emacs.d/etc/yasnippet')
-rw-r--r--.emacs.d/etc/yasnippet/snippets/java-mode/format5
-rw-r--r--.emacs.d/etc/yasnippet/snippets/java-mode/new5
-rw-r--r--.emacs.d/etc/yasnippet/snippets/java-mode/printf5
-rw-r--r--.emacs.d/etc/yasnippet/snippets/java-mode/println5
-rw-r--r--.emacs.d/etc/yasnippet/snippets/java-mode/return5
5 files changed, 25 insertions, 0 deletions
diff --git a/.emacs.d/etc/yasnippet/snippets/java-mode/format b/.emacs.d/etc/yasnippet/snippets/java-mode/format
new file mode 100644
index 0000000..7620366
--- /dev/null
+++ b/.emacs.d/etc/yasnippet/snippets/java-mode/format
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: String.format
+# key: f
+# --
+String.format("$1${2:%n}");$0 \ No newline at end of file
diff --git a/.emacs.d/etc/yasnippet/snippets/java-mode/new b/.emacs.d/etc/yasnippet/snippets/java-mode/new
new file mode 100644
index 0000000..1ffd2e5
--- /dev/null
+++ b/.emacs.d/etc/yasnippet/snippets/java-mode/new
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: new
+# key: new
+# --
+${1:Type} ${2:obj} = new ${3:Constr}(${4:args});$0 \ No newline at end of file
diff --git a/.emacs.d/etc/yasnippet/snippets/java-mode/printf b/.emacs.d/etc/yasnippet/snippets/java-mode/printf
new file mode 100644
index 0000000..eac39a1
--- /dev/null
+++ b/.emacs.d/etc/yasnippet/snippets/java-mode/printf
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: printf
+# key: pf
+# --
+System.out.printf("$1${2:%n}");$0 \ No newline at end of file
diff --git a/.emacs.d/etc/yasnippet/snippets/java-mode/println b/.emacs.d/etc/yasnippet/snippets/java-mode/println
new file mode 100644
index 0000000..7bb944c
--- /dev/null
+++ b/.emacs.d/etc/yasnippet/snippets/java-mode/println
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: println
+# key: p
+# --
+System.out.println($1);$0 \ No newline at end of file
diff --git a/.emacs.d/etc/yasnippet/snippets/java-mode/return b/.emacs.d/etc/yasnippet/snippets/java-mode/return
new file mode 100644
index 0000000..977859e
--- /dev/null
+++ b/.emacs.d/etc/yasnippet/snippets/java-mode/return
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: return
+# key: r
+# --
+return $1;$0 \ No newline at end of file