From f4e81c6a9240716a8909267b6298689fd1847bf9 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 26 Feb 2024 23:38:22 -0600 Subject: [PATCH] refactor(nvim): use `vim.keymap.set` for neovide maps --- dots/.config/nvim/lua/neovide.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dots/.config/nvim/lua/neovide.lua b/dots/.config/nvim/lua/neovide.lua index 13809389..e2d3dcb6 100644 --- a/dots/.config/nvim/lua/neovide.lua +++ b/dots/.config/nvim/lua/neovide.lua @@ -19,14 +19,14 @@ vim.keymap.set("c", "", "+", { noremap = true, silent = true }) -- Pas vim.keymap.set("i", "", 'l"+Pli', { noremap = true, silent = true }) -- Paste insert mode vim.keymap.set('t', '', '"+Pi', { noremap = true, silent = true }) -- Paste terminal mode -vim.api.nvim_set_keymap("", "", "+p", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("!", "", "+", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("v", "", "+", { noremap = true, silent = true }) +vim.keymap.set("", "", "+p", { noremap = true, silent = true }) +vim.keymap.set("!", "", "+", { noremap = true, silent = true }) +vim.keymap.set("v", "", "+", { noremap = true, silent = true }) -- Next/prev tabs -vim.api.nvim_set_keymap("n", "", ":tabnext", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "", ":tabprevious", { noremap = true, silent = true }) +vim.keymap.set({ "", "!", "v", "t" }, "", "tabnext", { noremap = true, silent = true }) +vim.keymap.set({ "", "!", "v", "t" }, "", "tabprevious", { noremap = true, silent = true }) -- Spawn new terminal in new tab -vim.api.nvim_set_keymap("n", "", ":tabnew | terminal", { noremap = true, silent = true }) +vim.keymap.set({ "", "!", "v", "t" }, "", "tabnew | terminal", { noremap = true, silent = true })