mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-11 18:04:25 +02:00
enc: change visual multi lib
This commit is contained in:
parent
282733e5ea
commit
6087de87b0
2 changed files with 50 additions and 3 deletions
|
@ -32,6 +32,7 @@
|
|||
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "5fdc3edf7bb1b6365980c2c47dac2f19ec93c97b" },
|
||||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
|
||||
"neotest": { "branch": "master", "commit": "1d4b3bd89afa8bfa12fffd2bb1ccd26ac3c92ce5" },
|
||||
"neotest-golang": { "branch": "main", "commit": "9521843942423fcac9991c596ff19c1f4f500650" },
|
||||
"neotest-jest": { "branch": "main", "commit": "dd82016c01704d9bbd5188749fe0586b3b620693" },
|
||||
|
@ -71,7 +72,6 @@
|
|||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "51f548421f8a74680eff27d283c9d5ea6e8d0074" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||
"virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" },
|
||||
"volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" },
|
||||
"vscode-js-debug": { "branch": "main", "commit": "a3279c2abc1162069b0f5c014542b8b849cefa70" },
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
return {
|
||||
"mg979/vim-visual-multi",
|
||||
--[[ "mg979/vim-visual-multi",
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
branch = "master",
|
||||
lazy = true,
|
||||
init = function()
|
||||
-- Nonaktifkan mapping default jika ingin custom
|
||||
vim.g.VM_default_mappings = 0
|
||||
|
||||
vim.g.VM_mouse_mappings = 1 -- equal CTRL + Left Click on VSCODE
|
||||
vim.g.VM_maps = {
|
||||
["Find Under"] = "<C-d>", -- equal CTRL+D on VSCODE
|
||||
|
@ -13,5 +16,49 @@ return {
|
|||
["Undo"] = "u", -- undo
|
||||
["Redo"] = "<C-r>", -- redo
|
||||
}
|
||||
end,
|
||||
end, ]]
|
||||
{
|
||||
"brenton-leighton/multiple-cursors.nvim",
|
||||
version = "*",
|
||||
opts = {},
|
||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||
keys = {
|
||||
-- 🧠 Seperti Ctrl + D di VS Code → pilih kata berikutnya yang sama
|
||||
{
|
||||
"<C-d>",
|
||||
function()
|
||||
vim.cmd("MultipleCursorsAddJumpNextMatch")
|
||||
vim.schedule(function()
|
||||
vim.notify(
|
||||
"🖊️ Multiple cursor: menambahkan seleksi berikutnya",
|
||||
vim.log.levels.INFO,
|
||||
{ title = "MultipleCursors" }
|
||||
)
|
||||
end)
|
||||
end,
|
||||
mode = { "n", "x" },
|
||||
desc = "Select next match",
|
||||
},
|
||||
|
||||
-- 👇 Menambah kursor ke bawah seperti Ctrl + Alt + ↓
|
||||
{ "<C-M-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "i", "x" }, desc = "Add cursor down" },
|
||||
|
||||
-- 👆 Menambah kursor ke atas seperti Ctrl + Alt + ↑
|
||||
{ "<C-M-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "i", "x" }, desc = "Add cursor up" },
|
||||
|
||||
-- 🖱️ Tambah/hapus kursor dengan Ctrl + Klik mouse
|
||||
{
|
||||
"<M-LeftMouse>",
|
||||
"<Cmd>MultipleCursorsMouseAddDelete<CR>",
|
||||
mode = { "n", "i" },
|
||||
desc = "Add/remove cursor with mouse",
|
||||
},
|
||||
|
||||
-- 🔲 Tambah kursor ke seluruh baris visual yang dipilih (pakai Leader + m)
|
||||
{ "<Leader>m", "<Cmd>MultipleCursorsAddVisualArea<CR>", mode = { "x" }, desc = "Add cursors to visual lines" },
|
||||
|
||||
-- 🔒 Lock semua kursor supaya siap edit serentak
|
||||
{ "<Leader>L", "<Cmd>MultipleCursorsLock<CR>", mode = { "n", "x" }, desc = "Lock cursors" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue