For some reason Xcode identifies strings, methods, objects & more as plain text. This applies with all the themes Xcode has to provide me with. This is a C++ file.
Related
I tried to use Control-Command-Whatever Alphabet as the key equivalent for an NSButton. Xcode interface builder doesn't allow me to do that. I tried editing the xib file in an external editor, adding control="YES" into the <modifierMask> node. Once I open the xib file in Xcode, Xcode deletes control="YES" that I added previously. The only workaround seems to be doing it in code.
Is there any reason Xcode disallows using Control in key equivalent for an NSButton? Should I also avoid doing it in code if it may become a problem?
I am using Xcode 6.1 on Yosemite.
From the human interface guidelines:
As much as possible, avoid using the Control key. Because the Control key is already used by some of the universal access features—as well as in Cocoa text fields where Emacs-style key bindings are often used—it should be used as a modifier key only when necessary.
So, while the behavior of Xcode isn't very nice in this regard, it is probably just trying to enforce the guidelines. As you rightly say, you can work around it easily enough in code.
In our project there are two teams and are using different IDE for development (MyEclipse and Xcode). Is there any way to keep indentation similar in both the IDE, because when we are doing diff it's showing lots of changes only because of indentation.
If they are using the same code base, there should be no differences. If you are comparing copies of the same code base, maybe there are XCode settings that modify tabs when saving code. If you are using Windows with MyEclipse and OS X with XCode, maybe line endings get switched on save. There should be preferences for that, too. There are also preferences for formatting code on save, or you may have plug-ins for cleaning up code. Lastly, there is a preference for using spaces or tabs to indent code.
There are preferences for how code is displayed, such as how many spaces to use for tabs, but this doesn't affect the actual files. So, again, if the same code base is used then there should be no differences. Perhaps you could expand on what you are comparing with what, if this answer doesn't help.
Intellisense is fine in various Visual Studio editors (C#, VB...).
However, in various other cases, your typing productivity drops dramatically because Intellisense simply does not apply (XML without XSDs, simple text files).
Emacs and eclipse have a simple, generic answer to these situations: ALT+/ autocompletion.
By repetitively pressing ALT+/ the editor will cycle through word-completion suggestions.
ALT+/ has no concept of the target buffer syntax (it can be text) and will just handle words. The suggested words are filtered as matching the already typed characters in reverse appearance order.
Question:
Is there any way to emulate this shortcut in VS2012 (+Resharper 7.1) - or even previous versions for that matter?
My brain is now hardwired to use it and I feel like I've lost half of my fingers when I switch from eclipse to VS.
Caution:
I'm not asking for a way to import the full emacs set of shortcuts (as I'd prefer to avoid collisions and I want to stick to the standard VS shortcut culture for the rest of the IDE, mixing with resharper is hard enough).
I use Xcode with the key bindings heavily overriden to match my taste, for example, I use Alt+[/] as shortcuts for the "Jump to previous/next placeholder" commands. Unfortunately, with the latest 4.4.1 update these bindings stopped working and now I'm getting quote characters (“‘) dumped into the text editor instead. The binding setup is still marked as valid (no conflicts are reported by Xcode). Any thoughts on this?
OSX 10.7.4, Xcode 4.4.1 (4F1003), standard US layout, alu keyboard if that matters.
Ok, turns out there are multiple entries for the seemingly same function, as shown in the image below:
Setting both to the same binding did the trick.
I'm writing some documentation that will occasionally include C# or C++ code snippets.
In Visual Studio, the Edit/Copy command includes syntax coloring. You can see this if you paste the text into, e.g., Word or Outlook. In fact, if you use the "Paste Special..." command, you can see that it's "Rich Text (RTF)".
However, when pasting this text into an HTML file in Visual Studio, none of the colouring (or even formatting) is preserved.
Any ideas? I'm looking specifically for something that works locally (preferably in Visual Studio), not JavaScript-based solutions (such as SyntaxHighlighter).
There's an addin called CopySourceAsHtml which does a pretty neat job. I've used it a few times, but I use a Javascript to do the highlighting on my blog these days (so it's "plaintext readable").
You can use existing C to HTML syntax highlighter tools for converting your snippets into HTML and copy&pasting from there. Here's a list of such tools (not exhaustive and in no particular order):
GNU Enscript
GNU Emacs with htmlize.el module allows you to dump a highlighted Emacs buffer as HTML
There might also exist web services that allow you to copy&paste C code into a form and get highlighted HTML back.
I use this for highlighting code on webpages. It's simple to use and easy to extend.
http://code.google.com/p/syntaxhighlighter/
It also supports C#.