Years later and not very tex-y, but for some reason I really wanted to use commas as separators and ended up putting together the following:
\usepackage{iftex}
\RequireLuaTeX
\usepackage{amsmath}
\usepackage{luacode}
\begin{luacode*}
mycolvec = { }
function mycolvec.replace(input)
tex.sprint(
"\\ensuremath{\\begin{pmatrix}"
.. string.gsub(input, ",", " \\\\ ")
.. "\\end{pmatrix}}")
end
\end{luacode*}
\def\colvec#1{\directlua{mycolvec.replace("#1")}}
Which, when added to the header, allows you to write out column vectors like this:
\colvec{1, 2, 3}
\colvec{8,6,7,5,3,0,9}
This requires that you compile your tex with lualatex instead of xetex or pdftex, but that shouldn't affect the rest of your document.
The seperator can be changed to any arbitrary character by changing the ","
on the .. string.gsub(...
line.
EDIT:
This method breaks when entering tokens (i.e. \colvec{1 \cdot 2, 2 \cdot 3}
), for the reasons described here. As such I'll recommend egreg's answer on a related question, which provides the functionality I claim here without the same problem.