From f9c743becb9896742d0c152b8e9a03cbabb3beab Mon Sep 17 00:00:00 2001 From: Szymon Szeliga Date: Tue, 15 Jan 2019 09:57:59 +0100 Subject: [PATCH] Change Rg function to be global It allows for mappings in vimrc such as: map a :call Rg(expand("")) --- plugin/vim-ripgrep.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim index 9bc029d..85d2278 100644 --- a/plugin/vim-ripgrep.vim +++ b/plugin/vim-ripgrep.vim @@ -28,7 +28,7 @@ fun! g:RgVisual() range call s:RgGrepContext(function('s:RgSearch'), '"' . s:RgGetVisualSelection() . '"') endfun -fun! s:Rg(txt) +fun! g:Rg(txt) call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt)) endfun