From d4f5cddc72db5aba93d132768fbb02b6a1738eca Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 02:07:56 +0100 Subject: [PATCH] split join replace --- lua/custom/mappings.lua | 18 ++++++++++-------- lua/custom/plugins.lua | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index fdbc0f9..222ef80 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -40,7 +40,7 @@ M.disabled = { ["td"] = "", ["wk"] = "", ["#"] = "", - ["?"] = "", + ["J"] = "", }, t = { [""] = "", @@ -49,6 +49,7 @@ M.disabled = { ["#"] = "", ["?"] = "", ["/"] = "", + ["J"] = "", }, } @@ -334,15 +335,16 @@ M.edit = { plugin = false, n = { -- easy newline - ["OO"] = { "O", "insert a line above", opts = { nowait = false } }, - ["oo"] = { "o", "insert a line below", opts = { nowait = false } }, + ["OO"] = { "O", "insert a line above"}, + ["oo"] = { "o", "insert a line below"}, + + -- substitute (change hovered/selection with insert mode) + -- normally, this is s, but that is leaps binding now + ["s"] = { "s", "replace with insert mode"}, -- split and join lines - -- "J" for join is defaul - ["S"] = { - "il", - "split line", - }, + [""] = { "join", "join lines" }, + [""] = { "il", "split line", }, -- do something useful with the arrows [""] = { " move-2", "Move line up", opts = { expr = true } }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3ff8a59..a6741a0 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -617,8 +617,8 @@ local plugins = { lazy = false, cmd = { "TSJJoin", "TSJSplit" }, keys = { - { "J", "TSJJoin" }, - { "S", "TSJSplit" }, + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, }, {