Simply sync my vimwiki via shortcut
This commit is contained in:
@@ -76,6 +76,10 @@
|
|||||||
# Shortcut for checkout, we are all lazy
|
# Shortcut for checkout, we are all lazy
|
||||||
co = checkout
|
co = checkout
|
||||||
|
|
||||||
|
# A utility to push right after a commit (I use that for my vimwiki with the key ,ws)
|
||||||
|
commit-and-push = "!git commit && git push"
|
||||||
|
cap = "!git commit && git push"
|
||||||
|
|
||||||
# Show the changes which will be committed
|
# Show the changes which will be committed
|
||||||
dc = diff --cached
|
dc = diff --cached
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||||||
vim.opt_local.wrap = true
|
vim.opt_local.wrap = true
|
||||||
vim.opt_local.number = false
|
vim.opt_local.number = false
|
||||||
vim.opt_local.relativenumber = false
|
vim.opt_local.relativenumber = false
|
||||||
vim.keymap.set("n", "<Leader>ws", function()
|
vim.keymap.set("n", "<Leader>ws", "<Cmd>Gw | G commit-and-push<CR>")
|
||||||
vim.cmd("call system('sleep 2 && cd " .. wikipath .. " && git add . && git commit -m " .. '"Auto commit"' .. " && git push')")
|
|
||||||
end)
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user