summaryrefslogtreecommitdiff
path: root/lua/utils.lua
blob: 7c8a7bf9803490a60d9c1d518bcfc34e12abd362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--
-- Auto group utilites
--

local M = {}
local cmd = vim.cmd

function M.create_augroup(autocmds, name)
    cmd('augroup ' .. name)
    cmd('autocmd!')
    for _, autocmd in ipairs(autocmds) do
        cmd('autocmd ' .. table.concat(autocmd, ' '))
    end
    cmd('augroup END')
end

return M