Fix fugitive commands

This commit is contained in:
ViViDboarder 2022-05-10 12:06:07 -07:00
parent ded3cec4a9
commit 36853b6b2f
2 changed files with 10 additions and 10 deletions

View File

@ -122,11 +122,11 @@ use({
"tpope/vim-fugitive",
config = function()
local opts = { silent = true, noremap = true }
vim.api.nvim_set_keymap("n", "gb", "<cmd>Gblame<CR>", opts)
vim.api.nvim_set_keymap("n", "gc", "<cmd>Gcommit<CR>", opts)
vim.api.nvim_set_keymap("n", "gd", "<cmd>Gdiff<CR>", opts)
vim.api.nvim_set_keymap("n", "gb", "<cmd>Git blame<CR>", opts)
vim.api.nvim_set_keymap("n", "gc", "<cmd>Git commit<CR>", opts)
vim.api.nvim_set_keymap("n", "gd", "<cmd>Git diff<CR>", opts)
vim.api.nvim_set_keymap("n", "gs", "<cmd>Git<CR>", opts)
vim.api.nvim_set_keymap("n", "gw", "<cmd>Gwrite<CR>", opts)
vim.api.nvim_set_keymap("n", "gw", "<cmd>Git write<CR>", opts)
end,
})

View File

@ -1,7 +1,7 @@
Plug 'tpope/vim-fugitive' ", { 'on': ['Gblame', 'Gdiff', 'Gcommit', 'Gstatus', 'Gwrite'] }
Plug 'tpope/vim-fugitive' ", { 'on': ['Git'] }
" Mappings
nnoremap <leader>gb :Gblame<CR>
nnoremap <leader>gc :Gcommit<CR>
nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gs :Gstatus<CR>
nnoremap <leader>gw :Gwrite<CR>
nnoremap <leader>gb :Git blame<CR>
nnoremap <leader>gc :Git commit<CR>
nnoremap <leader>gd :Git diff<CR>
nnoremap <leader>gs :Git status<CR>
nnoremap <leader>gw :Git write<CR>