line indent updown stuff
This commit is contained in:
parent
d4f5cddc72
commit
d570e1eb33
|
@ -335,22 +335,22 @@ M.edit = {
|
||||||
plugin = false,
|
plugin = false,
|
||||||
n = {
|
n = {
|
||||||
-- easy newline
|
-- easy newline
|
||||||
["OO"] = { "O<esc>", "insert a line above"},
|
["OO"] = { "O<esc>", "insert a line above" },
|
||||||
["oo"] = { "o<esc>", "insert a line below"},
|
["oo"] = { "o<esc>", "insert a line below" },
|
||||||
|
|
||||||
-- substitute (change hovered/selection with insert mode)
|
-- substitute (change hovered/selection with insert mode)
|
||||||
-- normally, this is s, but that is leaps binding now
|
-- normally, this is s, but that is leaps binding now
|
||||||
["<leader>s"] = { "s", "replace with insert mode"},
|
["<leader>s"] = { "s", "replace with insert mode" },
|
||||||
|
|
||||||
-- split and join lines
|
-- split and join lines
|
||||||
["<C-j>"] = { "<cmd>join<cr>", "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
|
-- 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" },
|
||||||
["<Down>"] = { "<cmd> move+<cr>", "Move line down", opts = { expr = true } },
|
["<Down>"] = { "<cmd> move+<cr>", "Move line down" },
|
||||||
["<Left>"] = { "<cmd> << <cr>", "Less indentation", opts = { expr = true } },
|
["<Left>"] = { "<<", "Less indentation" },
|
||||||
["<Right>"] = { "<cmd> >> <cr>", "More indentation", opts = { expr = true } },
|
["<Right>"] = { ">>", "More indentation" },
|
||||||
|
|
||||||
-- format with conform
|
-- format with conform
|
||||||
["<leader>ff"] = {
|
["<leader>ff"] = {
|
||||||
|
@ -373,13 +373,14 @@ M.edit = {
|
||||||
["z="] = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
["z="] = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
||||||
},
|
},
|
||||||
v = {
|
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" },
|
["<Left>"] = { "<gv", "Less indentation" },
|
||||||
["<Right>"] = { ">gv", "More indentation" },
|
["<Right>"] = { ">gv", "More indentation" },
|
||||||
},
|
},
|
||||||
x = {
|
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 } },
|
|
||||||
},
|
|
||||||
t = {
|
t = {
|
||||||
--big move
|
--big move
|
||||||
["<A-k>"] = { "<C-u>", "big step down" },
|
["<A-k>"] = { "<C-u>", "big step down" },
|
||||||
|
|
Loading…
Reference in New Issue