From c82c7decc0591dbaaa2661785d4fc0108f2a21f4 Mon Sep 17 00:00:00 2001 From: James Santucci Date: Wed, 22 Jan 2025 09:13:29 -0800 Subject: [PATCH] Bind a few more fzf keys - Resume previous search (I didn't know this was an option!) - Search in http-requests/ directory - Find files in http-requests/ directory http-requests/ directory is often gitignored for me, so it's handy to have a specific binding to search in it --- dotfiles/neovim/lua/fzf-config.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotfiles/neovim/lua/fzf-config.lua b/dotfiles/neovim/lua/fzf-config.lua index 298d04b..1586670 100644 --- a/dotfiles/neovim/lua/fzf-config.lua +++ b/dotfiles/neovim/lua/fzf-config.lua @@ -15,12 +15,17 @@ vim.api.nvim_set_keymap("n", "ff", ":FzfLua files", { noremap = vim.api.nvim_set_keymap("n", "fg", ":FzfLua git_files", { noremap = true, desc = "Choose git file" }) vim.api.nvim_set_keymap("n", "fs", ":FzfLua grep_project", { noremap = true, desc = "Search string in project" }) +vim.api.nvim_set_keymap("n", "fr", ":FzfLua resume", { noremap = true, desc = "Fzf resume" }) vim.api.nvim_set_keymap("n", "fls", ":FzfLua grep_last", { noremap = true, desc = "Repeat last search" }) vim.api.nvim_set_keymap("n", "fws", ":lua require('fzf-lua').live_grep({cwd='~/vimwiki'})", { noremap = true, desc = "Search in vimwiki" }) vim.api.nvim_set_keymap("n", "fwf", ":lua require('fzf-lua').files({cwd='~/vimwiki'})", { noremap = true, desc = "Search files in vimwiki" }) +vim.api.nvim_set_keymap("n", "fhs", ":lua require('fzf-lua').live_grep({cwd='./http-requests'})", + { noremap = true, desc = "Search in http-requests" }) +vim.api.nvim_set_keymap("n", "fhf", ":lua require('fzf-lua').files({cwd='./http-requests'})", + { noremap = true, desc = "Search files http-requests" }) -- make fzf the default select ui fzfLua.register_ui_select()