diff --git a/lua/mappings.lua b/lua/mappings.lua index c59592f..cfd6e1b 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -153,3 +153,9 @@ vim.cmd("silent! command PackerInstall lua require 'pluginList' require('packer' vim.cmd("silent! command PackerStatus lua require 'pluginList' require('packer').status()") vim.cmd("silent! command PackerSync lua require 'pluginList' require('packer').sync()") vim.cmd("silent! command PackerUpdate lua require 'pluginList' require('packer').update()") + +-- Vim Fugitive +map("n", "gs", ":Git", opt) +map("n", "gh", ":diffget //2", opt) +map("n", "gl", ":diffget //3", opt) +map("n", "gb", ":Git blame", opt) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index 8810417..6d476af 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -243,5 +243,12 @@ return packer.startup( require("plugins.others").blankline() end } + + use { + "tpope/vim-fugitive", + cmd = { + "Git" + } + } end )