Indentation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Indentation

1,446 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 14 05:09:10 MST 2010
I cannot change the indentation configuration for lpcxpresso. No matter what I change it is always 2 spaces when I hit tab.

Where is the right place to change it correctly?

Thanks,
Renan
0 项奖励
回复
4 回复数

1,419 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 14 08:24:17 MST 2010
So, I found my problem.
Menu: Project->Properties
Tab: C/C++ General->Code Style

I have checked Enable projet specific settings, and it was different than the one I was changing.

Thanks,
Renan
0 项奖励
回复

1,419 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jan 14 06:35:54 MST 2010
These preferences are stored in the workspace. So, try creating a new workspace (File->Switch workspace and select a new, empty directory). The tabs (and all other preferences) in this workspace will be reset to the defaults (tabs = 4). Try creating a new file and verifying that the tabs are indeed 4. Then change your preferences to whatever you want and try again.
0 项奖励
回复

1,419 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 14 06:11:15 MST 2010
I don't know why but I have changed those settings without any luck.
Even when I create a new file, when I hit tab, I get 2 spaces.
0 项奖励
回复

1,419 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jan 14 05:45:56 MST 2010
When you first hit tab on a new line, it will indent to below the first character on the previous line. So, if the preceding line starts at character 2, it will indent to character 2. After that, it will obey the tabbing rules you define.

The place to set the behavious (including inserting spaces rather than tabs) is:
Window->Preferences
General/Editors/Text Editors

[A tip for finding relevant pages is to type what you are looking for in "type filter text" box on the Preference dialog. Typing 'tab' into this field shows 4 pages]
0 项奖励
回复