From a3e5bbed2bfbb26f35b1446e8130482221fb5227 Mon Sep 17 00:00:00 2001 From: Aaron Broder Date: Fri, 31 Aug 2012 14:53:39 -0700 Subject: [PATCH] [cpp] Added C++11 lambda snippets --- snippets/cpp.snippets | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/snippets/cpp.snippets b/snippets/cpp.snippets index 9aea849..59c7749 100644 --- a/snippets/cpp.snippets +++ b/snippets/cpp.snippets @@ -129,4 +129,13 @@ snippet itera for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) { ${2:std::cout << *$1 << std::endl;} }${3} - +## +## Lambdas +# lamda (one line) +snippet ld + [${1}](${2}){${3:/* code */}}${4} +# lambda (multi-line) +snippet lld + [${1}](${2}){ + ${3:/* code */} + }${4}