-- open help windows in a vertical split
 vim.api.nvim_create_autocmd("BufWinEnter", {
-    pattern = { "*.txt" },
+    pattern = { "*" },
     callback = function()
-        if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end
+        if vim.o.filetype == 'help' or 'fugitive' or 'gitcommit' then
+            vim.cmd.wincmd("L")
+        end
     end
 })
 
 
     { 'tpope/vim-commentary',                event = "VeryLazy" },
     { 'lukas-reineke/indent-blankline.nvim', event = 'VeryLazy' },
 
+    {
+        'tpope/vim-fugitive',
+        keys = {
+            { '<leader>G',  '<CMD>Git<CR>' },
+            { '<leader>gc', '<CMD>Git commit<CR>' },
+            { '<leader>ga', '<CMD>Git add %<CR>' },
+            { '<leader>gd', '<CMD>Gdiffsplit<CR>' },
+            { '<leader>gb', '<CMD>Git blame<CR>' },
+        },
+    },
+
     {
         'akinsho/toggleterm.nvim',
         keys = { { '<leader><space>', '<CMD>ToggleTerm<CR>' } },
 
             { '<leader>b',     '<CMD>Telescope buffers<CR>' },
             { '<leader><C-r>', '<CMD>Telescope command_history<CR>' },
             { '<leader>D',     '<CMD>Telescope diagnostics<CR>' },
-            { '<leader>g',     '<CMD>Telescope git_commits<CR>' },
         },
         config = function()
             require('telescope').setup {