To quickly wrap a code block in useful constructs, select it in the editor and press &shortcut:SurroundWith; (Code | Surround With).