This commit is contained in:
Jaroslaw Konik 2025-05-08 11:29:56 +02:00
parent 171c899ff7
commit 4829342233

View file

@ -674,25 +674,6 @@ vim.api.nvim_create_autocmd('BufEnter', {
end,
})
-------------------------------------------------------------------------------
-- Notes
-------------------------------------------------------------------------------
vim.api.nvim_create_autocmd('BufEnter', {
pattern = { "*/notes/**" },
callback = function()
vim.loop.spawn("git", { args = { "pull" } })
end,
})
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = { "*/notes/**" },
callback = function()
local filename = vim.fn.expand('%')
local command = 'git add ' .. filename .. '; git commit -m "Auto-commit: saved ' .. filename .. '"'
vim.fn.system(command)
vim.loop.spawn("git", { args = { "push" } })
end
})
-------------------------------------------------------------------------------
-- Comments
-------------------------------------------------------------------------------