[preview] Clean up preview scripts

- Use preview.sh instead of preview.rb by default
- Try bat syntax highlighter with the highest priority
- Remove "-v" option as the latest version of fzf sets up $LINES
- Allow users to customize the preview command via $FZF_PREVIEW_COMMAND
  - *EXPERIMENTAL / EVOLVING / UNDOCUMENTED*
  - Should be a command template with {} placeholder expression
    - e.g. "nl {}"
This commit is contained in:
Junegunn Choi
2018-11-09 15:57:17 +09:00
parent b73d141b74
commit 0dbcfb28c4
4 changed files with 28 additions and 40 deletions

View File

@@ -185,10 +185,10 @@ command! -bang Colors
" Augmenting Ag command using fzf#vim#with_preview function
" * fzf#vim#with_preview([[options], preview window, [toggle keys...]])
" * For syntax-highlighting, Ruby and any of the following tools are required:
" - Bat: https://github.com/sharkdp/bat
" - Highlight: http://www.andre-simon.de/doku/highlight/en/highlight.php
" - CodeRay: http://coderay.rubychan.de/
" - Rouge: https://github.com/jneen/rouge
" - Bat: https://github.com/sharkdp/bat
"
" :Ag - Start fzf with hidden preview window that can be enabled with "?" key
" :Ag! - Start fzf in fullscreen and display the preview window above