views:

119

answers:

0

I want to have a vertical line for indentation in the lstlisting environment, similar to what one can get in algorithm2e. I tried doing something like the code below, but the the |'s are not contiguous and the result is ugly.

\lstset{
    ...
    showtabs=true,
    tabsize=3,
    tab=\hfill$|$\hfill,
    ...
}