local m = require("utility.mappings") local vim = require("vim") local cmd = vim.cmd local g = vim.g g.fzf_layout = { up = '~90%', window = { width = 0.8, height = 0.8, yoffset = 0.5, offset = 0.5 } } cmd[[let $FZF_DEFAULT_OPTS = '--layout=reverse --info=inline']] -- Customize the Files command to use ripgrep which respects .gitignore files cmd[[ command! -bang -nargs=? -complete=dir Files \ call fzf#run(fzf#wrap('files', fzf#vim#with_preview({ 'dir': , 'sink': 'e', 'source': 'rg --files --hidden' }), 0)) ]] -- Add an AllFiles variation that shows ignored files too cmd[[ command! -bang -nargs=? -complete=dir AllFiles \ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({ 'dir': , 'sink': 'e', 'source': 'rg --files --hidden --no-ignore' }), 0)) ]] m.keymap("n", "f", ":Files") m.keymap("n", "F", ":AllFiles") m.keymap("n", "b", ":Buffers") m.keymap("n", "h", ":History") m.keymap("n", "r", ":Rg") m.keymap("n", "R", ":Rg", { silent = false }) m.keymap("n", "gb", ":GBranches")