Skip to content

Commit

Permalink
feat: new defaults for preview line up|down (#1150)
Browse files Browse the repository at this point in the history
Use `alt-shift-{up|down}` to scroll the preview by line
  • Loading branch information
ibhagwan committed Apr 28, 2024
1 parent fcd0853 commit 7a2d984
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions lua/fzf-lua/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,33 @@ M.defaults = {
},
keymap = {
builtin = {
["<F1>"] = "toggle-help",
["<F2>"] = "toggle-fullscreen",
["<F1>"] = "toggle-help",
["<F2>"] = "toggle-fullscreen",
-- Only valid with the 'builtin' previewer
["<F3>"] = "toggle-preview-wrap",
["<F4>"] = "toggle-preview",
["<F5>"] = "toggle-preview-ccw",
["<F6>"] = "toggle-preview-cw",
["<S-down>"] = "preview-page-down",
["<S-up>"] = "preview-page-up",
["<S-left>"] = "preview-page-reset",
["<F3>"] = "toggle-preview-wrap",
["<F4>"] = "toggle-preview",
["<F5>"] = "toggle-preview-ccw",
["<F6>"] = "toggle-preview-cw",
["<S-down>"] = "preview-page-down",
["<S-up>"] = "preview-page-up",
["<M-S-down>"] = "preview-down",
["<M-S-up>"] = "preview-up",
},
fzf = {
["ctrl-z"] = "abort",
["ctrl-u"] = "unix-line-discard",
["ctrl-f"] = "half-page-down",
["ctrl-b"] = "half-page-up",
["ctrl-a"] = "beginning-of-line",
["ctrl-e"] = "end-of-line",
["alt-a"] = "toggle-all",
["ctrl-z"] = "abort",
["ctrl-u"] = "unix-line-discard",
["ctrl-f"] = "half-page-down",
["ctrl-b"] = "half-page-up",
["ctrl-a"] = "beginning-of-line",
["ctrl-e"] = "end-of-line",
["alt-a"] = "toggle-all",
-- Only valid with fzf previewers (bat/cat/git/etc)
["f3"] = "toggle-preview-wrap",
["f4"] = "toggle-preview",
["shift-down"] = "preview-page-down",
["shift-up"] = "preview-page-up",
["f3"] = "toggle-preview-wrap",
["f4"] = "toggle-preview",
["shift-down"] = "preview-page-down",
["shift-up"] = "preview-page-up",
["alt-shift-down"] = "preview-down",
["alt-shift-up"] = "preview-up",
},
},
actions = {
Expand Down

0 comments on commit 7a2d984

Please sign in to comment.