From 79ffb696f8d81a22b88bb3e8e8af2cf2662da625 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Thu, 6 Jan 2022 22:54:35 -0500 Subject: [PATCH] Update project string grep keybindings Replace ps with telescope.builtin.live_grep for live project-wide searching, respecting .gitignore Re-map previous ps to fs --- lua/keybindings.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/keybindings.lua b/lua/keybindings.lua index f5f84ad..92a9e5e 100644 --- a/lua/keybindings.lua +++ b/lua/keybindings.lua @@ -19,8 +19,10 @@ map('t', '', '', options) -- Exit Terminal mode enter Normal map('n', 'nt', 'NERDTreeToggle', options) map('n', '', 'Telescope git_files', options) map('n', '', 'Telescope find_files', options) +-- Grep project file contents with live results, respecting .gitignore +map('n', 'ps', "lua require('telescope.builtin').live_grep()", options) -- Grep for prompted str project wide -map('n', 'ps', "lua require('telescope.builtin').grep_string({ search = vim.fn.input(\"Grep For > \")})", options) +map('n', 'fs', "lua require('telescope.builtin').grep_string({ search = vim.fn.input(\"Grep For > \")})", options) -- Telescope fuzzy search for buffers map('n', 'pb', "lua require('telescope.builtin').buffers()", options)