Initial commit.
This commit is contained in:
1
.emacs.d/elpa/yasnippet-20160131.948/snippets/.gitignore
vendored
Normal file
1
.emacs.d/elpa/yasnippet-20160131.948/snippets/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
**/.yas-compiled-snippets.el
|
1
.emacs.d/elpa/yasnippet-20160131.948/snippets/.nosearch
Normal file
1
.emacs.d/elpa/yasnippet-20160131.948/snippets/.nosearch
Normal file
@@ -0,0 +1 @@
|
||||
|
@@ -0,0 +1,4 @@
|
||||
Please add here your name in alphabetical order (first name) if you contributed with
|
||||
|
||||
- Andrea Crotti
|
||||
- James Ferguson
|
18
.emacs.d/elpa/yasnippet-20160131.948/snippets/LICENSE
Normal file
18
.emacs.d/elpa/yasnippet-20160131.948/snippets/LICENSE
Normal file
@@ -0,0 +1,18 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
40
.emacs.d/elpa/yasnippet-20160131.948/snippets/README.md
Normal file
40
.emacs.d/elpa/yasnippet-20160131.948/snippets/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Yasnippet official snippet collections
|
||||
|
||||
[](https://gitter.im/AndreaCrotti/yasnippet-snippets?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
This repository contains the official snippets for [yasnippet](http://github.com/capitaomorte/yasnippet), as you can see from the git submodules link.
|
||||
|
||||
# How to install
|
||||
|
||||
There are two options, if you have checked out *yasnippet* already, the only thing you need to do is to run `git submodule update --init`
|
||||
and it will checkout automatically this repository, at the last version it was synchronized too.
|
||||
|
||||
Otherwise if you want the latest and greatest snippets collection proceed as follows:
|
||||
|
||||
1. clone this repository
|
||||
2. add to your .emacs the following
|
||||
- `(add-to-list 'yas-snippet-dirs "$$DIRECTORY_WHERE_YOU_CLONED")`
|
||||
- and in case you want to enable yasnippet globally: `(yas-global-mode t)`
|
||||
|
||||
3. `M-x yas-reload-all` to activate them
|
||||
|
||||
# Contributing
|
||||
|
||||
This repository has now become the default snippets repository (as a submodule) in yasnippet.
|
||||
So if you have any useful snippets for any language or framework please feel free to contribute.
|
||||
|
||||
To study the current snippets I suggest to use `M-x yas-describe-tables`
|
||||
which will gave a table representation of all the snippets available in the current mode.
|
||||
|
||||
|
||||
# Guidelines
|
||||
|
||||
Snippets need to be generic enough to be useful for everyone, and not contain anything specific to your own system.
|
||||
|
||||
# Various notes
|
||||
|
||||
## HTML snippets
|
||||
|
||||
Until September 1st 2014 there were a lot of HTML snippets in the repository, which were sometimes useful but I came to the conclusion that yasnippet was not the right fool for them, so they were removed in this pull request:
|
||||
https://github.com/AndreaCrotti/yasnippet-snippets/pull/49
|
||||
|
||||
To everyone writing a lot of HTML I suggest using [emmet mode](https://github.com/smihica/emmet-mode) instead, which is a much more powerful mode for writing HTML tags.
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: project
|
||||
# key: proj
|
||||
# --
|
||||
<project name="${1:test}" default="${2:compile}" basedir="${3:.}">
|
||||
|
||||
$0
|
||||
</project>
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: property
|
||||
# key: prop
|
||||
# --
|
||||
<property name="${1:name}" value="${2:value}" />
|
||||
$0
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: target
|
||||
# key: target
|
||||
# --
|
||||
<target name="${1:compile}" ${2:other}>
|
||||
$0
|
||||
</target>
|
@@ -0,0 +1 @@
|
||||
prog-mode
|
@@ -0,0 +1 @@
|
||||
cc-mode
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: assert
|
||||
# key: ass
|
||||
# --
|
||||
assert($0);
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name : v.begin(), v.end()
|
||||
# key: beginend
|
||||
# --
|
||||
${1:v}.begin(), $1.end()
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name : v.begin(), v.end()
|
||||
# key: beginend
|
||||
# --
|
||||
${1:v}.begin(), $1.end
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: boost_require
|
||||
# key: req
|
||||
# group: boost
|
||||
# --
|
||||
BOOST_REQUIRE( ${1:condition} );
|
||||
$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cerr
|
||||
# key: err
|
||||
# --
|
||||
cerr << $0;
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cin
|
||||
# key: cin
|
||||
# --
|
||||
cin >> $0;
|
11
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/class
Normal file
11
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/class
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: class
|
||||
# key: cls
|
||||
# --
|
||||
class ${1:Name}
|
||||
{
|
||||
public:
|
||||
${1:$(yas/substr yas-text "[^: ]*")}();
|
||||
${2:virtual ~${1:$(yas/substr yas-text "[^: ]*")}();}
|
||||
};
|
||||
$0
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: const_[]
|
||||
# key: c[
|
||||
# --
|
||||
const ${1:Type}& operator[](${2:int index}) const {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: const_[]
|
||||
# key: c[
|
||||
# --
|
||||
const ${1:Type}& operator[](${2:int index}) const
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: constructor
|
||||
# key: ct
|
||||
# --
|
||||
${1:Class}::$1(${2:args}) ${3: : ${4:init}} {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: constructor
|
||||
# key: ct
|
||||
# --
|
||||
${1:Class}::$1(${2:args}) ${3: : ${4:init}}
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: York Zhao <gtdplatform@gmail.com>
|
||||
# name: cout
|
||||
# key: cout
|
||||
# --
|
||||
`(progn (save-excursion) (goto-char (point-min)) (unless (re-search-forward
|
||||
"^using\\s-+namespace std;" nil 'no-errer) "std::"))
|
||||
`cout << $0${1: << "${2:\n}"};
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cpp
|
||||
# key: cpp
|
||||
# --
|
||||
#include "`(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))`.h"
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cstd
|
||||
# key: cstd
|
||||
# --
|
||||
#include <cstdlib>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d+=
|
||||
# key: d+=
|
||||
# --
|
||||
${1:MyClass}& operator+=(${2:const $1 &});
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d_operator<<
|
||||
# key: <<
|
||||
# --
|
||||
friend std::ostream& operator<<(std::ostream&, const ${1:Class}&);
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d_operator[]
|
||||
# key: [
|
||||
# --
|
||||
${1:Type}& operator[](${2:int index});
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d_operator[]_const
|
||||
# key: c[
|
||||
# --
|
||||
const ${1:Type}& operator[](${2:int index}) const;
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d_operator>>
|
||||
# key: >>
|
||||
# --
|
||||
friend std::istream& operator>>(std::istream&, const ${1:Class}&);
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d_operator<<
|
||||
# key: <<
|
||||
# --
|
||||
friend std::ostream& operator<<(std::ostream&, const ${1:Class}&);
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: delete
|
||||
# key: dl
|
||||
# --
|
||||
delete ${1:pointer};
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: delete[]
|
||||
# key: dla
|
||||
# --
|
||||
delete[] ${1:arr};
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: doc
|
||||
# key: doc
|
||||
# --
|
||||
/**
|
||||
* $0
|
||||
*/
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: dynamic_casting
|
||||
# key: cast
|
||||
# --
|
||||
check_and_cast<${1:Type} *>(${2:msg});
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: enum
|
||||
# key: enum
|
||||
# --
|
||||
enum ${1:NAME}{
|
||||
$0
|
||||
};
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fixture
|
||||
# key: fixt
|
||||
# --
|
||||
BOOST_FIXTURE_TEST_SUITE( ${1:name}, ${2:Fixture} )
|
||||
|
||||
$0
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fori
|
||||
# key: fori
|
||||
# --
|
||||
for (${1:auto} ${2:it} = ${3:var}.begin(); $2 != $3.end(); ++$2) {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fori
|
||||
# key: fori
|
||||
# --
|
||||
for (${1:auto }${2:it} = ${3:var}.begin(); $2 != $3.end(); ++$2) {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: friend
|
||||
# key: fr
|
||||
# --
|
||||
friend $0;
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fun_declaration
|
||||
# key: f
|
||||
# --
|
||||
${1:type} ${2:name}(${3:args})${4: const};
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: function
|
||||
# key: f
|
||||
# --
|
||||
${1:type} ${2:Class}::${3:name}(${4:args})${5: const} {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: function
|
||||
# key: f
|
||||
# --
|
||||
${1:type} ${2:Class}::${3:name}(${4:args})${5: const}
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: gtest
|
||||
# key: gtest
|
||||
# group: testing
|
||||
# --
|
||||
#include <gtest/gtest.h>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ignore
|
||||
# key: ignore
|
||||
# --
|
||||
${1:std::}cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: inline
|
||||
# key: il
|
||||
# --
|
||||
inline $0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: io
|
||||
# key: io
|
||||
# --
|
||||
#include <iostream>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: iterator
|
||||
# key: iter
|
||||
# --
|
||||
${1:std::}${2:vector<int>}::iterator ${3:iter};
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: map
|
||||
# key: map
|
||||
# --
|
||||
std::map<${1:type1}$0> ${2:var};
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: module
|
||||
# key: mod
|
||||
# --
|
||||
class ${1:Class} : public cSimpleModule
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: namespace
|
||||
# key: ns
|
||||
# --
|
||||
namespace ${1:Namespace} {
|
||||
|
||||
`yas/selected-text`
|
||||
|
||||
} // $1
|
@@ -0,0 +1,4 @@
|
||||
#name : namespace ...
|
||||
# key: ns
|
||||
# --
|
||||
namespace
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator!=
|
||||
# key: !=
|
||||
# group: operator overloading
|
||||
# --
|
||||
bool ${1:MyClass}::operator!=(const $1 &other) const {
|
||||
return !(*this == other);
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator!=
|
||||
# key: !=
|
||||
# group: operator overloading
|
||||
# --
|
||||
bool ${1:MyClass}::operator!=(const $1 &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator+
|
||||
# key: +
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass} $1::operator+(const $1 &other) {
|
||||
$1 result = *this;
|
||||
result += other;
|
||||
return result;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator+=
|
||||
# key: +=
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass}& $1::operator+=(${2:const $1 &rhs}) {
|
||||
$0
|
||||
return *this;
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator+=
|
||||
# key: +=
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass}& $1::operator+=(${2:const $1 &rhs})
|
||||
{
|
||||
$0
|
||||
return *this;
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator+
|
||||
# key: +
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass} $1::operator+(const $1 &other)
|
||||
{
|
||||
$1 result = *this;
|
||||
result += other;
|
||||
return result;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator=
|
||||
# key: =
|
||||
# where this is a reference to myself
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass}& $1::operator=(const $1 &rhs) {
|
||||
// Check for self-assignment!
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
$0
|
||||
return *this;
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator==
|
||||
# key: ==
|
||||
# group: operator overloading
|
||||
# --
|
||||
bool ${1:MyClass}::operator==(const $1 &other) const {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator==
|
||||
# key: ==
|
||||
# group: operator overloading
|
||||
# --
|
||||
bool ${1:MyClass}::operator==(const $1 &other) const
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator=
|
||||
# key: =
|
||||
# where this is a reference to myself
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass}& $1::operator=(const $1 &rhs)
|
||||
{
|
||||
// Check for self-assignment!
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
$0
|
||||
return *this;
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator[]
|
||||
# key: []
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:Type}& operator[](${2:int index}) {
|
||||
$0
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator[]
|
||||
# key: []
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:Type}& operator[](${2:int index})
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator>>
|
||||
# key: >>
|
||||
# group: operator overloading
|
||||
# --
|
||||
std::istream& operator>>(std::istream& is, const ${1:Class}& ${2:c}) {
|
||||
$0
|
||||
return is;
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator>>
|
||||
# key: >>
|
||||
# group: operator overloading
|
||||
# --
|
||||
std::istream& operator>>(std::istream& is, const ${1:Class}& ${2:c})
|
||||
{
|
||||
$0
|
||||
return is;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator<<
|
||||
# key: <<
|
||||
# group: operator overloading
|
||||
# --
|
||||
std::ostream& operator<<(std::ostream& os, const ${1:Class}& ${2:c}) {
|
||||
$0
|
||||
return os;
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator<<
|
||||
# key: <<
|
||||
# group: operator overloading
|
||||
# --
|
||||
std::ostream& operator<<(std::ostream& os, const ${1:Class}& ${2:c})
|
||||
{
|
||||
$0
|
||||
return os;
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ostream
|
||||
# key: os
|
||||
# --
|
||||
#include <ostream>
|
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/pack
Normal file
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/pack
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: pack
|
||||
# key: pack
|
||||
# --
|
||||
void cNetCommBuffer::pack(${1:type})
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$0
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: private
|
||||
# key: pr
|
||||
# --
|
||||
private:
|
||||
$0
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: protected
|
||||
# key: pt
|
||||
# --
|
||||
protected:
|
||||
$0
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: public
|
||||
# key: pb
|
||||
# --
|
||||
public:
|
||||
$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: <sstream>
|
||||
# key: ss
|
||||
# --
|
||||
#include <sstream>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: std
|
||||
# key: std
|
||||
# --
|
||||
using namespace std;
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: std::
|
||||
# key: st
|
||||
# --
|
||||
std::$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: str
|
||||
# key: str
|
||||
# --
|
||||
#include <string>
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: template
|
||||
# key: temp
|
||||
# --
|
||||
template<${1:$$(yas/choose-value '("typename" "class"))} ${2:T}>
|
||||
$0
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: test case
|
||||
# key: tc
|
||||
# group: testing
|
||||
# --
|
||||
BOOST_AUTO_TEST_CASE( ${1:test_case} )
|
||||
{
|
||||
$0
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: test_main
|
||||
# key: test_main
|
||||
# group: testing
|
||||
# --
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: test_suite
|
||||
# key: ts
|
||||
# group: testing
|
||||
# --
|
||||
BOOST_AUTO_TEST_SUITE( ${1:test_suite1} )
|
||||
|
||||
$0
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: this
|
||||
# key: th
|
||||
# --
|
||||
this
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: throw
|
||||
# key: throw
|
||||
# --
|
||||
throw ${1:MyError}($0);
|
11
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/try
Normal file
11
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/try
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: try
|
||||
# key: try
|
||||
# a bit too intrusive now still, not always I want to do this
|
||||
# --
|
||||
try {
|
||||
$0
|
||||
}
|
||||
catch (${1:type}) {
|
||||
|
||||
}
|
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/tryw
Normal file
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/tryw
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: tryw
|
||||
# key: tryw
|
||||
# --
|
||||
try {
|
||||
`(or yas/selected-text (car kill-ring))`
|
||||
}
|
||||
catch ${1:Exception} {
|
||||
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: tryw
|
||||
# key: tryw
|
||||
# --
|
||||
try {
|
||||
`(or yas/selected-text (car kill-ring))`
|
||||
} catch ${1:Exception} {
|
||||
|
||||
}
|
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/try~
Normal file
10
.emacs.d/elpa/yasnippet-20160131.948/snippets/c++-mode/try~
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: try
|
||||
# key: try
|
||||
# a bit too intrusive now still, not always I want to do this
|
||||
# --
|
||||
try {
|
||||
$0
|
||||
} catch (${1:type}) {
|
||||
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
#name : using namespace ...
|
||||
# key: using
|
||||
# --
|
||||
using namespace ${std};
|
||||
$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: vector
|
||||
# key: vec
|
||||
# --
|
||||
std::vector<${1:Class}> ${2:var}${3:(${4:10}, $1($5))};
|
@@ -0,0 +1 @@
|
||||
cc-mode
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: assert
|
||||
# key: ass
|
||||
# --
|
||||
#include <assert.h>
|
||||
$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: compile
|
||||
# key: compile
|
||||
# --
|
||||
// -*- compile-command: "${1:gcc -Wall -o ${2:dest} ${3:file}}" -*-
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: define
|
||||
# key: d
|
||||
# --
|
||||
#define $0
|
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: malloc
|
||||
# key: malloc
|
||||
# --
|
||||
malloc(sizeof($1)${2: * ${3:3}});
|
||||
$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: packed
|
||||
# key: packed
|
||||
# --
|
||||
__attribute__((__packed__))$0
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: printf
|
||||
# key: pr
|
||||
# --
|
||||
printf("${1:format string}"${2: ,a0,a1});
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: stdio
|
||||
# key: io
|
||||
# --
|
||||
#include <stdio.h>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: stdlib
|
||||
# key: std
|
||||
# --
|
||||
#include <stdlib.h>
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: string
|
||||
# key: str
|
||||
# --
|
||||
#include <string.h>
|
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: union
|
||||
# key: union
|
||||
# --
|
||||
typedef union {
|
||||
$0
|
||||
} ${1:name};
|
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: unistd
|
||||
# key: uni
|
||||
# --
|
||||
#include <unistd.h>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user