This is an interesting Snippet that came up recently on the forum.
Consider the code:
static void testGeneralCode()
{
std::vector<int> foo;
}
and you want to create a typedef from the type. Select the type and use the following snippet:
typedef $selected$ $type_name$;
$type_name$ $end$
And you end up with:
static void testGeneralCode()
{
typedef std::vector<int> TypeVectorInt;
TypeVectorInt foo;
}