From e23a485ef784473eab246ef7f9fdac7f1911b275 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 14 Feb 2024 16:16:25 -0600 Subject: [PATCH] feat(nvim): add mapping to create newline in insert mode --- dots/.config/nvim/lua/core/mappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dots/.config/nvim/lua/core/mappings.lua b/dots/.config/nvim/lua/core/mappings.lua index c6877b9b..6c383e8d 100755 --- a/dots/.config/nvim/lua/core/mappings.lua +++ b/dots/.config/nvim/lua/core/mappings.lua @@ -108,6 +108,10 @@ M.setup = function() -- Binding to allow shift space indent vim.keymap.set("i", "", "", { silent = true, desc = "Insert: Indent" }) + -- Create newline from anywhere in current line without modifying current line + vim.keymap.set("i", "", "o", { silent = true, desc = "Insert: New Line" }) + vim.keymap.set("i", "", "O", { silent = true, desc = "Insert: New Line" }) + -- Insert an Em Dash in insert mode vim.keymap.set("i", "", "—", { silent = true, desc = "Insert: Em Dash" }) end