2

Our style guide says (for whatever reason that isn't important to this question) no space between the type and the * in selector definitions.

I.e., this is bad:

- (void)foo:(Foo *)foo { 

...and this is good:

- (void)foo:(Foo*)foo {

Is there a way to tell XCode's auto-complete to stop doing the bad thing and do the good thing?

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
  • Ideally I'd like an XCode-based solution, but the answer may be that XCode just doesn't let you do this. – i_am_jorf Jan 10 '12 at 23:46

3 Answers3

2

Here is a post about code formatting in XCode: http://blog.carbonfive.com/2009/08/07/code-formatting-in-xcode/

I believe that the sp_before_ptr_star=add line in the config file (https://gist.github.com/841452) is just the opposite to what you want to do, so probably it should be sp_before_ptr_star=remove.

But I guess this is something to be done AFTER the code has been auto-completed.

Check this comment also: https://stackoverflow.com/a/1610123/1117650, there is a script you might want to use.

Community
  • 1
  • 1
ynka
  • 1,457
  • 1
  • 11
  • 27
0

may not be the best answer but you could opt to use this IDE

AppCode

Alejandro Rangel
  • 1,670
  • 1
  • 20
  • 35
0

The answer is: you can't without using some 3rd party software or script.

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222