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

1 Commits

Author SHA1 Message Date
Martin
e7f504a5cb Merge 4d289d16b3 into 050eacaee2 2024-02-24 22:12:11 +02:00

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.