Is it possible to enable a continuous vertical line on code to show indentation? I am trying to use the following code from a stackoverflow question. Originally, the documentation suggests using showtabs and change the kind of symbol using tabs.
To emulate the effect I wanted, I turned the
showtabs=true, and added a line just below it as
However, you can see the side effect of using it on the image below, for example in line
7. I attempted to press space and then only tab once on line
6, but it doesn't quite end up the way I want, it tends to press the word further. Ideally line
7 would be close to the print command, and would be a continuous line.
Is there an easier way that the code referred on the question could be adapted to do this? I tend to see this indentation vertical line quite often on the blackboard lectures, but not in latex and I find it quite a good visual clue to not clutter the code when reading it.