mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
QoL: highlighting and feeback
This commit is contained in:
parent
5e2cd283e5
commit
b47664f0ec
@ -102,8 +102,12 @@ local function global_cmd_yank()
|
|||||||
|
|
||||||
-- Concat matches according to separator
|
-- Concat matches according to separator
|
||||||
local value = table.concat(extracted, outsep)
|
local value = table.concat(extracted, outsep)
|
||||||
|
-- Trigger global search to highlight results
|
||||||
|
vim.cmd('g/' .. inexpr .. '/')
|
||||||
-- Write to system register
|
-- Write to system register
|
||||||
vim.fn.setreg('+', value)
|
vim.fn.setreg('+', value)
|
||||||
|
|
||||||
|
print('Found ' .. #extracted .. ' results!')
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>gy', global_cmd_yank, { desc = '[G]lobal command [Y]ank' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>gy', global_cmd_yank, { desc = '[G]lobal command [Y]ank' })
|
||||||
|
Loading…
Reference in New Issue
Block a user