From 8cafffc68cac2a913022b26171477b7eeb58e2cc Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Sun, 1 Jan 2012 11:56:20 +0100 Subject: [PATCH 1/4] Eclipse-like snippets for out and err. --- snippets/java.snippets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snippets/java.snippets b/snippets/java.snippets index c211d24..c3551d9 100644 --- a/snippets/java.snippets +++ b/snippets/java.snippets @@ -141,3 +141,7 @@ snippet unless (unless=${1:param});${2} snippet warn Logger.warn(${1:param});${2} +snippet sysout + System.out.println(${1}); +snippet syserr + System.err.println(${1}); From 6e1ce0b399ba857c73eb7b7a1628b9809245ee9f Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Sun, 1 Jan 2012 12:08:21 +0100 Subject: [PATCH 2/4] Snippet for @author that reads /etc/passwd. Not so useful on a Windows system but neat on a *nix one. --- snippets/java.snippets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snippets/java.snippets b/snippets/java.snippets index c3551d9..2715936 100644 --- a/snippets/java.snippets +++ b/snippets/java.snippets @@ -92,6 +92,8 @@ snippet tryf } snippet rst ResultSet ${1:rst}${2: = null}${3};${4} +snippet @au + @author `system("grep \`id -un\` /etc/passwd | cut -d \":\" -f5")` snippet mm @ManyToMany ${1} From 73d2e23c818ce9aea720d57412207068131d61eb Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Sun, 1 Jan 2012 12:12:32 +0100 Subject: [PATCH 3/4] Eclipse-like snippet for comments. --- snippets/java.snippets | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snippets/java.snippets b/snippets/java.snippets index 2715936..5c781a5 100644 --- a/snippets/java.snippets +++ b/snippets/java.snippets @@ -147,3 +147,11 @@ snippet sysout System.out.println(${1}); snippet syserr System.err.println(${1}); +snippet /* + /* + * ${1} + */ +snippet /** + /** + * ${1} + */ From d3bb731b37151e02f74d2089ccf410404111379d Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Sun, 1 Jan 2012 12:16:47 +0100 Subject: [PATCH 4/4] Snippets for cin and cout --- snippets/cpp.snippets | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snippets/cpp.snippets b/snippets/cpp.snippets index 94f7de5..c177a15 100644 --- a/snippets/cpp.snippets +++ b/snippets/cpp.snippets @@ -56,3 +56,11 @@ snippet mfun ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) { ${5:return}; } +snippet scout + std::cout << ${1} << std::endl; +snippet cout + cout << ${1} << endl; +snippet scin + std::cin >> ${1}; +snippet cin + cin >> ${1};