comparison .chezmoitemplates/au.lua @ 489:1635e29e0ed4

Move autocmds to init.lua
author zegervdv <zegervdv@me.com>
date Sun, 14 Nov 2021 09:34:26 +0100
parents ae7e377bced8
children eb6ebdacf201
comparison
equal deleted inserted replaced
488:8edc5f86e9c3 489:1635e29e0ed4
9 local action = is_table and spec[2] or spec 9 local action = is_table and spec[2] or spec
10 if type(action) == 'function' then 10 if type(action) == 'function' then
11 action = this.set(action) 11 action = this.set(action)
12 end 12 end
13 local e = type(event) == 'table' and table.concat(event, ',') or event 13 local e = type(event) == 'table' and table.concat(event, ',') or event
14 local pattern = type(pattern) == 'table' and table.concat(pattern, ',') or pattern
14 cmd('autocmd ' .. e .. ' ' .. pattern .. ' ' .. action) 15 cmd('autocmd ' .. e .. ' ' .. pattern .. ' ' .. action)
15 end 16 end
16 17
17 local S = { 18 local S = {
18 __au = {}, 19 __au = {},