Created
August 20, 2023 01:22
-
-
Save ewal/69767d2b1fefe219f26965a549babf23 to your computer and use it in GitHub Desktop.
neovim - prevent first jump when pattern matching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.keymap.set('n', '*', function() | |
vim.fn.setreg('/', '\\<' .. vim.fn.expand '<cword>' .. '\\>') | |
vim.opt.hlsearch = true | |
end, { silent = true }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment