Skip to content

Instantly share code, notes, and snippets.

View kutsan's full-sized avatar

Kutsan Kaplan kutsan

View GitHub Profile
numToStr / au.lua
Last active August 20, 2023 05:15
Neovim autocmd in lua
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then