Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode autocompletion: Is it possible to suggest "NSString" when I typed "NSS"?

XCode suggest me "NSSet" when I typed "NSS". It is not very good for me. I use NSString quite often.
Is it possible to suggest "NSString" when I typed "NSS"?

like image 440
Voloda2 Avatar asked Feb 22 '23 16:02

Voloda2


1 Answers

Type NSString into the editor, select that and drag it with your mouse to Code Snippet Library (⌃⌥⌘2 if not open), then set its completion shortcut to something not used by Xcode, like "foo".

custom code snippet

Now every time you want to use NSString just type foo and Xcode will offer to auto-complete with NSString. It requires some time to get used to typing something else just like with macro Srikar suggested, but it doesn't add anything new to code itself.

BTW, related comic: http://i.imgur.com/YRRHc.png

like image 162
Filip Radelic Avatar answered Apr 07 '23 13:04

Filip Radelic