Add c++ yasnippets
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: class
|
||||||
|
# key: cls
|
||||||
|
# --
|
||||||
|
class ${1:Name} {
|
||||||
|
public:
|
||||||
|
${1:$(yas-c++-class-name yas-text)}();
|
||||||
|
${2:virtual ~${1:$(yas-c++-class-name yas-text)}();}$0
|
||||||
|
};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: constructor
|
||||||
|
# key: ct
|
||||||
|
# --
|
||||||
|
${1:Name}::$1(${2:args}) ${3: : ${4:init}}
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: define
|
||||||
|
# key: d
|
||||||
|
# --
|
||||||
|
#define $0
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: destructor
|
||||||
|
# key: dt
|
||||||
|
# --
|
||||||
|
${1:Name}::~$1()
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: fun_declaration
|
||||||
|
# key: f
|
||||||
|
# --
|
||||||
|
${1:type} ${2:name}(${3:args})${4: const};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: fun_implementation
|
||||||
|
# key: fim
|
||||||
|
# --
|
||||||
|
${1:type} ${2:name}(${3:args})${4: const}
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: guard
|
||||||
|
# key: grd
|
||||||
|
# --
|
||||||
|
#ifndef ${1:GUARD}_H
|
||||||
|
#define ${1:GUARD}_H
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
#endif // ${1:GUARD}_H
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: include
|
||||||
|
# key: i
|
||||||
|
# --
|
||||||
|
#include $0
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: namespace
|
||||||
|
# key: ns
|
||||||
|
# --
|
||||||
|
namespace ${1:Namespace} {
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: separator
|
||||||
|
# key: spr
|
||||||
|
# --
|
||||||
|
// -----------------------------------------$0
|
||||||
Reference in New Issue
Block a user