Interactive completion for any ex-command.
Interacting with :edit |
Interacting with :Sym |
---|---|
It's super easy. Just pass the command you want to complete into the Complete
function. Just type in:
:call Complete('e')
To start interacting with the output from the edit
command. But typing out
:call Complete('...')
all the time isn't so great, so I highly suggest
setting up some mappings.
nnoremap <Leader>ke :call Complete('e')<CR>
nnoremap <Leader>kb :call Complete('b')<CR>
" for use with fuzzee (http://github.com/mattsacks/vim-fuzzee)
nnoremap <Leader>kf :call Complete('F')<CR>
nnoremap <Leader>kj :call Complete('F app/javascripts*')<CR>
Or whatever other mappings suit your fancy.
Just one so far!
call Complete('b', { 'maxheight': 20 })
This plugin was heavily inspired by
SkyBison and references some of it's
original source code. I wanted to take an alternative approach that didn't use
a chain of echo
commands to communicate the completions.
There's a lot of work and configuration left to be done with this plugin. Some ideas I have:
- Add a cursor and mappings for arrow keys
- Allow for number assignments for quick-access to results
- Customize position of the window
- Being able to tab through the list
The MIT License