Commit Graph

12 Commits

Author SHA1 Message Date
Phong
dc4c4c2271 Use FZF_PREVIEW_LINES instead of LINES (#931)
Since fzf v0.18.0 FZF_PREVIEW_LINES is preferred over LINES
2020-01-14 14:07:14 +09:00
Junegunn Choi
206ec5efe9 Use --line-range and --highlight-line options of bat 2019-12-17 14:19:59 +09:00
ptzz
bce6588d24 Fix preview of paths starting with ~/ (#892) 2019-11-01 10:31:41 +09:00
Miguel Madrid Mencía
9b50e2fd5f Fix preview of symbolic links (#739) 2019-02-21 10:42:10 +09:00
Elisha Hastings
ad1833ecbc [preview] Use env to get bash (#737)
This wasn't working on NixOS due to bash not being under `/bin`. Using `env` should make it compatible with more setups.
2018-11-14 22:19:17 +09:00
Junegunn Choi
0dbcfb28c4 [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 {}"
2018-11-09 16:11:31 +09:00
Jongwook Choi
974d366b33 [preview] Use bat for syntax highlighting if available
In the preview.sh script (used when ruby is not installed),
`bat` (a clone of `cat` with syntax highlighting, etc.) can be
used for the sake of syntax highlighting. If bat is not available,
just fallback to the plain cat as before.

[bat]: https://github.com/sharkdp/bat
2018-11-09 16:11:31 +09:00
Junegunn Choi
009c58b481 Use $LINES instead of $FZF_PREVIEW_HEIGHT
Since 0.17.3, fzf exports $LINES and $COLUMNS to preview process.
FZF_PREVIEW_HEIGHT will be deprecated.
2017-12-09 23:22:24 +09:00
Jan Edmund Lazo
df79877245 [fzf#vim#preview] works with Windows default command (#441) 2017-09-04 22:50:37 +09:00
Junegunn Choi
d99169da2d Use FZF_PREVIEW_HEIGHT if available. Requires fzf 0.16.7.
Close #361
2017-04-30 12:06:41 +09:00
Junegunn Choi
f54ec7caf1 Do not preview binary files 2017-01-23 10:28:08 +09:00
alex
42086bee57 Add preview.sh for ruby-less previews. (#259) 2016-12-05 02:11:22 +09:00