neosnippet.vim/autoload/neosnippet/snippets/cpp.snip
rhysd 33e04bd750 fix C++ namespace snippet
namespace の開き括弧が抜けていたため,修正しました.
2012-11-11 20:57:25 +09:00

77 lines
1.5 KiB
Plaintext

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:TARGET}
} catch (${2:e:xception}) {
${3}
}
# range based for ( C++11 feature )
snippet for_CPP11
abbr for (:) {}
for (${1:#:var} : ${2:#:container}) {
${0:TARGET}
}
# lambda expression ( C++11 feature )
snippet lambda
abbr [](){}
[${1}](${2})${3}{ ${4:TARGET} }
# scoped enumeration ( C++11 feature )
snippet enum_scoped
abbr enum struct {}
enum struct { ${1:TARGET} }
# static assert ( C++11 feature )
snippet static_assert
abbr static_assert(,"")
static_assert( ${1}, "${2}" );${0}
delete namespace
snippet namespace
abbr namespace {}
options head
namespace ${1:#:name} {
${0:TARGET}
} // namespace $1
snippet static_cast
abbr static_cast<>()
static_cast<${1}>(${2})${0}
snippet reinterpret_cast
abbr reinterpret_cast<>()
reinterpret_cast<${1}>(${2})${0}
snippet const_cast
abbr const_cast<>()
const_cast<${1}>(${2})${0}
snippet dynamic_cast
abbr dynamic_cast<>()
dynamic_cast<${1}>(${2})${0}
snippet helloworld
abbr #include<iostream> int main...
#include <iostream>
int main(int argc, char const* argv[])
{
using namespace std;
cout << "hello, world!" << endl;
return 0;
}