Make #defines follow indent

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

Make #defines follow indent

1,873 次查看
FridgeFreezer
Senior Contributor I

I'm sure there's a config menu somewhere to do this, but there are thousands of config options and I want to liiiiive...

 

When I type #define (something) or #if (something), CW 10 *always* moves it to the far left, regardless of whatever indenting is going on in the code. For example:

 

if(something){     do_stuff;     #ifdef DEBUG_PRINT_STUFF     print_stuff;     #endif}

 

CW will always try and put the #if / #endif on the left. Anyone know how to stop it doing this?

标签 (1)
标记 (1)
0 项奖励
回复
3 回复数

1,571 次查看
J2MEJediMaster
Specialist I

1) Choose Project > Properties.

2) In the Properties window that appears, expand the C/C++ General element and choose Code Style.

3) Checkmark the Enable project specific settings option.

4) Use the drop down menu to look at the various code styles.

5) Pick the style that closely matches yours. Click the Edit button.

A Profile window appears, with a lot of options.

---Tom

0 项奖励
回复

1,571 次查看
FridgeFreezer
Senior Contributor I

Tom - I've already found & "fixed" that to my tastes, but there is nothing I can see in there that changes the way indentation behaves with #defines etc., they barely get a mention in either the config or example code window.

0 项奖励
回复

1,571 次查看
FridgeFreezer
Senior Contributor I

I guess I'll take that as a "no" then...

 

So what now, do I file a ticket or something or just go away and stop bothering people?

 

0 项奖励
回复