Skip to content

Instantly share code, notes, and snippets.

@W4RH4WK
Created July 26, 2018 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save W4RH4WK/35bc34e74863634c46418cc5174e18ad to your computer and use it in GitHub Desktop.
Save W4RH4WK/35bc34e74863634c46418cc5174e18ad to your computer and use it in GitHub Desktop.
Visual Assist X snipepts %appdata%/VisualAssist/Autotext
a:#ifdef ... #endif:#ifdef:
#ifdef $condition$
$selected$$end$
#endif // $condition$
a:Untitled:#in:
#include "$end$"
a:Untitled:#in:
#include <$end$>
a:Class Template:class:
class $class_name$ {
public:
$class_name$();
$class_name$(const $class_name$&) = delete;
$class_name$& operator=(const $class_name$&) = delete;
$class_name$(const $class_name$&&) noexcept = delete;
$class_name$& operator=(const $class_name$&&) noexcept = delete;
~$class_name$() noexcept;
private:
};
a:Doc Comment:/**:
/** $brief$
*
* $description$
*
*/
a:Dynamic Cast:dyn:
if (auto $new_var$ = dynamic_cast<$new_type$>($var$)) {
$end$
}
a:For:for:
for (int $index$ = 0; $index$ < $length$; ++$index$) {
$selected$$end$
}
a:For Each:fore:
for (const auto& $element$ : $container$) {
$selected$$end$
}
a:For Reverse:forr:
for (int $index$ = $length$ - 1; $index$ >= 0; --$index$) {
$selected$$end$
}
a:Header Guard:guard:
#ifndef $FILE_BASE_UPPER$_$FILE_EXT_UPPER$
#define $FILE_BASE_UPPER$_$FILE_EXT_UPPER$
$selected$$end$
#endif // $FILE_BASE_UPPER$_$FILE_EXT_UPPER$
a:If:if:
if ($condition$) {
$selected$$end$
}
a:If Else:ife:
if ($condition$) {
$selected$$end$
} else {
}
a:Namespace:name:
namespace $namespace$ {
$selected$$end$
} // end namespace $namespace$
a:Seperator://-:
// --------------------------------------------------------
a:stderr:err:
std::cerr << "$var$: " << $var$ << "\n";
a:stdout:out:
std::cout << "$var$: " << $var$ << "\n";
a:Try Catch:try:
try {
$selected$$end$
} catch (const std::exception& ex) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment