jremmen / vim-ripgrep

Use RipGrep in Vim and display results in a quickfix list
MIT License
541 stars 99 forks source link

Clash with default FZF install #52

Open jackkinsella opened 4 years ago

jackkinsella commented 4 years ago

Hi, thanks for the plugin. Just upgrading from Ack vim.

Came across a namespace clash and I'd like to add a bit of information to help anyone else stumbling on the same issue.

By default, the fzf plugin also maps the command :Rg. A workaround from the fzf point of view is to make use of their optional prefix for their commands - let g:fzf_command_prefix = 'Fzf' and then call :FzfRg

I wonder if there's a way somehow avoid the clash by default by changing the vim-ripgrep internal code but without breaking your external API :Rg?

gennaro-tedesco commented 1 year ago

Another solution could be to expose the interface of the plugin functions so that the users can map them instead of using a command. For instance as shown here one could expose it as, say, <Plug>(vim-ripgrep#search) and users could

nnoremap ... <Plug>(vim-ripgrep#search)
:call <Plug>(vim-ripgrep#search)

instead of invoking :Rg all the times.