nvim mappings

This commit is contained in:
thek4n 2024-01-30 11:21:40 +03:00
parent 5b4a3096b6
commit 668d4f2b94
2 changed files with 14 additions and 2 deletions

View File

@ -19,8 +19,16 @@ map('n', '<Leader>h/',
function() vim.opt.hlsearch = not vim.opt.hlsearch["_value"] end,
{desc = "Toggle search highlighting"})
-- enable search highlight in search mode
map('n', '/', ':set hlsearch<CR>/')
-- copy selection to search line
map('v', '<C-f>', '"fy:set hlsearch<CR>/<C-r>f<CR>')
-- copy selection to command line
map('v', ':', '"fy:<C-r>f<C-b>')
map('n', '<Leader>hl', create_function_tabdo('lua toggle_number_style()'),
{desc = "Toggle line number style"})

View File

@ -1,6 +1,10 @@
return {
'karb94/neoscroll.nvim',
config = function()
require('neoscroll').setup()
require('neoscroll').setup({
mappings = {'<C-u>', '<C-d>', '<C-b>',
'<C-y>', '<C-e>', 'zt', 'zz', 'zb'},
respect_scrolloff = false,
})
end
}