mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +08:00
Show how to set up fzf#vim#files with fzf#vim#with_preview
This commit is contained in:
@@ -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)
|
||||
<
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user