1
Fork 0
satellite/dotfiles/neovim/lua/my/abbreviations.lua

20 lines
366 B
Lua
Raw Normal View History

local M = {}
function M.localAbbr(lhs, rhs)
-- Create abbreviation
2022-10-13 01:33:24 +02:00
vim.cmd(":iabbrev <buffer> " .. lhs .. " " .. rhs)
end
function M.manyLocalAbbr(abbreviations)
for _, value in pairs(abbreviations) do
M.localAbbr(value[1], value[2])
end
end
function M.abbr(lhs, rhs)
-- Create abbreviation
vim.cmd(":iabbrev " .. lhs .. " " .. rhs)
end
return M