nvim multicursor

This commit is contained in:
Michael Chalupiak 2025-04-03 15:19:02 -04:00
parent 7a9f0f6f47
commit f142308811
2 changed files with 27 additions and 1 deletions

View File

@ -7,6 +7,32 @@ return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
'jake-stewart/multicursor.nvim',
config = function()
local mc = require'multicursor-nvim'
mc.setup{}
local set = vim.keymap.set
set("n", "<leader>s", mc.searchAllAddCursors)
mc.addKeymapLayer(function(layerSet)
-- Select a different cursor as the main one.
layerSet({"n", "x"}, "<left>", mc.prevCursor)
layerSet({"n", "x"}, "<right>", mc.nextCursor)
-- Delete the main cursor.
layerSet({"n", "x"}, "<leader>x", mc.deleteCursor)
-- Enable and clear cursors using escape.
layerSet("n", "<esc>", function()
if not mc.cursorsEnabled() then
mc.enableCursors()
else
mc.clearCursors()
end
end)
end)
end
}
use {
'nvim-telescope/telescope.nvim',
branch = '0.1.x',

View File

@ -53,7 +53,7 @@ vim.keymap.set("n", "<C-->", function()
ChangeScaleFactor(1 / 1.25)
end)
vim.opt.guifont = { "Fairfax", ":h12" }
vim.opt.guifont = { "Iosevka Term SS12", ":h12" }
vim.opt.termguicolors = true
vim.g.netrw_keepdir = 0