mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Fix s/S bindings
This commit is contained in:
@@ -192,7 +192,7 @@ Snacks.picker.jj_show = function(ref)
|
||||
item.cwd = cwd
|
||||
item.status = status
|
||||
item.file = file
|
||||
local base, prev, next, suffix = file:match("^(.*){(.+) => (.+)}(.*)$")
|
||||
local base, prev, next, suffix = file:match("^(.*){(.*) => (.*)}(.*)$")
|
||||
if base ~= nil then
|
||||
item.rename = base .. prev .. suffix
|
||||
item.file = base .. next .. suffix
|
||||
@@ -263,11 +263,13 @@ Snacks.picker.jj_show = function(ref)
|
||||
end,
|
||||
jj_gsplit = function(picker, item)
|
||||
picker:close()
|
||||
vim.cmd('Gvsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. item.file))
|
||||
local commit = vim.trim(vim.fn.system({ "jj", "show", ref, "--template", "commit_id", "--no-patch" }))
|
||||
vim.cmd('Gvsplit ' .. vim.fn.fnameescape(commit .. ':' .. item.file))
|
||||
end,
|
||||
jj_gvsplit = function(picker, item)
|
||||
picker:close()
|
||||
vim.cmd('Gsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. item.file))
|
||||
local commit = vim.trim(vim.fn.system({ "jj", "show", ref, "--template", "commit_id", "--no-patch" }))
|
||||
vim.cmd('Gsplit ' .. vim.fn.fnameescape(commit .. ':' .. item.file))
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
vim.keymap.set({ 'n', 'x', 'o' }, 's', '<Plug>(leap)')
|
||||
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
|
||||
vim.keymap.set({ "n", "x" }, "s", "<Plug>(leap-forward-till)", { desc = "Leap forward to" })
|
||||
vim.keymap.set({ "n", "x" }, "S", "<Plug>(leap-backward)", { desc = "Leap backward to" })
|
||||
vim.keymap.set("o", "z", "<Plug>(leap-forward-till)", { desc = "Leap forward to" })
|
||||
vim.keymap.set("o", "Z", "<Plug>(leap-backward)", { desc = "Leap backward to" })
|
||||
|
||||
local function ft(key_specific_args)
|
||||
require('leap').leap(
|
||||
|
||||
Reference in New Issue
Block a user