~pvsr/dotfiles

5ab20d15bece5edf6d148e8790aab3656f8aef51 — Peter Rice 11 months ago ac45f01
add denite grep binding
1 files changed, 18 insertions(+), 1 deletions(-)

M nvim/.config/nvim/plugins.toml
M nvim/.config/nvim/plugins.toml => nvim/.config/nvim/plugins.toml +18 -1
@@ 33,9 33,26 @@ function! s:denite_my_settings() abort
  \ denite#do_map('quit')
  nnoremap <silent><buffer><expr> i
  \ denite#do_map('open_filter_buffer')
  nnoremap <silent><buffer><expr> <Space>
  nnoremap <silent><buffer><expr> J
  \ denite#do_map('toggle_select').'j'
  nnoremap <silent><buffer><expr> K
  \ denite#do_map('toggle_select').'k'
endfunction

nnoremap <leader>* g*N:Denite grep:::\\b<c-r>/\\b<cr>
nnoremap <leader>fr :Denite file/rec<cr>
"""
hook_post_source = """
call denite#custom#var('file/rec', 'command',
  \ ['fd', '-H', '-t', 'f', '-E', '.git', '.'])

call denite#custom#var('grep', 'command', ['rg'])
call denite#custom#var('grep', 'default_opts',
  \ ['-i', '--vimgrep', '--no-heading'])
call denite#custom#var('grep', 'recursive_opts', [])
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
"""

# aesthetics