X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/05798a07ddd5430fabf9298fe9da14ad6968235c..82dd761cf1842c38aa90bd85a53a117e192609c5:/vim/ultisnips/cpp.snippets diff --git a/vim/ultisnips/cpp.snippets b/vim/ultisnips/cpp.snippets index f105362..329547f 100644 --- a/vim/ultisnips/cpp.snippets +++ b/vim/ultisnips/cpp.snippets @@ -6,7 +6,7 @@ snippet inc "#include <>" b endsnippet snippet Inc "#include \'\'" b -#include "${1:`!p snip.rv = snip.basename+".h"`}" +#include "${1:`!p snip.rv = snip.basename+".hpp"`}" endsnippet snippet cl "class .. (class)" b @@ -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