diff --git a/README.md b/README.md index 13580d6..e4411f4 100644 --- a/README.md +++ b/README.md @@ -133,12 +133,6 @@ let g:fzf_history_dir = '~/.local/share/fzf-history' #### Command-local options ```vim -" [Files] Extra options for fzf -" e.g. File preview using Highlight -" (http://www.andre-simon.de/doku/highlight/en/highlight.html) -let g:fzf_files_options = - \ '--preview "(highlight -O ansi {} || cat {}) 2> /dev/null | head -'.&lines.'"' - " [Buffers] Jump to the existing window if possible let g:fzf_buffers_jump = 1 @@ -187,6 +181,10 @@ command! -bang -nargs=* Rg \ 0 ? fzf#vim#with_preview('up:60%') \ : fzf#vim#with_preview('right:50%:hidden', '?'), \ 0) + +" Likewise, Files command with preview window +command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, fzf#vim#with_preview(), 0) ``` Mappings diff --git a/doc/fzf-vim.txt b/doc/fzf-vim.txt index e325553..d8c5266 100644 --- a/doc/fzf-vim.txt +++ b/doc/fzf-vim.txt @@ -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. \ 0 ? fzf#vim#with_preview('up:60%') \ : fzf#vim#with_preview('right:50%:hidden', '?'), \ 0) + + " Likewise, Files command with preview window + command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, fzf#vim#with_preview(), 0) <