Add :Rg[!] command
:Rg <STRING> grep for the string and fuzzy find the results, bang to enable regex in search term
This commit is contained in:
parent
ba4e6dc233
commit
d92a312992
@ -83,3 +83,13 @@ end, {
|
|||||||
-- TODO: :Chmod
|
-- TODO: :Chmod
|
||||||
|
|
||||||
-- TODO: :Mkdir
|
-- TODO: :Mkdir
|
||||||
|
|
||||||
|
-- :Rg <STRING> grep for the string and fuzzy find the results, bang to enable
|
||||||
|
-- regex in search term
|
||||||
|
vim.api.nvim_create_user_command('Rg', function(opts)
|
||||||
|
local grep_opts = { search = opts.args }
|
||||||
|
if opts.bang then
|
||||||
|
grep_opts['use_regex'] = true
|
||||||
|
end
|
||||||
|
require('telescope.builtin').grep_string(grep_opts)
|
||||||
|
end, { bang = true, nargs = '*' })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user