How can I make code completion case-sensitive?
How can I make Ctrl-k kill the content of the line and the new line character?
How can I make backspace always delete only one character, no matter what it is? Right now, it deletes spaces in chunks equal to my indent level.
How to change the indentation style in file templates? I like to have the opening brace on its own line.
How can I make the font aliased?
I'm using Xcode 3.2.2.
EDIT: Issues 2, 4, and 5 are solved. 1 and 3 are still open.
EDIT2: ad.3. Yes, I set Xcode to use spaces, not tabs.
3.
Look in Preferences : Key Bindings : Text Key Bindings : Indent Friendly Delete Backwards
If the delete key is mapped to this entry change it to plain Delete Backwards.
2.
In that same preference area, you can see that there is no delete line option to map ^k to.
How can I make code completion case-sensitive?
I don't think that's possible.
How can I make Ctrl-k kill the content of the line and the new line character?
I can't answer that one, you might need to write a script to do it.
How can I make backspace always delete only one character, no matter what it is? Right now, it deletes spaces in chunks equal to my indent level.
Backspace always deletes one character. It sounds like your file has tab characters in it, each one of which takes up the space of 4 spaces by default. You can tell Xcode to use spaces instead by de-selecting Tab key inserts tab, not spaces in the Indentation preference panel.
How to change the indentation style in file templates? I like to have the opening brace on its own line.
You need to create custom file templates. You can find the Xcode templates here:
/Developer/Library/Xcode/Templates/File Templates
You need to copy the appropriate templates to this location:
~/Library/Application Support/Developer/Shared/Xcode/File Templates
You can then edit the template files to use whatever indents you like.
How can I make the font aliased?
You need to use a font that has aliased characters. Try Monaco at 9 or 10 points.
Related
I would like to use Xcode editor instead of others for swift typing but I am missing basic functionality of deleting whitespace backward.
Normally in the world of code editors, you just press option + backspace or something similar and thats it, it deletes whitespace just until next character starts, eating new line in the way as everyone needs.
But xCode is doing some wired unusable staff and is deleting not just whitespace and new line, but also part of text on previous line, until it considers some character start of word, basically making it unusable.
I don't need to know how to use "Delete subword backward" !
All key bindings can be edited in Xcode -> Preferences -> Key Bindings.
By default the combination you're interested in is assigned to something like Delete Subword Forward. Just remove the combination from the action that you don't need and add it to the action called Delete Forward (or whatever action you're looking for, it's not very clear).
To add a key binding you double click on existing Key value, click +, press Option+Backspace, click somewhere outside the field to save new value.
Very close to reverse of this question. I prefer coding with 2-whitespace indentation, but need to have files indented with tabs to align with project convention. What I would like to do is preferably automatically convert 2 spaces upon entry to tab symbol in Notepad++ and have the editor configured to tab length of 2.
A possible manual way for doing this could be Edit->Blank Operations->Space to TAB but this converts all of my spaces to tabs, even those of length 1 - which are, for example, spaces between function arguments, not just leading spaces.
In a perfect case scenario I'm trying to achieve formatting style as described in this question, but with typing just spaces and the editor taking care of the rest.
I'm on Notepad++ 6.0, but willing to upgrade if this helps
Let me complete the answer of Ari Okkonen to add a workaround to the problem commented by Sergii Zaskaleta of mixed tabs and spaces at the beginning of the line.
Settings->Preferences->Tab Settings->Tab size: 2 (if not already)
Edit->Blank Operations->Space to TAB (Leading)
Select a block of lines of text with the problem of mixed spaces and tabs. Press [Tab] and [Shift]+[Tab] to add and remove a tab from each line. In the process, the leading spaces had been converted to tabs.
A manual way that seems to work: After having edited the file before saving you may try (Works in Notepad++ v6.8.3):
Settings->Preferences->Tab Settings->Tab size: 2 (if not already)
Edit->Blank Operations->Space to TAB (Leading)
I use a text file (History.txt) for notes and to keep track of my edits. Xcode 6 is applying the indentation rules to all files, and so manual formatting (using tabs) in my text file is changed when I type a line or copy and paste. For example, typing a semicolon causes a line with leading whitespace to left justify. Prior versions of Xcode didn't do this.
I must have autoindent on for my source code files.
How can I tell Xcode 6 to leave my .txt files alone (no auto indent)?
I had the exact same problem. Didn't find a proper solution, but a workaround is to turn off the auto-indent feature (under Preferences -> Text Editing -> Indentation) for the specific characters that you use a lot in your text files (in my case the colon character was the main culprit) and that you can learn to live without having auto-indent when actually editing code. It's a decent way to get around this problem.
I have to submit an assignment and they want all the indents to be 3 spaces. I don't know how to change the settings of Astyle.dll so that it will change them 3 spaces instead of the default 4. Any ideas?
Also, Astyle seems to like having no indent between switch() and its cases, and I need there to be an indent there. Any ideas?
All of Astyle's settings are exposed in the Code::Blocks editor settings dialog. To access them, open the Settings menu, click Editor, and scroll through the sidebar to find the Default code entry.
I have to submit an assignment and they want all the indents to be 3 spaces.
Switch to the Indentation tab, found under Source Formatter in the sidebar, and change Indentation size (in spaces): to 3.
Also, Astyle seems to like to have no indent between switch() and its cases, and i need there to be an indent there.
If I understand what you need correctly, check the box that says Indent switches (keyword case:) and check the box that says Indent case: statement in switches (commands under case:).
You can change any other settings you want as well. When you're done, hit OK, then reformat your code and make sure the settings are set the way you want them.
is there a way to have Xcode append a closing bracket ")" when I type the opening one "("? I know that it does this for those {}. I really miss Textmate :( A generic way to define which chars should be automatically inserted when the opening ones are entered would be kickass.
In Xcode 3.1 go to Preferences->Indentation
Check Syntax-ware indenting to on
and check Automatically insert closing "}"
and choose the characters you want to be inserted when the opening one is.
Also why not use Textmate nothing stops you and Xcode will notice if a file is edited externally
Have a look under Edit->Insert Text Macro->Objective C->Bracket Expression. This will insert a matched pair of brackets (or if you have something highlighted, put brackets around it). You could bind this to [ as a keyboard shortcut.
You can follow the instructions here to create one for parentheses. I tried but couldn't make it work.
http://cocoawithlove.com/2008/06/hidden-xcode-build-debug-and-template.html#textmacros
Personally, I drag the classes folder over to Textmate and edit there. I switch back to Xcode when I need to type in some long method name, or to build. I've been building a library of snippets for some of the common things I do in Textmate to make life easier there.