1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
return {
lazy = false,
"tpope/vim-fugitive",
dependencies = "tpope/vim-rhubarb",
config = function()
-- The following seems to break harpoon
-- it's supposed to auto-cd to the git root on vim startup
-- local handle = io.popen('git rev-parse --is-inside-work-tree 2> /dev/null')
-- if handle then
-- local result = handle:read('*a')
-- handle:close()
-- if result and result:match('true') then
-- vim.cmd([[Gcd]])
-- end
-- end
end,
-- Only load when using one of the following commands:
keys = {
{ "<leader>gs", "<cmd>G<CR>" }, -- G.it S.tatus
{ "<leader>gd", "<cmd>G difftool<CR>" }, -- G.it D.iff
{ "<leader>gm", "<cmd>Gvdiffsplit!<CR>" }, -- G.it M.erge
{ "<leader>gc", "<cmd>G commit<CR>" }, -- G.it C.ommit
{ "<leader>gu", "<cmd>G push<CR>" }, -- G.it push U.pstream
{ "<leader>gp", "<cmd>G pull<CR>" }, -- G.it P.ull
{ "<leader>gf", "<cmd>G fetch<CR>" }, -- G.it F.etch
},
}
|