1

After switching from Visual Studio 2012 with latest Visual Assist to XCode 5 for C++ development I feel very unhandy. I cannot find the comfort of doing such things:

  • renaming
  • finding usages
  • switching back and forth between definition and declaration
  • changing function signature
  • inserting code snippets such as #ifndef A #define A /*here come header file*/ #endif

But I am sure that there are lot of C++ developer on Mac and of course there should be handy tools for them. Please advice what I need to install. What is the standard arsenal of C++ developer on Mac?

Narek
  • 38,779
  • 79
  • 233
  • 389

2 Answers2

0

You can switch back and forth between definition and declaration with +Click on a function name.

You create Code snippets by dragging selected code to the right pane with snippets. Here's better explanation: http://nshipster.com/xcode-snippets/

Unfortunatelly renaming only works with ObjC and C.

I didn't use VS so I don't know if my suggestions are what You've asked.

Mateusz Szlosek
  • 1,175
  • 10
  • 19
  • @Narek: ⌘+Click usually works. The catch is that Xcode seems to have a very hard time indexing C++ projects and will occasionally just choke. Try restarting the project, wait for a minute to give Xcode a chance to reindex the project and then try again. P.S. - Just to be sure... Are you sure the corresponding cpp/h file is properly included in the project? – Mattia Sep 04 '14 at 01:31
  • @Mattia yes they are included correctly. What about finding usages? Is there any way? – Narek Sep 04 '14 at 11:53
  • @Narek Could You explain, what do You mean by "finding usages"? I don't know VS... – Mateusz Szlosek Sep 04 '14 at 12:27
  • @Narek: Yes, there's a similar feature in Xcode where you can get a list of a method/function's callers and callees. This answer on SO explains the details: http://stackoverflow.com/questions/7145045/find-method-references-in-xcode – Mattia Sep 04 '14 at 21:06
0

There really isn't a lot.

However, if you have to use Xcode, start here with a plugin manager: http://alcatraz.io/

Personally I use the autocomplete plugin and the vim emulation to make my life better. Both installable via alcatraz.

Unfortunately the C++ refactoring totally sucks. I have Visual Studio installed via parallels and I'm popping back to that to do anything automated.

Top tip: Use Command-Shift-O for finding a file.

This also looks interesting (and is also installable via alcatraz): http://codepilot.cc/

JCx
  • 2,689
  • 22
  • 32