This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/nvim/lua/key/Common.lua

25 lines
538 B
Lua
Raw Normal View History

2024-02-06 15:25:18 +03:00
require("key/Rekey")
2023-08-08 16:24:15 +03:00
-- 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-02-06 15:25:18 +03:00
-- Repeat previous command.
rekey_normal("<Leader>.", "@:")
rekey_visual("<Leader>.", "@:")
2023-10-03 06:46:55 +03:00
2024-02-06 15:25:18 +03:00
-- Save everything.
rekey_normal("zz", "<cmd>wa<cr>")
-- Save all we can and leave.
rekey_normal("<Leader>z", "<cmd>lua bye()<cr>")
-- Compatibility alias for visual selection.
rekey_normal("<Leader>v", "v")
-- Remap ; to :.
rekey_normal(";", ":")
rekey_visual(";", ":")