Is there a way to set custom collapsable code regions in Xcode - xcode

Is there a way to create custom collapsable code regions in Xcode similar to how Visual Studio can fold around #region/#endregion blocks?
It would be nice to throw all autogenerated content into a region that I can fold away until I need to look at it. #pragma mark doesn't seem to do the trick.

See: Xcode regions for a longer discussion, but the answer is, unfortunately, "not without an ugly hack."

Related

In Visual Studio Code, is it possible to Edit the MiniMap View with settings

I'm updating some legacy code, because of my unfamiliarity to it, Its very difficult to find structures, especially if I step away for a week for other projects.
To alleviate this problem I've gone back to my old-school roots and started adding ascii text-art as comments above sections of code, using this tool:
http://patorjk.com/software/taag/#p=display&h=3&v=1&f=Big%20Money-ne&t=Reveal%0ACheck
This allows me to see via my MiniMap the titles of functions or sections of code I might need to come back to
The Thought then occured.. well surely someone else has this problem, and since VSCode seems to be written by the community, maybe someone has already written a plugin that would search the code for function titles (like Javadocs?) and display the title in a readable size?
If not, would it be easily coded? i.e. is the minimap just a very shrunk down copy(not easy) or is it structured and can be parsed and tweaked?
As long as your language plugin supports it, you can use cmd + shift + o to go to function definition.
All functions should also be listed in the Side Bar under "Outline"

Is there an API for code editing in Cocoa?

I've been exploring various text editor solutions for Mac OS X recently, and I've noticed that some editors, namely Xcode, Smultron and CodeRunner, show the same behavior with bracket matching, which makes the matching bracket exhibit a small yellow popping animation that looked exactly the same throughout the editors. This made me think about whether there is a unified Cocoa API for code views that is being used. I have looked for something like that but I haven't found anything. Can someone enlighten me?
There is no unified Cocoa API for code views, no, or at least not that I am aware of. The yellow popping animation is just due to the Cocoa method -[NSTextView showFindIndicatorForRange:], which lots of different code editors use for producing that sort of effect. However, if you search stackoverflow you'll find some examples of how to do syntax coloring, bracket matching, etc. You might also find the source code in this project useful: https://github.com/MesserLab/SLiM. (Which happens to be a project I work on.)

Fix for Xcode's indiscernible highlighting of inline errors?

I can't be the only one that finds Xcode's method of "pointing out" where your mistakes are - ridiculous. As helpful and essential as the feature is.. it does not help to make the line I need to fix virtually impossible to read or edit... let alone see...
And don't get me started on the constant struggle to find a "selection" color that is visible, yet retains one's sanity/ability to see what the selected text actually IS!
What am I missing here? I know how to futz with the colors in xCode, I know how to mess with the Appearance "Control Panel", but it all just results in different configurations - of varying aesthetic quality - that are all hard to read... I don't have this issue in TextMate... Is that my answer?
UPDATE: Thanks to the brilliant work, and answer by #amadillu, here is what the remarkably more usable Xcode looks like after installing his Xcode 4 "Fix-Ins"
I've made an Xcode Plugin by using davekeck's "fixins" that allows you to customize the colors of the inline error and warning messages. This really helps if you use a dark scheme / background . See here.

XCode4 jump bar overcrowded

I'm using #pragma mark - Description all over my source code to use with the XCode4 Jump Bar. This is a pretty handy feature all most you already know.
But right now I'm having a big .h/.m file containing all my business logic classes (RMCategory, RMProduct, RMCountry, RMAddres, ...) and my jump list is starting to look overcrowded.
Is there any known way to disable some items in the jump list? Specifically, I'm looking into hiding the ivars from the .h jumplist. Is there some directive like #pragma hide ivars?
I've been trying to search other supported #pragmas specific to XCode but haven't been able to found anything apart from the classic // TODO, // FIXME et al.
OK, so I've been told by Apple staff at their dev forums that this was currently impossible. I've filed an enhancement proposal there.

How can I customize my Visual Studio panels to take less screenspace?

I'm using VS 2008 and I notice a lot of wasted screenspace, such as the Error List upgrade I propose below. Is there any way to change the way panels are rendered to make them smaller? Or maybe some addon to VS that does what it does but with compacted panels.
Current Error List - Only 2 errors visible
Future - 6 errors visible in same space
I don't know how to customize panels the way you're asking, but I've found my own way of dealing with panels I don't need all the time.
I keep panels like errors, search results or output set to Auto-Hide. That way they can take up a pretty decent amount of space when I want to see the lists, but they're not visible at all the rest of the time. Works well for me. When I'm not using one of those panels the only windows that are visible are the solution explorer and the code editor.
If you can afford more monitors, get them. You won't have to worry about auto-hide and you'll have enough room for it all.

Resources