feat: add shortcuts for global grep search

This commit is contained in:
Stefan Imhoff
2023-08-20 08:22:00 +02:00
parent 3d57a5a26d
commit c16cb3181a
3 changed files with 10 additions and 1 deletions

View File

@@ -201,5 +201,9 @@ alias cpg copilot_git-assist
alias cpgh copilot_github-assist
alias wts copilot_what-the-shell
# Nvim
alias :GoToFile "nvim +GoToFile"
alias :Grep "nvim +Grep"
# Prompt
starship init fish | source

View File

@@ -4,7 +4,11 @@ if not vim.loop.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
vim.cmd([[command! -nargs=0 GoToFile :Telescope find_files]])
vim.cmd([[command! -nargs=0 GoToCommand :Telescope commands]])
vim.cmd([[command! -nargs=0 Grep :Telescope live_grep]])
require("lazy").setup({
spec = {

View File

@@ -61,7 +61,8 @@ config.keys = {
{ key = "[", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2p" }) },
{ key = "]", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2n" }) },
{ key = "d", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2d" }) },
{ key = "f", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2O" }) },
{ key = "f", mods = "CTRL|ALT", action = wezterm.action({ SendString = ":Grep\n" }) },
{ key = "f", mods = "CTRL|ALT|SHIFT", action = wezterm.action({ SendString = "\2O" }) },
{ key = "g", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2G" }) },
{ key = "h", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2p" }) },
{ key = "i", mods = "CTRL|ALT", action = wezterm.action({ SendString = "\2i" }) },