3 ms·
Xcode has handled this for years. In Xcode, when autocompletion is presented, hitting Tab will complete the longest unique prefixed subword for the currently-se
by eridius 8y ago
Xcode has handled this for years. In Xcode, when autocompletion is presented, hitting Tab will complete the longest unique prefixed subword for the currently-selected tab item. If this results in only having one completion option left, then it completes the whole thing (e.g. adding method arguments and whatnot). Similarly, hitting Return will just complete the whole entry instead of the longest unique prefixed subword.
By that I mean if you have 2 autocompletion options `addDefaultFoo()` and `addDefaultBar()`, and you type `add` to get those options, hitting Tab will fill in `addDefault`, and then hitting Tab again will fill in the rest of the selection.
- mfoy_ 8y ago*nix shells typically do something very similar, where hitting tab auto-completes up to the first forking character
- function_seven 8y agoAfter recently binge-watching The Good Place, this comment rattled me :)
- ddalex 8y agoLol, I wasn't the only one! Which is The Good Place of computer languages?
- suvelx 8y agoLisp? Up front appears to be written with one thing in mind: Infuriate you with brackets. Then, once you've worked out how to deal with the brackets, it's pretty forking sweet.
- ZeikJT 8y agoNever seen The Good Place so I'm just trying to figure out what the frak you all are taking about.
- deleted 8y ago[deleted]
- beagle3 8y agoThe longest-unique-prefixed-subword is the completion that bash (and tcsh and many other shells) have had for ~30 years now. The non-uniques are listed on the 2nd tab.