1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

..

1 Commits

View File

@ -170,7 +170,7 @@ keymap.set("n", "<Down>", "<C-W>j")
keymap.set({ "x", "o" }, "iu", "<cmd>call text_obj#URL()<cr>", { desc = "URL text object" })
-- Text objects for entire buffer
keymap.set({ "x", "o" }, "iB", ":<C-U>call text_obj#Buffer()<cr>", { desc = "buffer text object" })
keymap.set({ "x", "o" }, "iB", "<cmd>call text_obj#Buffer()<cr>", { desc = "buffer text object" })
-- Do not move my cursor when joining lines.
keymap.set("n", "J", function()
@ -179,17 +179,17 @@ keymap.set("n", "J", function()
delmarks z
]])
end, {
desc = "join lines without moving cursor",
desc = "join line",
})
keymap.set("n", "gJ", function()
-- we must use `normal!`, otherwise it will trigger recursive mapping
vim.cmd([[
normal! mzgJ`z
normal! zmgJ`z
delmarks z
]])
end, {
desc = "join lines without moving cursor",
desc = "join visual lines",
})
-- Break inserted text into smaller undo units when we insert some punctuation chars.