23
12
I've recently fallen in love with efficient text completion systems. One of my favourite kinds of completion is so-called fuzzy completion. This is a mode where the program will complete the user's input based on only a couple of characters that can occur 'anywhere' (almost) in the file name or path. This feature exists at least for these programs:
- TextMate
- Vim Command-T plugin https://github.com/wincent/Command-T
- Vim completion system https://github.com/Shougo/neocomplcache
- Various modern IDEs
Usage example of this mode in a text editor:
User is trying to complete the word longWordNameThatTheyDontWantToWriteByHand, and they can do so by typing e.g. the first letter and some of the capital case letters. So typing lwnt could complete to the whole word.
My question is: is there a mode or something similar that I could use with the zsh shell?
1I just found a bug: doesn't work for filenames with spaces, given you're typing anything after the space ☹ I.e.
stack install && vlc ~/Music/erf
doesn't complete tostack install && vlc ~/Music/FGFC820\ -\ Perfect\ War.mp3
. – Hi-Angel – 2016-08-28T19:44:43.4335@Hi-Angel hey, thanks for bumping this. I actually use
'r:|?=** m:{a-z\-}={A-Z\_}'
now, which is a bunch simpler, and doesn't suffer from the problem you describe. – PythonNut – 2016-09-01T23:05:12.593That's great! Maybe you could make a plugin with this code. Just so that it's easier to find. – Julien__ – 2018-11-26T01:13:23.410