mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-14 21:13:49 +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
|
||||
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' })
|
||||
|
Loading…
Reference in New Issue
Block a user