update
This commit is contained in:
parent
171c899ff7
commit
4829342233
1 changed files with 0 additions and 19 deletions
19
init.lua
19
init.lua
|
|
@ -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
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue