Skip to content
Myr

[vim] Download instruction for Windows

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent e514739 · Browse files · 1 file+15 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+15 added−8 removed

  • other:+15 added−8 removed

1 file+15 added−8 removed

modified:plugin/fzf.vim+15 added-8 removed
26 unmodified lines
27let g:loaded_fzf = 12829let s:default_layout = { 'down': '~40%' }30let s:layout_keys = ['window', 'up', 'down', 'left', 'right']31let s:fzf_go = expand('<sfile>:h:h').'/bin/fzf'32let s:install = expand('<sfile>:h:h').'/install'31let s:is_win = has('win32') || has('win64')32let s:base_dir = expand('<sfile>:h:h')33let s:fzf_go = s:base_dir.'/bin/fzf'34let s:fzf_tmux = s:base_dir.'/bin/fzf-tmux'35let s:install = s:base_dir.'/install'36let s:installed = 034let s:fzf_tmux = expand('<sfile>:h:h').'/bin/fzf-tmux'3738let s:cpo_save = &cpo39set cpo&vim40
2 unmodified lines
43 if executable(s:fzf_go)44 let s:exec = s:fzf_go45 elseif executable('fzf')46 let s:exec = 'fzf'47 elseif s:is_win48 call s:warn('fzf executable not found.')49 call s:warn('Download fzf binary for Windows from https://github.com/junegunn/fzf-bin/releases/')50 call s:warn('and place it as '.s:base_dir.'\bin\fzf.exe')51 throw 'fzf executable not found'52 elseif !s:installed && executable(s:install) &&53 \ input('fzf executable not found. Download binary? (y/n) ') =~? '^y'54 redraw55 echo
196 unmodified lines
252 return opts253endfunction254255function! fzf#shellescape(path)249 if has('win32') || has('win64')256 if s:is_win257 let shellslash = &shellslash258 try259 set noshellslash260 return shellescape(a:path)
8 unmodified lines
269try270 let oshell = &shell271 let useshellslash = &shellslash272266 if has('win32') || has('win64')273 if s:is_win274 set shell=cmd.exe275 set noshellslash276 else277 set shell=sh
35 unmodified lines
313 endif314315 let prefer_tmux = get(g:, 'fzf_prefer_tmux', 0)316 let use_height = has_key(dict, 'down') &&310 \ !(has('nvim') || has('win32') || has('win64') || s:present(dict, 'up', 'left', 'right')) &&317 \ !(has('nvim') || s:is_win || s:present(dict, 'up', 'left', 'right')) &&318 \ executable('tput') && filereadable('/dev/tty')319 let use_term = has('nvim')320 let use_tmux = (!use_height && !use_term || prefer_tmux) && s:tmux_enabled() && s:splittable(dict)321 if prefer_tmux && use_tmux
1 unmodified line
323 let use_term = 0324 endif325 if use_height326 let optstr .= ' --height='.s:calc_size(&lines, dict.down, dict)320 else327 elseif use_term328 let optstr .= ' --no-height'329 endif330 let command = prefix.(use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result331
79 unmodified lines
411 \ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"),412 \ &columns, &lines/2, getwinposx(), getwinposy())413endfunction414unlet! s:launcher408if has('win32') || has('win64')415if s:is_win416 let s:launcher = '%s'417else418 let s:launcher = function('s:xterm_launcher')419endif
261 unmodified lines