Currently, Visual Studio does not support creating custom snippets for Razor, so something like or won't work. You can check the supported languages here: Code snippets schema reference.
Apparently, only built-in snippets work in .razor files. You can find a discussion and some suggestions to work around this limitation, such as editing built-in snippets or using the legacy editor, in this issue: 6397.