{"id":580,"date":"2010-02-05T20:37:06","date_gmt":"2010-02-05T11:37:06","guid":{"rendered":"http:\/\/www.codedojo.com\/?p=580"},"modified":"2010-02-12T15:34:22","modified_gmt":"2010-02-12T06:34:22","slug":"how-to-make-xcode-feel-like-ms-visual-studio-msvc","status":"publish","type":"post","link":"https:\/\/www.codedojo.com\/?p=580","title":{"rendered":"How to make Xcode feel like MS Visual Studio (MSVC)"},"content":{"rendered":"<p>There are times when you just have to bite the bullet and do some real coding with Xcode.\u00a0 Here are some tips to make it &#8216;feel&#8217; more like MSVC (with Visual Assist installed of course) so you can bounce back and forth without snapping and murdering your family again.<\/p>\n<h2><strong>Step 1: Get rid of that horrible funky mouse acceleration and fix cut and paste<br \/>\n<\/strong><\/h2>\n<p>Setup <a href=\"http:\/\/code.google.com\/p\/synergy-plus\/\">Synergy+<\/a> so you can use your Windows mouse and keyboard on your Mac.\u00a0 It&#8217;s free.<\/p>\n<p>Just think of your Mac screen like an extra monitor.<\/p>\n<p><a href=\"http:\/\/www.codedojo.com\/wp-content\/uploads\/2010\/02\/synergy_button_reverse.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-583\" title=\"synergy_button_reverse\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2010\/02\/synergy_button_reverse-300x248.jpg\" alt=\"\" width=\"300\" height=\"248\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2010\/02\/synergy_button_reverse-300x248.jpg 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2010\/02\/synergy_button_reverse.jpg 633w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Note sure if you&#8217;ve heard but the Ctrl-X\/Ctrl-C\/Ctrl-V shortcuts are<strong> freakin&#8217; backwards<\/strong> on the mac.\u00a0 (Don&#8217;t get mad Mac people, I just mean from a long-time Windows user&#8217;s point of view!)<\/p>\n<p>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.\u00a0 (See pic above)<\/p>\n<p>This makes the fix system wide, much better than just trying to fix Xcode specifically to do it.<\/p>\n<p>Advantages of using Synergy:<\/p>\n<ul>\n<li>No switching keyboards\/mice!\u00a0 Switching keyboards can kill productivity.<\/li>\n<li>Saves desk space and looks cool<\/li>\n<li>You can cut and paste text between the OS&#8217;s<\/li>\n<li>If you&#8217;ve got a linux box, you can also set that\u00a0 up with Synergy<\/li>\n<\/ul>\n<p>Disadvantages:<\/p>\n<ul>\n<li>Need two machines running all the time for this to work<\/li>\n<\/ul>\n<p>Alternative methods:<\/p>\n<p>There are free methods to get rid of that nasty acceleration, none of them really work, maybe the $$ ones do.\u00a0 Some 3rd party mouse drivers will do the job, but you have to OWN that mouse for it to work right.<\/p>\n<p>You can also reverse the Ctrl\/Alt (Sorry, Command key, whatever) under keyboard preferences on\u00a0 the Mac side, but I seem to remember having a problem with doing it that way.<\/p>\n<h2><strong>Step 2: Use my MSVC key binding set<\/strong><\/h2>\n<p>Install my MSVC key config. (Works fine with Xcode 3.x)<\/p>\n<p><a href=\"http:\/\/www.codedojo.com\/files\/MSVC_xcode_config.zip\">Download this<\/a>, unzip it, and place <strong>MSVC.pbxkeys<\/strong> in YourUserName\/Library\/Application Support\/Xcode\/Key Bindings.<\/p>\n<p><a href=\"..\/wp-content\/uploads\/2010\/02\/xcode_keyconfig.png\"><img loading=\"lazy\" decoding=\"async\" title=\"xcode_keyconfig\" src=\"..\/wp-content\/uploads\/2010\/02\/xcode_keyconfig-300x96.png\" alt=\"\" width=\"300\" height=\"96\" \/><\/a><\/p>\n<p>Next, start Xcode and click Xcode-&gt;Preferences, select Key Bindings, then choose &#8220;MSVC&#8221; as your key binding set.\u00a0 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.<\/p>\n<p>It also remaps debugging keys, F10 will step over, F11 will step into, etc.<\/p>\n<p>It&#8217;s not perfect though, it doesn&#8217;t seem to want to map a key twice, I can&#8217;t get F5 to also &#8220;Continue&#8221; while debugging.\u00a0 So that became F6.. consider this a good place to start from that you can further customize.<\/p>\n<h2><strong>Step 3: Fix Firefox so Home\/End works like you would expect.<\/strong><\/h2>\n<p>You&#8217;ve gotta websurf from your Mac once in a while, so install Firefox so you don&#8217;t have to deal with Safari.<\/p>\n<p>Install <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/9796\">Keyfixer<\/a>, a Firefox 3 plugin so pressing End or Home while editing text will actually do what you expected it to.<\/p>\n<p>While you&#8217;re at it, you can fix it so your mouse&#8217;s forward and back buttons work properly in Firefox by using the hotkey mapper in Synergy on the server side:<\/p>\n<p><a href=\"..\/wp-content\/uploads\/2010\/02\/synergy_firefox_fix.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"synergy_firefox_fix\" src=\"..\/wp-content\/uploads\/2010\/02\/synergy_firefox_fix-300x205.jpg\" alt=\"\" width=\"300\" height=\"205\" \/><\/a><\/p>\n<p>(Map mouse button 4 to Ctrl-L and mouse button 5 to Ctrl-R)<\/p>\n<h2><strong>Step 4: Finding a decent SVN client for your Mac<br \/>\n<\/strong><\/h2>\n<p>Well, you can&#8217;t.\u00a0 The gold standard is of course <a href=\"http:\/\/tortoisesvn.tigris.org\/\">TortoiseSVN<\/a> on Windows &#8211; but I can&#8217;t find anything close on the Mac yet, at least not for free.\u00a0 Yeah, I&#8217;m cheap like that.<\/p>\n<p><a href=\"http:\/\/scplugin.tigris.org\/\">SCPlugin<\/a> shows a bit of promise because it attempts Finder integration but is currently broken enough to steer clear of.\u00a0 Maybe later&#8230;<\/p>\n<p><a href=\"http:\/\/rapidsvn.tigris.org\/\">RapidSVN<\/a> is reliable but makes you jump through some hoops if you want merging\/diffing.<\/p>\n<p>What works for me currently:<\/p>\n<ul>\n<li>Place the SVN checkout on a networked Windows drive so I can use TortoiseSVN.\u00a0 Xcode will behave fine working directly from it &#8211; you can override where projects gets built in Preferences-&gt;Building so that part happens on the Mac side.\u00a0 (Faster, and less worry that permissions will be screwed up when you do your final install)<\/li>\n<li>Also enable the SVN support in Xcode, it&#8217;s.. uh.. not the greatest but better than nothing.<\/li>\n<\/ul>\n<h2><strong>Step 5: Relax and enjoy your MSVC like coding environment<\/strong><\/h2>\n<p>Well, almost.\u00a0 You&#8217;ll still feel a little empty inside without VisualAssist&#8217;s advance code refactoring abilities, but hey.<\/p>\n<p>If you&#8217;ve got any more tips to ease the Win-&gt;Mac pain please share &#8217;em.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you just have to bite the bullet and do some real coding with Xcode.\u00a0 Here are some tips to make it &#8216;feel&#8217; 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-development","category-tech-tips"],"_links":{"self":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=580"}],"version-history":[{"count":13,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":593,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/580\/revisions\/593"}],"wp:attachment":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}