X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/53ec838a524643a830dba9fc81c21c1627f6b2ae..4f1cc137755e29eacf648f9ab03ad4be74f49d73:/vim/ultisnips/cpp.snippets?ds=sidebyside diff --git a/vim/ultisnips/cpp.snippets b/vim/ultisnips/cpp.snippets index a2a4180..329547f 100644 --- a/vim/ultisnips/cpp.snippets +++ b/vim/ultisnips/cpp.snippets @@ -52,6 +52,11 @@ ${3} #endif endsnippet +snippet pprint "Pretty print expression" b +#define PPRINT(x) std::cout << #x " = " << (x) << '\n'; +PPRINT(${VISUAL}${0}) +endsnippet + # # Qt # @@ -107,3 +112,9 @@ auto ${1:alias}(Args&&... args) return ${2:function}(std::forward(args)...); } endsnippet + +snippet once "#pragma once" b +#pragma once + +${0} +endsnippet