leap keys

This commit is contained in:
Christoph J. Scherr 2024-01-19 23:13:23 +01:00
parent 7f284d475d
commit 355d37f792
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 68 additions and 2 deletions

View File

@ -8,6 +8,53 @@ M.disabled = {
["<C-a>"] = "",
["<C-s>"] = "",
},
v = {},
}
M.leap = {
plugin = true,
n = {
["<leader>s"] = {
"<Plug>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
"leap backward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
"leap from window",
},
},
x = {
["<leader>s"] = {
"<Plug>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
"leap forward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
"leap from window",
},
},
o = {
["<leader>s"] = {
"<Plug>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
"leap forward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
"leap from window",
},
},
}
M.lazygit = {
@ -120,7 +167,9 @@ M.edit = {
["oo"] = { "o<ESC>", "insert a line below", opts = { nowait = false } },
-- split and join lines
["<leader>jj"] = { "<cmd> join <CR>", "join lines" },
-- "J" for join is defaul
["S"] = {
"i<CR>k<END>", "split line"},
-- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },

View File

@ -48,12 +48,29 @@ local plugins = {
},
{
"ggandor/leap.nvim",
lazy = false,
config = function()
require("leap").create_default_mappings()
require("core.utils").load_mappings "leap"
end,
},
{
"ggandor/flit.nvim",
lazy = false,
config = function()
require("flit").setup {
keys = { f = "f", F = "F", t = "t", T = "T" },
-- A string like "nv", "nvo", "o", etc.
labeled_modes = "v",
multiline = true,
-- Like `leap`s similar argument (call-specific overrides).
-- E.g.: opts = { equivalence_classes = {} }
opts = {},
}
end,
},
{
"kdheepak/lazygit.nvim",
lazy = false,
keys = { "<leader>gg" },
cmd = "LazyGit",
-- optional for floating window border decoration