1
Fork 0

Remove upkgs, add new vim keybind and ff addon

This commit is contained in:
Matei Adriel 2023-11-11 06:55:14 +01:00
commit eca258cdfc
No known key found for this signature in database
20 changed files with 152 additions and 160 deletions
dotfiles/neovim/lua/my/helpers

View file

@ -5,7 +5,12 @@ local function swap(key)
vim.keymap.set({ "n", "v" }, "g" .. key, key, { buffer = true })
end
function M.setup()
local function unswap(key)
vim.keymap.del({ "n", "v" }, key)
vim.keymap.del({ "n", "v" }, "g" .. key)
end
function M.enable()
vim.opt.wrap = true
swap("j")
@ -14,4 +19,21 @@ function M.setup()
swap("$")
end
function M.disable()
vim.opt.wrap = false
unswap("j")
unswap("k")
unswap("0")
unswap("$")
end
function M.toggle()
if vim.opt.wrap == true then
M.disable()
else
M.enable()
end
end
return M