Sponsored By

How to make Xcode feel like MS Visual Studio (MSVC)

There are times when you just have to bite the bullet and do some real coding with Xcode. Here are some tips to make it 'feel' more like MSVC (with Visual Assist installed of course) so you can bounce back and forth without snapping.

Seth Robinson, Blogger

February 5, 2010

4 Min Read

There are times when you just have to bite the bullet and do some real coding with Xcode. Here are some tips to make it 'feel' more like MSVC (with Visual Assist installed of course) so you can bounce back and forth without snapping and murdering your family again.

Step 1: Get rid of that horrible funky mouse acceleration and fix cut and paste

Setup Synergy so you can use your Windows mouse and keyboard on your Mac. It's free. Just think of your Mac screen like an extra monitor.

synergy_button_reverse

Note sure if you've heard but the Ctrl-X/Ctrl-C/Ctrl-V shortcuts are freakin' backwards on the mac. (Don't get mad Mac people, I just mean from a long-time Windows user's point of view!)

To fix this, open the Synergy settings on the server side, which would be Windows, and set up the Mac target to reverse the Ctrl/Alt buttons. (See pic above) This makes the fix system wide, much better than just trying to fix Xcode specifically to do it.

Advantages of using Synergy:

  • No switching keyboards/mice! Switching keyboards can kill productivity.

  • Saves desk space and looks cool

  • You can cut and paste text between the OS's

  • If you've got a linux box, you can also set that up with Synergy

Disadvantages:

  • Need two machines running all the time for this to work

Alternative methods: There are free methods to get rid of that nasty acceleration, none of them really work, maybe the $$ ones do. Some 3rd party mouse drivers will do the job, but you have to OWN that mouse for it to work right. You can also reverse the Ctrl/Alt (Sorry, Command key, whatever) under keyboard preferences on the Mac side, but I seem to remember having a problem with doing it that way.

Step 2: Use my MSVC key binding set

Install my MSVC key config. (Works fine with Xcode 3.x) Download this, unzip it, and place MSVC.pbxkeys in YourUserName/Library/Application Support/Xcode/Key Bindings.

xcode_keyconfig

Next, start Xcode and click Xcode->Preferences, select Key Bindings, then choose "MSVC" as your key binding set.

Now Ctrt-Shift-F does project wide find, Ctrl-Shift-H does project wide replace, F5 does build and debug, Ctrl-` (tilde) will swap between source/header and so forth.

It also remaps debugging keys, F10 will step over, F11 will step into, etc. It's not perfect though, it doesn't seem to want to map a key twice, I can't get F5 to also "Continue" while debugging. So that became F6.. consider this a good place to start from that you can further customize.

Step 3: Fix Firefox so Home/End works like you would expect.

You've gotta websurf from your Mac once in a while, so install Firefox so you don't have to deal with Safari.

Install Keyfixer, a Firefox 3 plugin so pressing End or Home while editing text will actually do what you expected it to.

While you're at it, you can fix it so your mouse's forward and back buttons work properly in Firefox by using the hotkey mapper in Synergy on the server side:

synergy_firefox_fix

(Map mouse button 4 to Ctrl-L and mouse button 5 to Ctrl-R)

Step 4: Finding a decent SVN client for your Mac

Well, you can't. The gold standard is of course TortoiseSVN on Windows - but I can't find anything close on the Mac yet, at least not for free. Yeah, I'm cheap like that.

SCPlugin shows a bit of promise because it attempts Finder integration but is currently broken enough to steer clear of. Maybe later...

RapidSVN is reliable but makes you jump through some hoops if you want merging/diffing.

What works for me currently:

  • Place the SVN checkout on a networked Windows drive so I can use TortoiseSVN. Xcode will behave fine working directly from it - you can override where projects gets built in Preferences->Building so that part happens on the Mac side. (Faster, and less worry that permissions will be screwed up when you do your final install)

  • Also enable the SVN support in Xcode, it's.. uh.. not the greatest but better than nothing.

Step 5: Relax and enjoy your MSVC like coding environment

Well, almost. You'll still feel a little empty inside without VisualAssist's advance code refactoring abilities, but hey.

If you've got any more tips to ease the Win->Mac pain please share 'em.

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like