-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfugitive.lua
21 lines (19 loc) · 945 Bytes
/
fugitive.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local config = function()
local nmap = require('utils').nmap
nmap('<leader>gG', '<cmd>Git<cr>', { desc = 'Git summary window' })
nmap('<leader>gV', '<cmd>vert Git<cr>', { desc = 'Git summary window in vertical split' })
nmap('<leader>gT', '<cmd>tabnew | Git<cr><c-w>o<cr>', { desc = 'Git summary window in new tab' })
nmap('<leader>gaa', '<cmd>Git add --all<cr>', { desc = 'Git add all' })
nmap('<leader>gd', '<cmd>Git diff<cr>', { desc = 'Git diff' })
nmap('<leader>gp', '<cmd>Git push<cr>', { desc = 'Git push' })
nmap('<leader>gl', '<cmd>Git pull<cr>', { desc = 'Git pull' })
nmap('<leader>gs', '<cmd>Git status<cr>', { desc = 'Git status' })
nmap('<leader>gc', '<cmd>Git commit<cr>', { desc = 'Git commit' })
nmap('<leader>gb', '<cmd>GBrowse<cr>', { desc = 'Open in browser at hosting provider' })
end
return {
'tpope/vim-fugitive',
cmd = { 'Git' },
config = config,
dependencies = { 'tpope/vim-rhubarb' },
}