Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indentation marker/vertical lines for Python in pydev

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'
like image 644
RickyA Avatar asked Aug 27 '13 14:08

RickyA


1 Answers

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

  • http://sschaef.github.io/IndentGuide/
  • http://editbox.sourceforge.net/

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

like image 140
Rapolas K. Avatar answered Sep 17 '22 23:09

Rapolas K.