Does Eclipse have indentation guides?

浪子不回头ぞ 提交于 2019-12-22 04:18:44

问题


Recently, I use Eclipse to edit my python code. But lacking indentation guides, I feel not very well. So how to add the auto indentation guides for Eclipse? Is there certain plugin? What's more, I have tried the EditBox. But, you know, that is not very natural under some themes...............


回答1:


I use EditBox too and with the right options it is really usefull and doesn't change the look of the editor too much.

If you only want the vertical grey lines that show the indentation/block like this

These are the options:

or if you want to just import the options, paste this in a text file and import it. (You might have the add the file extension .eb for it to work)

#Editbox Eclipse Plugin Settings
#Fri Aug 17 12:58:32 CEST 2012
HighlightOne=true
FillGradient=false
FillSelected=true
RoundBox=true
BorderColorType=1
Name=Default
ExpandBox=false
BorderDrawLine=true
FillOnMove=true
Alpha=0
HighlightWidth=1
BorderWidth=1
HighlightColor=000000
BorderColor=00bbbb
FillKeyModifier=Alt
HighlightColorType=3
FillGradientColor=e1e1d0
Builder=Text2
HighlightDrawLine=true
FillSelectedColor=e1e1d0
BorderLineStyle=0
Colors=ffffff
HighlightLineStyle=0
NoBackground=false
CirculateLevelColors=false



回答2:


There is a plugin that does the job nicely called Indent Guide

The update site is http://sschaef.github.io/IndentGuide/




回答3:


Here are two tutorials for using Eclipse and Python:

  • http://blogs.msdn.com/b/ericgu/archive/2004/08/05/209267.aspx

  • http://www.caktusgroup.com/blog/2011/08/31/getting-started-using-python-eclipse/

As far as indentation, you should be able to simply change the "Editor" preferences.

The key is to make sure the "Pydev, editor" settings do what you want, and any other, Eclipse "Editor" settings don't get in the way :) The second link discusses this in more detail.

'Hope that helps!

PS:

You can also do "brace matching" in Eclipse with Ctrl+Shift+P.




回答4:


As for me, all I do with Eclipse for working with Python:

  1. Install pydev
  2. Set tabs to be replaced by spaces
  3. Set tab length to 4

    • you can make tabs and spaces visual by displaying non-printable symbols. Hopefully, this is what you meant.



回答5:


This is available out of the box for PyDev in the latest version (you can enable it at PyDev > Editor > Vertical Indent Guide).

If you use LiClipse (http://www.liclipse.com -- which is Eclipse+PyDev and some other goodies), it also provides indent guides for other editors (it's the commercial counterpart which enables PyDev to keep on being developed).



来源:https://stackoverflow.com/questions/12000219/does-eclipse-have-indentation-guides

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!