2024-10-11 23:27:07 +03:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
text = ''
|
|
|
|
-- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim.
|
|
|
|
function bye()
|
|
|
|
pcall(vim.cmd, "wa")
|
|
|
|
vim.cmd[[qa!]]
|
|
|
|
end
|
2024-10-08 04:02:46 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
-- Save everything.
|
|
|
|
rekey_normal("<C-s>", "<cmd>wa!<cr>")
|
|
|
|
rekey_input("<C-s>", "<cmd>wa!<cr>")
|
2024-10-08 04:02:46 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
-- Save all we can and leave.
|
|
|
|
rekey_normal("<Leader>z", "<cmd>lua bye()<cr>")
|
2024-10-08 04:02:46 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
-- Just leave, no saves.
|
|
|
|
rekey_normal("<Leader>Z", "<cmd>qa!<cr>")
|
|
|
|
'';
|
2024-10-08 04:02:46 +03:00
|
|
|
}
|