use more lua functions

This commit is contained in:
Oliver Hartmann 2022-10-05 11:59:35 +02:00
parent edc73d3639
commit 739b2154eb

View File

@ -28,7 +28,7 @@ vim.keymap.set('x', '>', '>gv')
local function hlWord()
local current_word = vim.call('expand','<cword>')
vim.fn.setreg('/', "\\<" .. current_word .. "\\>")
vim.api.nvim_command "set hlsearch"
vim.opt.hlsearch = true
end
-- Highlight word under cursor
vim.keymap.set('n', "'", hlWord, { noremap = true, silent = false })