# Save arrow style and reuse it

Suppose my tikzset definitions include:

  vector/.style={%
decoration={markings, mark= at position 0.5 with {\arrow{Triangle[length=2.5mm, width=2mm]}}}, postaction={decorate}
},


And suppose I need to use the same arrow style elsewhere. How do I define some arrow style and refer it later? Something like (which doesn't work):

\tikzset{%
myarrow/.style={
\arrow{Triangle[length=2.5mm, width=2mm]}
},
vector/.style={%
decoration={markings, mark= at position 0.5 with {myarrow}}, postaction={decorate}
},
}


Use the keyhandler /.tip:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,decorations.markings}
\tikzset{
myarrow/.tip={Triangle[length=2.5mm, width=2mm]},
vector/.style={
decoration={markings, mark= at position 0.5 with {\arrow{myarrow}}}
},
}
\begin{document}
\begin{tikzpicture}
\draw[-myarrow](0,0)--(2,0);
\draw[myarrow-{myarrow[red]}](0,-.25)--+(2,0);
\draw[postaction={vector,decorate}](0,-.5)--+(2,0);
\end{tikzpicture}
\end{document}