开发者

eclipse: changing the # of spaces to indent/unindent

How do I adjust the # of spaces added/removed by Eclipse when I hit Tab or Shift+Tab, for a given filetype? I am working开发者_运维技巧 on reStructuredText files (.rst) and want 2 spaces for those instead of 4.


From the Window menu, choose Preferences. Navigate down to General: Editors: Text Editors: Displayed tab width.

You may also want to check out the code style for some other types of editors, because they decide whether to use tabs or spaces, and the size of the tab stops.

Hint: In the top left of the preferences dialog, you can type "tab" where it says "type filter text", and it will show you all settings related to tabs.


You can associate an editor to a particular type of file in General -> File Associations.

Add your file type (*.rst) and then add an editor.

Go to editor preferences and specify tab policy, in Aptana Studio there's an 'Editors' subsection where you can do that, or you can just associate a random editor that you don't use with a file type you'd like a custom tab spacing to apply.

This works well for me with *.pt and xml editor --eclipse.org explanation

You might want to try this -- http://resteditor.sourceforge.net/ (taken from here)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜