How to make Xcode auto-complete act like bash auto-completes file names - xcode

If I type UITa, then it might show an autocompletion of UITableViewDataSource. So I press enter and that's what I get. But what I wanted was UITableViewDelegate. If this was when we input the file name in the command line of bash, then it would have auto-completed up to UITableViewD, and then I would have to enter a to get an autocompletion for UITableViewDataSource, or e to get UITableViewDelegate.
Is there a way to make Xcode work like that, or another way to avoid this problem?

In my machine (XCode 3.2.3 on OS X 10.6.4) the auto-completion works exactly as you described you want to behave.
Typing
NSMut
shows something like
NSMutableArray
Note that NSMut, able, and Array are all displayed in a different color/font in XCode.
Typing D here to change the completion to NSMutableDictionary does not work, but hitting Enter or the right arrow key changes the selection up to
NSMutableArray
Hitting D here changes the completion to
NSMutableDictionary
If you want the possible list of auto-completions, just hit the escape key. Hitting escape key is the general way to get the list of completion in any Cocoa app on OS X. In any Cocoa text box you'll get the list of English words which matches the first few letters you typed.

Xcode autocompletion can be inconsistent. Workaround: After typing some characters, hit ESC and Xcode will pop up a scrollable list of completion options. Continue typing to narrow down the list. Use the up/down arrow keys to navigate the list. Hit return to complete using the selected text. This approach can be helpful when Xcode autocompletion is acting flaky.

Related

Mac OS option key shortcuts not working, how to make it work?

I have a very long line which I want to view as wrapped.
There is an option called word wrap that can help me achieve this.
Anyhow the shortcut method option + z doesn't work, instead inserts a ˀ there.
Any solutions?
Looks like one of your extension might be overriding your VSCode config. Try ⌘+SHIFT+P/CMD+SHIFT+P and then search for View: Toggle Word Wrap/Toggle Word Wrap.
You will then be able to see the shortcut assigned to that command on your local PC. Alternatively, ⌘+SHIFT+P/CMD+SHIFT+P and search for Keyboard Shortcuts. In there search for OPTION+z and check for the answers which pop up.

How to remove key binding for Jump To Next/Previous Counterpart in Xcode?

In most key bindings a small minus sign appears on the right to remove the binding, but with Jump to Next/Previous Counterpart it seems it is not possible to clear that one.
I want to use that key binding for a different command and I can't do it without removing it first.
When trying to delete those a small error message appears that says:
Can't delete the keyboard shortcut because it has alternate menu items
Any idea on how to get rid of those shortcuts?

Xcode 8 and 9: how to disable code completion when clicking "Tab"

I often use Xcode snippets which contain fields to fill (like <#time_interval#>), I jump between those fields with tabulator. Sometimes, when I fill a field with a word and click tab to jump to next field, Xcode automatically changes word to first suggestion from autocompletion dropdown, e.g. HelloWorld. I don't want to disable suggestions, I just want to disable completing my code on clicking tab. Is there a way to do so? I feel extremely dumb because I make iOS apps for over 7 years already and this setting drives me crazy. It should be something simple somewhere and I must have missed it over and over.
UPDATE for clarification (images):
Click tab and enter one field to fill it:
Type what you want to have there e.g. "literal" word:
Click tab again to pass onto next fillMe field. Expected result:
Actual result (instead of word "literal" you get Color Literal there which is the first position in autocompletion list):
You may use CMD+Z as a workaround - it will revert Xcode autocompletion and leave everything else as is.

How to enable OS X cmd+ctrl+space character menu in Sublime Text 2?

In most OS X apps, even the Terminal which otherwise seems to lack features, cmd+ctrl+space brings up a character menu, where you can type in the name and look for special characters (e.g. greek alphabet). In Sublime Text 2 this does not come up; I just get the bell sound. I tried the trick described Unmap ctrl+space in Sublime Text 3 of mapping the key to the empty command, but that did nothing. Anyone have an idea of how to enable the menu?
The default shortcut for this in ST2, of course, is alt+super+t, but I assume you are wanting to remap this, right?
If so, I looked pretty hard on this one, unfortunately, I couldn't find much to help. It is not a default command, and even if you look inside Packages/Default/Main.sublime-menu, right where the "Special Characters..." line should appear, it is conspicuously absent. Logging all commands in the console using sublime.log_commands(True) shows nothing when I open the special characters window this way.

Xcode's Change Case of Letter shortcut doesn't seem to work

In Preferences->Key Bindings->Text Key Bindings Xcode has a "Change Case of Letter" key binding. However, when I assign a shortcut to this binding and then attempt to utilize it to swap the case of a letter in one of my source code files, it doesn't seem to do anything.
I've tried positioning the cursor before and after the letter, and tried selecting the letter before triggering the assigned shortcut. Nothing seems to do anything.
Does anybody know what I might be doing wrong?
That had been a general AppKit text function, but was apparently removed several years ago. I'll update Xcode's text bindings to reflect it.
Instead, write a user script:
(source: mac.com)
and assign it whatever shortcut you want.

Resources