neosnippet.vim/autoload/neosnippet/snippets/cpp.snip

38 lines
649 B
Plaintext
Raw Normal View History

2012-02-02 04:33:35 +00:00
include c.snip
snippet template
abbr template <T>
template<typename ${1:T}>
snippet class
abbr class {}
class ${1:name} {
${2}
};
snippet try
abbr try catch
try {
${1}
} catch (${2:exception}) {
${3}
}
# range based for ( C++11 feature )
snippet for_CPP11
abbr for (:) {}
for (${1:var} : ${2:container}) {
${0}
}
# lambda expression ( C++11 feature )
snippet lambda
abbr [](){}
[${1}](${2})${3}{ ${4} }
# scoped enumeration ( C++11 feature )
snippet enum_scoped
abbr enum struct {}
enum struct { ${1} }