From 6f2e2638107ac4763aa7455bcf7c008b6452eb73 Mon Sep 17 00:00:00 2001 From: seajee Date: Thu, 20 Nov 2025 20:14:35 +0100 Subject: [PATCH] [neovim] Add multi cursor plugin --- neovim/.config/nvim/init.lua | 48 ++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/neovim/.config/nvim/init.lua b/neovim/.config/nvim/init.lua index 1904310..6a8dc4b 100644 --- a/neovim/.config/nvim/init.lua +++ b/neovim/.config/nvim/init.lua @@ -54,7 +54,7 @@ map({ "n", "v" }, "y", "\"+y") -- Deletions map({ "n", "v" }, "d", "\"_d") -map("n", "dm", ":delmarks!") +map("n", "md", ":delmarks!") -- Commands map("n", "x", ":!chmod +x %") @@ -70,7 +70,7 @@ map("n", "tl", ":tablast") -- Buffers map("n", "n", ":enew") -map("n", "db", ":bdelete") +map("n", "bd", ":bdelete") map("n", "", ":bnext") map("n", "", ":bprevious") map("n", "\\", ":buffer term") @@ -186,21 +186,37 @@ require("lazy").setup({ { "lewis6991/gitsigns.nvim", opts = {} }, -- Text aligning - { "Vonr/align.nvim", branch = "v2" } -}) + { "Vonr/align.nvim", branch = "v2" }, --- Plugin keymaps -map("n", "bt", ":TransparentToggle") -map("n", "f", ":Pick files") -map("n", "b", ":Pick buffers") -map("n", "u", ":UndotreeToggle") -map("n", "gs", ":Git") -map("n", "gt", ":Gitsigns toggle_signs") -map("n", "gp", ":Gitsigns preview_hunk") -map("n", "gb", ":Gitsigns toggle_current_line_blame") -map("x", "a", function() - require("align").align_to_string({ preview = true, regex = true }) -end) + -- Multi cursor + { "brenton-leighton/multiple-cursors.nvim", opts = {} } +}) -- Colorscheme cmd.colorscheme("gruber-darker") + +-- Plugin keymaps +map("n", "bt", ":TransparentToggle") + +map("n", "f", ":Pick files") +map("n", "b", ":Pick buffers") + +map("n", "u", ":UndotreeToggle") +map("n", "gs", ":Git") + +map("n", "gt", ":Gitsigns toggle_signs") +map("n", "gp", ":Gitsigns preview_hunk") +map("n", "gb", ":Gitsigns toggle_current_line_blame") + +map("x", "al", function() + require("align").align_to_string({ preview = true, regex = true }) +end) + +map({ "n", "x" }, "", "MultipleCursorsAddDown") +map({ "n", "x" }, "", "MultipleCursorsAddUp") +map({ "n", "i", "x" }, "", "MultipleCursorsAddUp") +map({ "n", "i", "x" }, "", "MultipleCursorsAddDown") +map({ "n", "i" }, "", "MultipleCursorsMouseAddDelete") +map({ "n", "v", "x" }, "", "MultipleCursorsAddJumpNextMatch") +map({ "n", "x" }, "D", "MultipleCursorsJumpNextMatch") +map("n", "|", function() require("multiple-cursors").align() end)