From 0a686ab647b6fe85a2680a4cc59fdc1b75bbbf1f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 5 Oct 2023 18:22:11 +0200 Subject: [PATCH] nvim: Add mapping to enable British spell check Updated mappings to enable spell checking slightly: ZZ enables all languages (german, us, gb) ZE only US spellcheck, ZB GB spelling and ZD German spelling. --- nvim/.config/nvim/lua/core/mappings.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/core/mappings.lua b/nvim/.config/nvim/lua/core/mappings.lua index 0d655b9..111cd0d 100644 --- a/nvim/.config/nvim/lua/core/mappings.lua +++ b/nvim/.config/nvim/lua/core/mappings.lua @@ -189,9 +189,10 @@ map("n", "F", ":FormatWriteLock") -- Move to the prev/next spelling error with [S ]S -- Move to the prev/next spelling error or suggestion with [s ]s prefix({ ["Z"] = { name = "+Spelling" } }) -map("n", "ZZ", ":setlocal spell! spelllang=en_us,de_de", { desc = "Toggle spellcheck" }) -map("n", "ZE", ":setlocal spell! spelllang=en_us", { desc = "Toggle EN spellcheck" }) -map("n", "ZG", ":setlocal spell! spelllang=de_de", { desc = "Toggle DE spellcheck" }) +map("n", "ZZ", ":setlocal spell! spelllang=en_us,en_uk,de_de", { desc = "Toggle spellcheck" }) +map("n", "ZE", ":setlocal spell! spelllang=en_us", { desc = "Toggle EN_US spellcheck" }) +map("n", "ZB", ":setlocal spell! spelllang=en_gb", { desc = "Toggle EN_GB spellcheck" }) +map("n", "ZD", ":setlocal spell! spelllang=de_de", { desc = "Toggle DE_DE spellcheck" }) -- undo last spelling mistake from insert and normal mode map("i", "", "u[s1z=`]au") map("n", "z", "ms[s1z=`s", { desc = "Fix last spell error" })