Update init.lua

This commit is contained in:
chibs4 2024-10-10 18:01:45 +03:00 committed by GitHub
parent 766a88ad14
commit 71ccfc85bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -164,6 +164,12 @@ vim.opt.scrolloff = 10
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Set pasting from 0 register
vim.keymap.set('n', '<leader>p', '"0p')
-- Set deleting into nothing
vim.keymap.set('n', '<leader>d', '"_d')
vim.keymap.set('x', '<leader>d', '"_d')
-- Set highlight on search, but clear on pressing <Esc> in normal mode -- Set highlight on search, but clear on pressing <Esc> in normal mode
vim.opt.hlsearch = true vim.opt.hlsearch = true
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')