QoL: highlighting and feeback

This commit is contained in:
Baipyrus 2024-07-03 12:42:34 +02:00
parent 197b1f4ca0
commit de146ec6de

View File

@ -102,8 +102,12 @@ local function global_cmd_yank()
-- Concat matches according to separator
local value = table.concat(extracted, outsep)
-- Trigger global search to highlight results
vim.cmd('g/' .. inexpr .. '/')
-- Write to system register
vim.fn.setreg('+', value)
print('Found ' .. #extracted .. ' results!')
end
vim.keymap.set({ 'n', 'v' }, '<leader>gy', global_cmd_yank, { desc = '[G]lobal command [Y]ank' })