mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-15 05:23:50 +00:00
QoL: highlighting and feeback
This commit is contained in:
parent
197b1f4ca0
commit
de146ec6de
@ -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