1. 程式人生 > 其它 >設定eclipse tab為4個空格

設定eclipse tab為4個空格

window

1、Window > Preference > Text Editors : 勾選Insert spaces for tabs ,如果要在刪除時也同時刪除4個,就勾選remove multiple spaces on backspace/delete ,然後apply

2、Window >Preferences >Java > Code Style >Formatter, 點選New,命名4tab確認後,修改Indentation > Tab policy 為 Spaces only,然後apply

3、如果要顯示空格:Window > Preference > Text Editors ,勾選Show whitespace characters

Mac

1、Eclipse > Preference > Text Editors : 勾選Insert spaces for tabs ,如果要在刪除時也同時刪除4個,就勾選remove multiple spaces on backspace/delete ,然後apply

2、Eclipse >Preferences >Java > Code Style >Formatter, 點選New,命名4tab確認後,修改Indentation > Tab policy 為 Spaces only,然後apply

3、如果要顯示空格:Eclipse > Preference > Text Editors ,勾選Show whitespace characters