aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeeBak Kim <jeebak.kim@gmail.com>2020-01-03 14:36:01 -0800
committerMatěj Cepl <mcepl@cepl.eu>2021-01-16 14:28:43 +0100
commiteba2a82d060ba64a8b69b1026a8cea09bb066731 (patch)
tree69d3010d460a1a5260c884b4e3a0bc6effd54610
parent4ffa9989c4546c0696edeed8668baac245648973 (diff)
downloadvis-fzf-open-eba2a82d060ba64a8b69b1026a8cea09bb066731.tar.gz
Add mapping example to README
-rw-r--r--README.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 6b836af..e82f909 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,11 @@ plugin_vis_open.fzf_path = (
)
-- Arguments passed to fzf (default: "")
plugin_vis_open.fzf_args = "-q '!.class ' --height=40%"
+
+-- Mapping configuration example
+vis.events.subscribe(vis.events.INIT, function()
+ vis:command('map! normal <C-p> :fzf<Enter>')
+end)
```
Complex example for `plugin_vis_open.fzf_args`:
@@ -48,8 +53,7 @@ my_fzf_args = string.gsub([[
rougify {} ||
cat {}
) 2> /dev/null | head -1000"
-]],
-'%$([%w_]+)', {
+]], '%$([%w_]+)', {
my_fzf_key_bindings=table.concat({
"alt-j:preview-down",
"alt-k:preview-up",