Show how to set up fzf#vim#files with fzf#vim#with_preview

This commit is contained in:
Junegunn Choi
2017-03-13 19:42:16 +09:00
parent 2b69c15226
commit 2eaff04946
2 changed files with 8 additions and 11 deletions

View File

@@ -160,11 +160,6 @@ Global options~
Command-local options~
>
" [Files] Extra options for fzf
" e.g. File preview using coderay (http://coderay.rubychan.de/)
let g:fzf_files_options =
\ '--preview "(coderay {} || cat {}) 2> /dev/null | head -'.&lines.'"'
" [Buffers] Jump to the existing window if possible
let g:fzf_buffers_jump = 1
@@ -212,6 +207,10 @@ You can use autoload functions to define your own commands.
\ <bang>0 ? fzf#vim#with_preview('up:60%')
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
\ <bang>0)
" Likewise, Files command with preview window
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
<