From 928005ffdaa1508c6f15bf386a29e02fa44b1136 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 26 Oct 2018 17:10:30 +0100 Subject: [PATCH] vim: rule of 5 snippet --- vim/ultisnips/cpp.snippets | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vim/ultisnips/cpp.snippets b/vim/ultisnips/cpp.snippets index d5083d5..4c79d78 100644 --- a/vim/ultisnips/cpp.snippets +++ b/vim/ultisnips/cpp.snippets @@ -24,6 +24,15 @@ private: }; // class${1/.+/ $0/m} endsnippet +snippet rule5 "Default constructors/destructors/operaters" b +${1:classname}() = default; +~$1() = default; +$1(const $1 &) = default; +$1($1 &&) = default; +$1 &operator=(const $1 &) = default; +$1 &operator=($1 &&) = default; +endsnippet + snippet ns "namespace .. (namespace)" namespace${1/.+/ /m}${1:`!p snip.rv = snip.basename or "name"`} { ${VISUAL}${0} -- 2.48.1