Question

Is there a setting in Pydev source editor (Aptana studio for Eclipse) where I can see what indentation level a particular line in a Python file has? Something like a vertical line or a marker on the top/bottom window edges (as seen in image processing tools).

When having source code with a couple of indentation levels is can be quite hard to see what level it has:

def foo():
  while True:
    #stuff
    #stuff
    if "foo" == "bar":
      #stuff
      #stuff
      while False:
        #stuff
        #stuff
        #stuff
        #stuff
        if "baz" == "baz":
          #stuff
          #stuff
        else:
          #stuff
          #stuff
        #stuff
    #stuff ------> would be nice to have some visible cue that this is on level with the 'if'
Était-ce utile?

La solution

Doesn't look like it is available out of the box, however it is possible to add with plugins, for example:

or you can configure to show whitespaces, however, it doesn't give you vertical indent guide, unless you willing to count dots: Preferences -> General -> Text Editors -> Show whitespace characters

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top