mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update mapping
This commit is contained in:
8
lua/config/fugitive.lua
Normal file
8
lua/config/fugitive.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local keymap = vim.keymap
|
||||
|
||||
keymap.set('n', '<leader>gs', '<cmd>Git<cr>', { desc = 'Git status' })
|
||||
keymap.set('n', '<leader>gw', '<cmd>Gwrite<cr>', { desc = 'Git add' })
|
||||
keymap.set('n', '<leader>gc', '<cmd>Git commit<cr>', { desc = 'Git commit' })
|
||||
keymap.set('n', '<leader>gd', '<cmd>Gdiffsplit<cr>', { desc = 'Git diff' })
|
||||
keymap.set('n', '<leader>gpl', '<cmd>Git pull<cr>', { desc = 'Git pull' })
|
||||
keymap.set('n', '<leader>gpu', '<cmd>15 split|term git push<cr>', { desc = 'Git push' })
|
||||
@@ -229,7 +229,7 @@ packer.startup({
|
||||
-- use 'Chiel92/vim-autoformat'
|
||||
|
||||
-- Git command inside vim
|
||||
use({ "tpope/vim-fugitive", event = "User InGitRepo" })
|
||||
use({ "tpope/vim-fugitive", event = "User InGitRepo", config = [[require('config.fugitive')]]})
|
||||
|
||||
-- Better git log display
|
||||
use({ "rbong/vim-flog", requires = "tpope/vim-fugitive", cmd = { "Flog" } })
|
||||
|
||||
Reference in New Issue
Block a user