• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Advanced search and replace question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advanced search and replace question


  • Subject: Re: Advanced search and replace question
  • From: Jonathan Prescott <email@hidden>
  • Date: Mon, 30 Mar 2015 14:44:51 -0400

I’ve used a tool called “AStyle” (astyle.sourceforge.net) for several C / C++ / Objective-C/C++ code bases to address the very same problem you are having.  As one example, I have a simulation that runs around 1M SLOC, maintained over several years by several different “cooks”, that resulted in the same problem (in addition, Windows and Unix issues thrown in the mix).  When I’m merging codebases, having lots of whitespace issues makes a real mess of trying to figure out real merge issues.

Astyle is pretty flexible in specifying the output format, and can probably accommodate most stylistic conventions one may want to maintain.  It’s a command line tool, doesn’t mess with the original files, and can recurse through whatever directory structure you want.   Works on Linux, MacOSX, and Windows.

Knows C/C++/Objective-C/Objective-C++/Java syntax.

It’s been useful to me over the years.  Hope it can help you.

Jonathan


> On Mar 30, 2015, at 2:31 PM, Alex Zavatone <email@hidden> wrote:
>
> I've had the pleasure of inheriting an iOS project where the previous programmers took little to no care in formatting with respect to white spaces between almost anything.
>
> Readability is quite lacking and while I walk through the multiple view controllers all mashed into one .m file, one of the things I'm doing is making the code legible.
>
> With that in mind, I'm hoping that there is a way to specify a search for =, ==, != and * if there the leading and/or trailing characters are not spaces.
>
> I'm expecting that this will involve regular expressions to find an alphanumeric char, an = char and another  alphanumeric char, then replace with the string of " = ".
>
> Is this the right way to go about this?
>
> Thanks in advance.
>
> Oh, and to whomever implemented Edit All in Scope, you're on my Christmas list.
>
> Cheers,
> Alex Zavatone
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Advanced search and replace question
      • From: Alex Zavatone <email@hidden>
References: 
 >Advanced search and replace question (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Advanced search and replace question
  • Next by Date: Re: Advanced search and replace question
  • Previous by thread: Advanced search and replace question
  • Next by thread: Re: Advanced search and replace question
  • Index(es):
    • Date
    • Thread