1 " zsh file completion caller
2 " Maintainer: Sergey Matveev <stargrave@stargrave.org>
3 " License: GNU General Public License version 3 of the License or later
5 if exists("g:loaded_zshfe") | finish | endif
7 if !exists("g:zshfe_path") | let g:zshfe_path=expand("~/.vim/plugin/zshfe.zsh") | endif
9 function! s:zshfe(query, opencmd)
10 silent let result = systemlist(g:zshfe_path . " " . a:query)
11 if len(result) == 0 | return | endif
12 exec a:opencmd . " " . result[0][:-2]
15 command! -nargs=1 Fe call s:zshfe(<f-args>, "edit")
16 command! -nargs=1 Fsp call s:zshfe(<f-args>, "split")
17 command! -nargs=1 Fvs call s:zshfe(<f-args>, "vsplit")
20 nmap <Leader><space> :Fsp