I'm trying to split my listing into several pages, but unfortunately, it doesn't work.
I have read it should work automatically if you set breaklines=true. I can't. Is there another option without creating multiple listings?
\lstset{numbers=left,
columns=fullflexible,
stepnumber=1,
basicstyle=\footnotesize\ttfamily,
numberstyle=\color{lineNumberColor}\tiny,
inputencoding=utf8,
showtabs=false,
extendedchars=true,
showstringspaces=false,
showspaces=false,
tabsize=4,
postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{pred}\hookrightarrow\space}},
commentstyle=\slshape\color{commentColor},
keywordstyle=\color{keywordColor}\bfseries,
stringstyle=\color{stringColor}\ttfamily,
breaklines=true,
breakatwhitespace=true,
}

Assuming you want to specify where a new page starts in your listing, you can do that using the
escapeinsideoption. Thebreaklinesoption ensures line wraps to fit the page horizontally when set to true.By specifying
escapeinside=``, you can escape the listings context between two backtics (`). To break a line you can insert\newpagebetween the backticks like so:The listing should be split up into two pages with
page 1written on one page andpage 2written on the next one.