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

require("key/Rekey")
-- 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
-- Repeat previous command.
rekey_normal("<Leader>.", "@:")
rekey_visual("<Leader>.", "@:")
-- 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(";", ":")