Skip to content

Commit

Permalink
Merge pull request #18 from chriserin/tighten-rg-mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarter authored May 28, 2022
2 parents e2808a7 + 4c4cb58 commit 370f4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/nvim/lua/core/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ M.ripgrep_mappings = function()
-- Grep project for selection with Rg
vmap { '<leader>gr', 'y :Rg "<CR>' }
-- Grep project for word under the cursor with Rg
nmap { '<Leader>gr :Rg', '<C-r><C-w><CR>' }
nmap { '<Leader>gr', ':Rg <C-r><C-w><CR>' }

-- alias for above
-- Grep project for selection with Rg
vmap { '<leader>rg', 'y :Rg "<CR>' }
-- Grep project for word under the cursor with Rg
nmap { '<Leader>rg :Rg', '<C-r><C-w><CR>' }
nmap { '<Leader>rg', ':Rg <C-r><C-w><CR>' }

-- Grep selection with Rg (excluding tests and migrations)
vmap { '<leader>gt', "y :Rg \" -g '!*/**/test/*' -g '!*/**/migrations/*'<CR>" }
Expand Down

0 comments on commit 370f4c2

Please sign in to comment.