设置Eclipse中的tab键为4个空格的完整方法:
1.点击 window->preference-,依次选择 General->Editors->Text Editors,选中右侧的 insert space for tabs;如下图所示,保存,第一步完成;
2.点击 window->preference-,依次选择 C++ ->code style 在右侧select a profile-> Edit
重命名profile name (例如 space) 在 Tab policy 选择 Spaces only ->OK