aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md38
1 files changed, 37 insertions, 1 deletions
diff --git a/README.md b/README.md
index 752bf7b..6b836af 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ While in `fzf`:
In `visrc.lua`:
```lua
-plugin_vis_open =require('plugins/vis-fzf-open/fzf-open')
+plugin_vis_open = require('plugins/vis-fzf-open/fzf-open')
-- Path to the fzf executable (default: "fzf")
plugin_vis_open.fzf_path = (
@@ -28,3 +28,39 @@ plugin_vis_open.fzf_path = (
-- Arguments passed to fzf (default: "")
plugin_vis_open.fzf_args = "-q '!.class ' --height=40%"
```
+
+Complex example for `plugin_vis_open.fzf_args`:
+
+```lua
+my_fzf_args = string.gsub([[
+ --bind=$my_fzf_key_bindings \
+ --color fg:242,bg:236,hl:65,fg+:15,bg+:239,hl+:108 \
+ --color info:108,prompt:109,spinner:108,pointer:168,marker:168 \
+ --delimiter / --nth -1 \
+ --height=70% \
+ --inline-info \
+ --no-mouse \
+ --preview-window=up:70% \
+ --preview="(
+ bat --style=changes,grid,numbers --color=always {} ||
+ highlight -O ansi -l {} ||
+ coderay {} ||
+ rougify {} ||
+ cat {}
+ ) 2> /dev/null | head -1000"
+]],
+'%$([%w_]+)', {
+ my_fzf_key_bindings=table.concat({
+ "alt-j:preview-down",
+ "alt-k:preview-up",
+ "ctrl-f:preview-page-down",
+ "ctrl-b:preview-page-up",
+ "?:toggle-preview",
+ "alt-w:toggle-preview-wrap",
+ "ctrl-z:clear-screen"
+ }, ",")
+})
+
+-- Arguments passed to fzf (default: "")
+plugin_vis_open.fzf_args = my_fzf_args
+```