Skip to content

Commit

Permalink
fix(keymaps): move lines with silent and without triggering cmdline. F…
Browse files Browse the repository at this point in the history
…ixes #184
  • Loading branch information
folke committed Feb 6, 2023
1 parent e5626e9 commit 2ff2131
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/lazyvim/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window wi
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })

-- Move Lines
map("n", "<A-j>", ":m .+1<cr>==", { desc = "Move down" })
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move down" })
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move up" })
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move down" })
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move up" })
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
map("i", "<A-j>", "<Esc>:m .+1<cr>==gi", { desc = "Move down" })
map("n", "<A-k>", ":m .-2<cr>==", { desc = "Move up" })
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
map("i", "<A-k>", "<Esc>:m .-2<cr>==gi", { desc = "Move up" })

-- buffers
if Util.has("bufferline.nvim") then
Expand Down

0 comments on commit 2ff2131

Please sign in to comment.