From e62c93c3f50d856a0c6eddf58dd00f7b67b88b03 Mon Sep 17 00:00:00 2001 From: Zero <82575487+arthur-mountain@users.noreply.github.com> Date: Sun, 18 Feb 2024 22:31:17 +0800 Subject: [PATCH] Fixed the move line of keymaps for mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `` and `` couldn't working in mac. When I tried to press both of keymap, ``, I got this symbol `∆` `` I got this symbol `˚` --- lua/lazyvim/config/keymaps.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 1e7cc1a2..1ddabf52 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -31,6 +31,14 @@ map("i", "", "m .-2==gi", { desc = "Move up" }) map("v", "", ":m '>+1gv=gv", { desc = "Move down" }) map("v", "", ":m '<-2gv=gv", { desc = "Move up" }) +-- Move lines compatible with Mac +map("n", "∆", "m .+1==", { desc = "Move down" }) +map("n", "˚", "m .-2==", { desc = "Move up" }) +map("i", "∆", "m .+1==gi", { desc = "Move down" }) +map("i", "˚", "m .-2==gi", { desc = "Move up" }) +map("v", "∆", ":m '>+1gv=gv", { desc = "Move down" }) +map("v", "˚", ":m '<-2gv=gv", { desc = "Move up" }) + -- buffers map("n", "", "bprevious", { desc = "Prev buffer" }) map("n", "", "bnext", { desc = "Next buffer" })