As can be seen in the screenshot the editor in xcode has started to show linefeeds and tab characters, normally invisible characters. I can't for the life of me find a way to hide them again and i have no idea why they started to show. Any ideas?
Solved it, it was the bracket matching xcode plugin that caused it. Removing that restored order in the universe and xcode.
Related
I always have my Xcode assistant editor open with counterparts option. It's very handy to have an *.m file opened at standard editor while having corresponding *.h file in assistant editor.
After recent update to version 6.3 Xcode started to show random instead of corresponding headers quite often. Several clicks to "four squares" icon and mode usually brings it back (but it's very annoying).
Do you experience this too? How to fix it?
Note: deleting DerivedData didn't helped
As a workaround, one could use the Reset Editor command with the keyboard shortcut Command+Option+Shift+Z (US keyboard layout). If your keyboard layout doesn't match, you can see the key binding in View->Assistant Editor->Reset Editor. A word of caution, though, this will close any additional Assistant Editors you may have opened (the ones that open by clicking "+").
Another thing I noticed is the bug happens when you are switching Xcode windows or tabs but not when you are switching files within the same tab.
It looks like it's a just bug after all. I filed a bug report rdar://20684654. For a workaround see the accepted answer.
UPDATE: it's fixed in Xcode 6.4 beta
I am editing a Makefile in XCode. How do I actually insert a tab character, ASCII value 9? If I press TAB, it inserts 4 spaces, and make complains because decades ago the creator of make had a handful of users and didn't want to change the program to not require literal tabs because it would break backwards compatibility or something.
Normally when editing a Makefile I just copy and paste an existing TAB character, but with a new clean one, I cannot do this.
In Xcode 6.4, at least, you can enter a literal tab with Option-Tab. This seems to work regardless of the indentation settings.
You could just change your editing preference is Xcode to use tabs while editing a makefile
Easier than messing about moving to other editors and pasting literals.
close the file in Xcode
open the file in TextEdit
be sure to check the "Ignore rich text commands" at the bottom of the open dialog
position the cursor at the beginning of a line and push TAB
close TextEdit
open the file in Xcode
select "Show Invisibles" from the "Editor" menu
note that ironically, the TABs are not displayed
however, spaces are displayed, which allows you to tell which lines start with tabs
copy the tab character as needed
If you ever meet that guy who that who thought that starting a line with a TAB was a good idea, slap him upside the back of the head, and slap him hard!!!
I've taken to opening a TextEdit, placing a TAB there, then copying + pasting it into XCode.
For some reason Xcode 4.5 and 4.4.1 have both stopped displaying indented text at the proper level if there are more than three Tab characters of leading whitespace on the lines.
Easier to show than describe:
There are five leading tabs on the line the arrow is pointing to, but Xcode is drawing it as if there were only three. Using the left and right arrow keys confirms the Tabs are there.
I have deleted the derived data associated with my projects, deleted the project.xcworkspace file and xcuserdata directories within the project package, mucked around with various combinations of Indentation settings in Xcode's Preferences, all to no avail.
Newly created projects exhibit the same behavior. Changing the Source Editor font preferences have no effect either. This is in OS X 10.8.1.
Help -- my brain can't understand the code when it doesn't "look right"! What else can I try?
So, I filed a Radar, then heard back from a friend of mine who was having the same problem. Are you using the new SourceCode Pro font from Adobe? Your screenshot makes it look like you might be. Try switching back to a different theme and restarting Xcode? That's what I did, and it seems to be fine.
Eventually I removed (after quitting Xcode) the entire UserData folder in ~/Library/Developer/Xcode and that seems to have fixed the problem.
Hopefully it won't take more than another half hour to restore all the key equivalents and syntax coloring that I am accustomed to.
Leaving the question 'alive' in case it happens to someone else.
TextMate has one irritating 'feature' that shows up when editing lot of files (within a given project). in case there is no place at tab bar for new tabs, a ">>" is shown. it simply shows a popup with rest of files. that's ok, but why when one selects a file its tab is not visible? isn't it kind of iconsistency? what is more irritating here, tabs are not shown in this case even when navigating through "Next File Tab" or "Prev File Tab".
is there any way of enabling "scrollable" tabs bar or it's just "feature, not a bug" ?
This is just a byproduct of TextMate's tab-handling code (which is believe is custom-written for TextMate). I wouldn't call it a "feature" nor a "feature, not a bug", because I think it is a bug, just one that hasn't been fixed yet (development TextMate 1.x has been rather stagnant for the past couple of years). But I don't think there are any plugins that fix the bug and enabled a scrolling tab pane.
In Visual Studio 2008, it seems that when I tab on a line it inserts either 4 spaces or a tab, however - when I backspace it removes a tab as if it were 4 spaces, one space at a time..
I checked the text-editor settings in Tools.. tried both use spaces and use tabs, neither seem to work.
Any ideas?
Thanks in advance.
Pete
Maybe I'm just crazy, but why don't you just press Shift + Tab instead of backspace if you want to get rid of the tabs?
Aha!! Hi Robert, that's what I did try.. However, I needed to change this setting in the 'All Languages' section so it applied to every type of page.
"Keep tabs"
Thanks
Pete
Well it's probably not writing tabs its converting tabs to spaces when you press tab. There is a setting in the options that tells VS how many spaces to insert when pressing tab, Maybe you can set it to actually insert a tab instead and backspace would then remove the tab. I've heard it's quite common to use spaces not tabs that's why its built into VS i guess.