refactored and switched to config with packer

This commit is contained in:
iris committed 2022-08-02 19:37:22 -04:00
1 parent efece83eb8
commit f5b6ec34ad
19 files changed
+325 -259

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
local opts = { noremap = true, silent = true }
local utils = {}
utils.map = function(mode, from, to) vim.keymap.set(mode, from, to, opts) end
utils.nmap = function(from, to) vim.keymap.set('n', from, to, opts) end
utils.cmd = function(content) return '<cmd>' .. content .. '<cr>' end
local layout = {}
layout.map = function(from, to)
vim.keymap.set('n', from, to, opts)
vim.keymap.set('x', from, to, opts)
end
layout.swap = function(a, b)
utils.layout.map(a, b)
utils.layout.map(b, a)
end
utils.layout = layout
return utils