Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fzf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
fzf
Commits
02ceae15
Unverified
Commit
02ceae15
authored
8 years ago
by
Junegunn Choi
Browse files
Options
Downloads
Patches
Plain Diff
[vim] Download instruction for Windows
parent
e5147392
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugin/fzf.vim
+15
-8
15 additions, 8 deletions
plugin/fzf.vim
with
15 additions
and
8 deletions
plugin/fzf.vim
+
15
−
8
View file @
02ceae15
...
...
@@ -28,10 +28,12 @@ let g:loaded_fzf = 1
let
s:default_layout
=
{
'down'
:
'~40%'
}
let
s:layout_keys
=
[
'window'
,
'up'
,
'down'
,
'left'
,
'right'
]
let
s:fzf_go
=
expand
(
'<sfile>:h:h'
).
'/bin/fzf'
let
s:install
=
expand
(
'<sfile>:h:h'
).
'/install'
let
s:is_win
=
has
(
'win32'
)
||
has
(
'win64'
)
let
s:base_dir
=
expand
(
'<sfile>:h:h'
)
let
s:fzf_go
=
s:base_dir
.
'/bin/fzf'
let
s:fzf_tmux
=
s:base_dir
.
'/bin/fzf-tmux'
let
s:install
=
s:base_dir
.
'/install'
let
s:installed
=
0
let
s:fzf_tmux
=
expand
(
'<sfile>:h:h'
).
'/bin/fzf-tmux'
let
s:cpo_save
=
&
cpo
set
cpo
&
vim
...
...
@@ -42,6 +44,11 @@ function! s:fzf_exec()
let
s:exec
=
s:fzf_go
elseif
executable
(
'fzf'
)
let
s:exec
=
'fzf'
elseif
s:is_win
call
s:warn
(
'fzf executable not found.'
)
call
s:warn
(
'Download fzf binary for Windows from https://github.com/junegunn/fzf-bin/releases/'
)
call
s:warn
(
'and place it as '
.
s:base_dir
.
'\bin\fzf.exe'
)
throw
'fzf executable not found'
elseif
!
s:installed
&&
executable
(
s:install
)
&&
\
input
(
'fzf executable not found. Download binary? (y/n) '
)
=~
?
'^y'
redraw
...
...
@@ -246,7 +253,7 @@ function! fzf#wrap(...)
endfunction
function
!
fzf#
shellescape
(
path
)
if
has
(
'win32'
)
||
has
(
'win64'
)
if
s:is_win
let
shellslash
=
&
shellslash
try
set
noshellslash
...
...
@@ -263,7 +270,7 @@ try
let
oshell
=
&
shell
let
useshellslash
=
&
shellslash
if
has
(
'win32'
)
||
has
(
'win64'
)
if
s:is_win
set
shell
=
cmd
.
exe
set
noshellslash
else
...
...
@@ -307,7 +314,7 @@ try
let
prefer_tmux
=
get
(
g
:,
'fzf_prefer_tmux'
,
0
)
let
use_height
=
has_key
(
dict
,
'down'
)
&&
\
!(
has
(
'nvim'
)
||
has
(
'win32'
)
||
has
(
'win64'
)
||
s:present
(
dict
,
'up'
,
'left'
,
'right'
))
&&
\
!(
has
(
'nvim'
)
||
s:is_win
||
s:present
(
dict
,
'up'
,
'left'
,
'right'
))
&&
\
executable
(
'tput'
)
&&
filereadable
(
'/dev/tty'
)
let
use_term
=
has
(
'nvim'
)
let
use_tmux
=
(!
use_height &&
!
use_term
||
prefer_tmux
)
&&
s:tmux_enabled
()
&&
s:splittable
(
dict
)
...
...
@@ -317,7 +324,7 @@ try
endif
if
use_height
let
optstr
.=
' --height='
.
s:calc_size
(
&
lines
,
dict
.
down
,
dict
)
else
else
if
use_term
let
optstr
.=
' --no-height'
endif
let
command
=
prefix
.(
use_tmux ?
s:fzf_tmux
(
dict
)
:
fzf_exec
).
' '
.
optstr
.
' > '
.
temps
.
result
...
...
@@ -405,7 +412,7 @@ function! s:xterm_launcher()
\
&
columns
,
&
lines
/
2
,
getwinposx
(),
getwinposy
())
endfunction
unlet
!
s:launcher
if
has
(
'win32'
)
||
has
(
'win64'
)
if
s:is_win
let
s:launcher
=
'%s'
else
let
s:launcher
=
function
(
's:xterm_launcher'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment