split join replace

This commit is contained in:
Christoph J. Scherr 2024-01-21 02:07:56 +01:00
parent e42208d521
commit d4f5cddc72
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 12 additions and 10 deletions

View File

@ -40,7 +40,7 @@ M.disabled = {
["<leader>td"] = "", ["<leader>td"] = "",
["<leader>wk"] = "", ["<leader>wk"] = "",
["#"] = "", ["#"] = "",
["?"] = "", ["J"] = "",
}, },
t = { t = {
["<C-t>"] = "", ["<C-t>"] = "",
@ -49,6 +49,7 @@ M.disabled = {
["#"] = "", ["#"] = "",
["?"] = "", ["?"] = "",
["<leader>/"] = "", ["<leader>/"] = "",
["J"] = "",
}, },
} }
@ -334,15 +335,16 @@ M.edit = {
plugin = false, plugin = false,
n = { n = {
-- easy newline -- easy newline
["OO"] = { "O<esc>", "insert a line above", opts = { nowait = false } }, ["OO"] = { "O<esc>", "insert a line above"},
["oo"] = { "o<esc>", "insert a line below", opts = { nowait = false } }, ["oo"] = { "o<esc>", "insert a line below"},
-- substitute (change hovered/selection with insert mode)
-- normally, this is s, but that is leaps binding now
["<leader>s"] = { "s", "replace with insert mode"},
-- split and join lines -- split and join lines
-- "J" for join is defaul ["<C-j>"] = { "<cmd>join<cr>", "join lines" },
["S"] = { ["<C-s>"] = { "i<cr><esc>l", "split line", },
"i<cr><esc>l",
"split line",
},
-- do something useful with the arrows -- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<cr>", "Move line up", opts = { expr = true } }, ["<Up>"] = { "<cmd> move-2<cr>", "Move line up", opts = { expr = true } },

View File

@ -617,8 +617,8 @@ local plugins = {
lazy = false, lazy = false,
cmd = { "TSJJoin", "TSJSplit" }, cmd = { "TSJJoin", "TSJSplit" },
keys = { keys = {
{ "J", "<cmd>TSJJoin<CR>" }, { "<C-j>", "<cmd>TSJJoin<CR>" },
{ "<leader>S", "<cmd>TSJSplit<CR>" }, { "<C-s>", "<cmd>TSJSplit<CR>" },
}, },
}, },
{ {