refactor(nvim): use vim.keymap.set for neovide maps

This commit is contained in:
Price Hiller 2024-02-26 23:38:22 -06:00
parent 368221a1e9
commit f4e81c6a92
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -19,14 +19,14 @@ vim.keymap.set("c", "<D-v>", "<C-R>+", { noremap = true, silent = true }) -- Pas
vim.keymap.set("i", "<D-v>", '<ESC>l"+Pli', { noremap = true, silent = true }) -- Paste insert mode
vim.keymap.set('t', '<D-v>', '<C-\\><C-n>"+Pi', { noremap = true, silent = true }) -- Paste terminal mode
vim.api.nvim_set_keymap("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.keymap.set("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
vim.keymap.set("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.keymap.set("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })
-- Next/prev tabs
vim.api.nvim_set_keymap("n", "<D-x>", ":tabnext<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<D-z>", ":tabprevious<CR>", { noremap = true, silent = true })
vim.keymap.set({ "", "!", "v", "t" }, "<D-x>", "<cmd>tabnext<CR>", { noremap = true, silent = true })
vim.keymap.set({ "", "!", "v", "t" }, "<D-z>", "<cmd>tabprevious<CR>", { noremap = true, silent = true })
-- Spawn new terminal in new tab
vim.api.nvim_set_keymap("n", "<D-t>", ":tabnew | terminal<CR>", { noremap = true, silent = true })
vim.keymap.set({ "", "!", "v", "t" }, "<D-t>", "<cmd>tabnew | terminal<CR>", { noremap = true, silent = true })