Skip to content

example configurations and mappings

Marco Hinz edited this page Nov 14, 2016 · 9 revisions

Example configuration

nnoremap <leader>g :Grepper -tool git<cr>
nnoremap <leader>G :Grepper -tool ag<cr>

nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)

let g:grepper = {}
let g:grepper.tools = ['git', 'ag', 'rg']
let g:grepper.jump = 1
let g:grepper.next_tool = '<leader>g'
let g:grepper.simple_prompt = 1
let g:grepper.quickfix = 0

Example mappings

Don't open the quickfix window and jump to the first match right away:

nnoremap <leader>g :Grepper -tool git -noopen -jump<cr>

Start searching the word under the cursor:

nnoremap <leader>* :Grepper -tool ag -cword -noprompt<cr>

Clone this wiki locally