How can I prevent LaTeX from inserting linebreaks in my \\texttt{...}
or \\url{...}
text regions? There\'s no spaces inside I can replace with ~
Use \nolinebreak
\nolinebreak[number]
The \nolinebreak command prevents LaTeX from breaking the current line at the point of the command. With the optional argument, number, you can convert the \nolinebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.
Source: http://www.personal.ceu.hu/tex/breaking.htm#nolinebreak