From 8604e18578123f819a96d09ade9111f563d4b1e0 Mon Sep 17 00:00:00 2001
From: Tovi Jaeschke-Rogers <tovi@codium.com.au>
Date: Fri, 7 Mar 2025 12:56:00 +1030
Subject: [PATCH] fix: revert oil keymap

---
 .config/nvim/lua/core/remaps.lua      |   4 -
 .config/nvim/lua/plugins/fugitive.lua | 104 ++++++++++++++------------
 .config/nvim/lua/plugins/oil.lua      |   2 +-
 3 files changed, 58 insertions(+), 52 deletions(-)

diff --git a/.config/nvim/lua/core/remaps.lua b/.config/nvim/lua/core/remaps.lua
index 95afadf..1145622 100644
--- a/.config/nvim/lua/core/remaps.lua
+++ b/.config/nvim/lua/core/remaps.lua
@@ -43,10 +43,6 @@ vim.keymap.set("n", "N", "Nzzzv", { desc = "Previous search result" })
 vim.keymap.set("n", "<leader>N", "<cmd>cprev<CR>zz", { desc = "Previous item in quickfix list" })
 vim.keymap.set("n", "<leader>n", "<cmd>cnext<CR>zz", { desc = "Next item in quickfix list" })
 
--- Increment/decrement
-vim.keymap.set("n", "+", "<C-a>")
-vim.keymap.set("n", "-", "<C-x>")
-
 -- Resize window
 vim.keymap.set("n", "<C-w><left>", "5<C-w><")
 vim.keymap.set("n", "<C-w><right>", "5<C-w>>")
diff --git a/.config/nvim/lua/plugins/fugitive.lua b/.config/nvim/lua/plugins/fugitive.lua
index 539e9c4..182e9c3 100644
--- a/.config/nvim/lua/plugins/fugitive.lua
+++ b/.config/nvim/lua/plugins/fugitive.lua
@@ -1,49 +1,59 @@
 return {
-	"tpope/vim-fugitive",
-	event = "VeryLazy",
-	dependencies = {
-		"shumphrey/fugitive-gitlab.vim",
-	},
-	config = function()
-		vim.opt.diffopt = vim.opt.diffopt + "vertical"
-		vim.opt.display = vim.opt.display + "lastline"
-
-		local fugitive_augroup = vim.api.nvim_create_augroup("fugitive_mappings", { clear = true })
-
-		local function set_fugitive_mappings()
-			local opts = { noremap = true, silent = true }
-
-			vim.api.nvim_buf_set_keymap(0, "n", "<leader>gp", "<cmd>Git push<CR>", opts)
-			vim.api.nvim_buf_set_keymap(0, "n", "<leader>gP", "<cmd>Git pull<CR>", opts)
-			vim.api.nvim_buf_set_keymap(0, "n", "<leader>gc", "<cmd>Git commit<CR>", opts)
-		end
-
-		-- Create an autocmd to trigger the function when entering a Fugitive buffer
-		vim.api.nvim_create_autocmd("FileType", {
-			group = fugitive_augroup,
-			pattern = "fugitive",
-			callback = set_fugitive_mappings,
-		})
-
-		local opts = { noremap = true, silent = true }
-
-		vim.keymap.set("n", "<leader>gg", function ()
-            vim.cmd("Git")
-		end, opts)
-
-		vim.keymap.set("v", "<leader>gl", function()
-            local startPos = vim.fn.getpos("v")
-            local endPos = vim.fn.getpos(".")
-
-            local startLine = math.min(startPos[2], endPos[2])
-            local endLine = math.max(startPos[2], endPos[2])
-
-			if startLine == 0 or endLine == 0 then
-				vim.notify(vim.inspect(vim.fn.getpos("'<")) .. " to " .. vim.inspect(vim.fn.getpos("'>")))
-				return
-			end
-
-			vim.cmd(string.format("Git log -L %d,%d:%s", startLine, endLine, vim.fn.expand("%:.")))
-		end, opts)
-	end,
+    {
+        "tpope/vim-fugitive",
+        event = "VeryLazy",
+        dependencies = {
+            "shumphrey/fugitive-gitlab.vim",
+        },
+        config = function()
+            vim.opt.diffopt = vim.opt.diffopt + "vertical"
+            vim.opt.display = vim.opt.display + "lastline"
+
+            local fugitive_augroup = vim.api.nvim_create_augroup("fugitive_mappings", { clear = true })
+
+            local function set_fugitive_mappings()
+                local opts = { noremap = true, silent = true }
+
+                vim.api.nvim_buf_set_keymap(0, "n", "<leader>gp", "<cmd>Git push<CR>", opts)
+                vim.api.nvim_buf_set_keymap(0, "n", "<leader>gP", "<cmd>Git pull<CR>", opts)
+                vim.api.nvim_buf_set_keymap(0, "n", "<leader>gc", "<cmd>Git commit<CR>", opts)
+            end
+
+            -- Create an autocmd to trigger the function when entering a Fugitive buffer
+            vim.api.nvim_create_autocmd("FileType", {
+                group = fugitive_augroup,
+                pattern = "fugitive",
+                callback = set_fugitive_mappings,
+            })
+
+            local opts = { noremap = true, silent = true }
+
+            vim.keymap.set("n", "<leader>gg", function ()
+                vim.cmd("Git")
+            end, opts)
+
+            vim.keymap.set("v", "<leader>gl", function()
+                local startPos = vim.fn.getpos("v")
+                local endPos = vim.fn.getpos(".")
+
+                local startLine = math.min(startPos[2], endPos[2])
+                local endLine = math.max(startPos[2], endPos[2])
+
+                if startLine == 0 or endLine == 0 then
+                    vim.notify(vim.inspect(vim.fn.getpos("'<")) .. " to " .. vim.inspect(vim.fn.getpos("'>")))
+                    return
+                end
+
+                vim.cmd(string.format("Git log -L %d,%d:%s", startLine, endLine, vim.fn.expand("%:.")))
+            end, opts)
+        end,
+    },
+    {
+        "rbong/vim-flog",
+        lazy = true,
+        cmd = { "Flog", "Flogsplit", "Floggit" },
+        dependencies = {
+            "tpope/vim-fugitive",
+        },
+    },
 }
diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua
index 32afdff..130cc82 100644
--- a/.config/nvim/lua/plugins/oil.lua
+++ b/.config/nvim/lua/plugins/oil.lua
@@ -82,7 +82,7 @@ return {
 			},
 		})
 
-		vim.keymap.set("n", "_", function()
+		vim.keymap.set("n", "-", function()
 			vim.cmd("Oil")
 		end, { desc = "Open parent directory" })
 	end,