line indent updown stuff

This commit is contained in:
Christoph J. Scherr 2024-01-21 02:20:47 +01:00
parent d4f5cddc72
commit d570e1eb33
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
1 changed files with 13 additions and 12 deletions

View File

@ -344,13 +344,13 @@ M.edit = {
-- split and join lines
["<C-j>"] = { "<cmd>join<cr>", "join lines" },
["<C-s>"] = { "i<cr><esc>l", "split line", },
["<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 } },
["<Down>"] = { "<cmd> move+<cr>", "Move line down", opts = { expr = true } },
["<Left>"] = { "<cmd> << <cr>", "Less indentation", opts = { expr = true } },
["<Right>"] = { "<cmd> >> <cr>", "More indentation", opts = { expr = true } },
["<Up>"] = { "<cmd> move-2<cr>", "Move line up" },
["<Down>"] = { "<cmd> move+<cr>", "Move line down" },
["<Left>"] = { "<<", "Less indentation" },
["<Right>"] = { ">>", "More indentation" },
-- format with conform
["<leader>ff"] = {
@ -373,13 +373,14 @@ M.edit = {
["z="] = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
},
v = {
-- NOTE: I would love to know why these commands work, they seem really
-- crazy.
["<Up>"] = { ":move'<-2<CR>gv=gv", "Move lines up", opts = { silent = true } },
["<Down>"] = { ":move'>+<CR>gv=gv", "Move lines down", opts = { silent = true } },
["<Left>"] = { "<gv", "Less indentation" },
["<Right>"] = { ">gv", "More indentation" },
},
x = {
["<Up>"] = { "move'<-2<cr>gv=gv", "Move line up", opts = { expr = true } },
["<Down>"] = { "move'<-2<cr>gv=gv", "Move line down", opts = { expr = true } },
},
x = {},
t = {
--big move
["<A-k>"] = { "<C-u>", "big step down" },