feat nvim: 自動折行關閉,額外新增動態折行開關快速鍵

This commit is contained in:
2025-05-06 12:20:50 +08:00
parent 3e138a5f5e
commit a8797860e1
2 changed files with 5 additions and 0 deletions

View File

@@ -81,3 +81,7 @@ neomap('i', '<S-TAB>', '<C-d>', { noremap = true, silent = true }) -- Insert Mod
-- 透過 v 選取整行縮排後,不取消選取整行
neomap('v', '<', '<gv', { noremap = true, silent = true })
neomap('v', '>', '>gv', { noremap = true, silent = true })
-- 自動折行開關切換
map("n", "<A-z>", "<cmd>set wrap!<CR>", { noremap = true, silent = true, desc = "Toggle Auto Wrap Line" })
map("i", "<A-z>", "<Esc><cmd>set wrap!<CR>a", { noremap = true, silent = true, desc = "Toggle Auto Wrap Line" })