From bbc8152ed95bb8d3e47c45f7bab11d3abece3958 Mon Sep 17 00:00:00 2001 From: caprain Date: Mon, 13 Apr 2026 00:38:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0sudo=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/core/keymap.lua | 4 ++++ lua/pack/plugins.lua | 2 ++ nvim-pack-lock.json | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/lua/core/keymap.lua b/lua/core/keymap.lua index 2adebe9..d396b2e 100644 --- a/lua/core/keymap.lua +++ b/lua/core/keymap.lua @@ -273,6 +273,10 @@ mapkey("n", "cn", "gcc", { remap = true }) mapkey("x", "cn", "gc", { remap = true }) mapkey("n", "cu", "gcc", { remap = true }) mapkey("x", "cu", "gc", { remap = true }) +mapkey("n", "", "gcc", { remap = true }) +mapkey("x", "", "gc", { remap = true }) +mapkey("n", "", "gcc", { remap = true }) +mapkey("x", "", "gc", { remap = true }) -- === -- === 运行代码(该功能已经迁移到plugins/coderunner.lua) diff --git a/lua/pack/plugins.lua b/lua/pack/plugins.lua index 829330b..435b660 100644 --- a/lua/pack/plugins.lua +++ b/lua/pack/plugins.lua @@ -38,6 +38,8 @@ local specs = { 'https://github.com/akinsho/bufferline.nvim', -- yazi.lua 文件管理器 'https://github.com/mikavilpas/yazi.nvim', + -- sudo权限保存文件 + "https://github.com/lambdalisue/vim-suda", -- 查看可用键位 "https://github.com/folke/which-key.nvim", } diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index cf2753f..85792c0 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -84,6 +84,10 @@ "rev": "c0603ca8f31299c83deaa9a24a63d67116db25cd", "src": "https://github.com/alexpasmantier/tv.nvim" }, + "vim-suda": { + "rev": "c492741b4679b3cdd4d9e34138209784e061d916", + "src": "https://github.com/lambdalisue/vim-suda" + }, "which-key.nvim": { "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", "src": "https://github.com/folke/which-key.nvim"