nvim: Move next/prev spell error to z Z keys

From [s ]s [S ]S, we move all to [z ]z [Z ]Z.
This commit is contained in:
Marty Oehme 2024-08-15 09:33:59 +02:00
parent 787c0b0fc4
commit ec791fda5f
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -128,8 +128,16 @@ map("x", "<localleader>q", "gq", { silent = true, desc = "Format {motion}" })
map("n", "<localleader>Q", "vapJgqap", { silent = true, desc = "Unformat then format paragraph" })
-- SPELL CHECKING
-- Move to the prev/next spelling error with [S ]S
-- Move to the prev/next spelling error or suggestion with [s ]s
-- Move to the prev/next spelling error with [z|[Z ]Z|]z instead of ]s
map("n", "]z", "]s")
map("n", "[z", "[s")
map("n", "]s", "<Nop>")
map("n", "[s", "<Nop>")
map("n", "]Z", "]S")
map("n", "[Z", "[S")
map("n", "]S", "<Nop>")
map("n", "[S", "<Nop>")
-- Move to the prev/next spelling error or suggestion with [z ]z
map("n", "<localleader>ZZ", "<cmd>SpellToggle en_us en_gb de_de<cr>", { desc = "Toggle spellcheck" })
map("n", "<localleader>ZA", "<cmd>SpellToggle! en_us en_gb de_de<cr>", { desc = "Enable spellcheck" })
map("n", "<localleader>ZE", "<cmd>SpellToggle en_us<cr>", { desc = "Toggle EN_US spellcheck" })