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>wk"] = "",
["#"] = "",
["?"] = "",
["J"] = "",
},
t = {
["<C-t>"] = "",
@ -49,6 +49,7 @@ M.disabled = {
["#"] = "",
["?"] = "",
["<leader>/"] = "",
["J"] = "",
},
}
@ -334,15 +335,16 @@ M.edit = {
plugin = false,
n = {
-- easy newline
["OO"] = { "O<esc>", "insert a line above", opts = { nowait = false } },
["oo"] = { "o<esc>", "insert a line below", opts = { nowait = false } },
["OO"] = { "O<esc>", "insert a line above"},
["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
-- "J" for join is defaul
["S"] = {
"i<cr><esc>l",
"split line",
},
["<C-j>"] = { "<cmd>join<cr>", "join lines" },
["<C-s>"] = { "i<cr><esc>l", "split line", },
-- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<cr>", "Move line up", opts = { expr = true } },

View File

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