| I use both on a regular basis, VS for my job and XCode for hobby work. I prefer VS because it performs better when editing and navigating the code base ( it is actually faster to run in it inside VirtualBox than XCode natively ). Also VS has code navigation and editing features that XCode lacks. For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box. You can then populate the replace box with what you have in the clipboard or just type in what you want.
In XCode you need to copy the word to replace into the clipboard, do a Cmd+F, paste the word into the search box and then type in the replace box. This is much slower. In VS you can setup bookmarks in your code with Ctrl+F2 and jump between bookmarks by pressing F2. This is great when you need to have present multiple parts of the code base to accomplish some task.
I don't know how to do this in XCode. In VS you have a stack of source code windows that you can easily move about via Ctrl+W+n where n is the stack depth.
This is incredibly useful to navigate between multiple files.
Again, I don't know how to this without using the mouse in XCode. Then there are other issues with XCode mentioned by other comments like the incredibly confusing build settings and the instability of the IDE. I often wonder if Apple actually uses it to develop their software. |
> For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box.
Your workflow sounds nicer than Xcode's here. While I don't often use find+replace, I do use project level find constantly. My muscle memory shortcut for this is:
Cmd+C, Cmd+Shift+F, Cmd+V, Return
I'm pretty sure I use this hundreds of times a day. Especially when analysing unfamiliar code to trace its execution paths.
> Ctrl+F2 code bookmarks
These sound really cool. A bit like numbered unit groups in Starcraft.
The only similar mechanism in Xcode is quick open. Cmd+Shift+O then start fuzzy-typing the name of a file, method or declaration and hit return to jump to it in the editor (option+return for assistant editor). I have actually changed my quick open shortcut to Cmd+Shift+D because it's easier to trigger one-handed.
> In VS you have a stack of source code windows that you can easily move about via Ctrl+W+n
Unfortunately, while a stack of source locations is maintained in Xcode, you can't jump to a direct location within the stack.
What I do here is use Ctrl+Cmd+Left and Ctrl+Cmd+Right to navigate back and forward in the history stack for an editor window. So, for example, if you Cmd+Click a symbol to jump to its declaration, you can press Ctrl+Cmd+Left to go back.
The one thing I like about Xcode's version of this is that it keeps track of source locations rather than files or windows. So you actually navigate back/forward within the same file (if you were jumping around within the file) as well as between files.