---
title: "Eclipse用4个空格代替Tab"
author: "xiangjun"
date: "2012-06-11T09:22:57Z"
tags: []
categories: ["编程语言"]
slug: "eclipse-4-tab"
draft: false
lastmod: "2012-06-11T09:22:35Z"
id: 1558104
url: "https://xiangjun.iteye.com/blog/1558104"
---

网上找半天。现在记录下.... 


Step 1:
Windows->Preferences->General->Editors->Text Editors，选中“Insert spaces for tabs”。


Step 2:
Windows->Preferences->Java->Code Styles->Formatter，点击Acitivie Profile边上的Edit按钮。在打开的页面中的General settings中，令Tab policy为Space only。


--
Good Luck.