3 ms·
Try mapping it to `:set hlsearch!`. That way you can use the same mapping to toggle it on and off as you wish. EDIT: Also, you can use vim.keymap.set, no need
by Graziano_M 4y ago
Try mapping it to `:set hlsearch!`. That way you can use the same mapping to toggle it on and off as you wish.
EDIT: Also, you can use vim.keymap.set, no need for a vim command, just `vim.keymap.set("n", "<c-c>", "<cmd>set hlsearch!<CR>", {silent = true})`