]> git.rmz.io Git - dotfiles.git/commitdiff
vim: pprint cpp snippet
authorSamir Benmendil <samir.benmendil@ultrahaptics.com>
Tue, 24 Oct 2017 09:06:29 +0000 (10:06 +0100)
committerSamir Benmendil <samir.benmendil@ultrahaptics.com>
Tue, 24 Oct 2017 09:06:29 +0000 (10:06 +0100)
vim/ultisnips/cpp.snippets

index 01138782901648947c77b2dc8a35c5ee602f0285..329547fbc3aac24bbc454044babfbf832ed9ff6b 100644 (file)
@@ -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
 #