I have the following to highlight code:
\begin{minted}{python}
def foo():
\end{minted}
However, typing out \begin{minted}{python} is quite tedious.
I want to convert it something like the following:
\code
def foo();
\end
What't the easiest way to accomplish this?