# Alignment in tikzcd

I want use this options:

\arrow[d,
start anchor={[xshift=0.35cm]south west},
end   anchor={[xshift=0.35cm]north west}]


but it is a very long code. Is there a way in order to have a shorter code? for instance:

       \arrow[d,startcode,endcode]


where

    startcode STAND FOR start anchor={[xshift=0.35cm]south west}
endcode   STAND FOR end   anchor={[xshift=0.35cm]north west}

• As always on this site, please provide a full but minimal example. Then it is a lot easier for others to help, as they do not need to guess parts of your example document (guesses that might not apply to your usecase) – daleif Oct 16 '18 at 9:57
• Can't you just say \tikzset{startcode/.style={ start anchor={[xshift=0.35cm]south west}},endcode/.style={end anchor={[xshift=0.35cm]north west}}}? As pointed out by @daleif, one would need an MWE to test this. – user121799 Oct 16 '18 at 11:22

The solution proposed by marmot in his comment works, but the correct macro is \tikzcdset, not \tikzset.

\documentclass{article}
\usepackage{tikz-cd}
\tikzcdset{
startcode/.style={
start anchor={[xshift=0.35cm]south west}
},
endcode/.style={
end anchor={[xshift=0.35cm]north west}
}
}

\begin{document}
Just to compare the two arrows with and without \texttt{startcode} and \texttt{endcode}:
$\begin{tikzcd} A \ar[d,startcode,endcode] & A \ar[d]\\ B & B \end{tikzcd}$
\end{document}