fix: Adding the global flag to the FindandReplace custom function.

This commit is contained in:
Finch 2025-01-29 20:03:41 -06:00
parent 30238c883d
commit 87978e824b

View File

@ -1,7 +1,7 @@
vim.api.nvim_create_user_command('FindAndReplace', function(opts)
-- Update each quickfix location using substitute, update the files to save changes, close the opened buffers and close the quickfix window
-- TODO: Does not close the buffers opened through changes
vim.api.nvim_command(string.format('cdo s/%s/%s/', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
vim.api.nvim_command(string.format('cdo s/%s/%s/g', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
end, { nargs = '*' })
vim.api.nvim_set_keymap(