From b611b6b90d1de432c51105331f1fd5ba88cc5e6b Mon Sep 17 00:00:00 2001 From: SL1900 <43700351+SL1900@users.noreply.github.com> Date: Sat, 30 May 2026 13:23:13 +0900 Subject: [PATCH] centering --- remap.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/remap.lua b/remap.lua index c51fbe1..4cba70a 100644 --- a/remap.lua +++ b/remap.lua @@ -3,14 +3,20 @@ vim.keymap.set("v", "K", ":m '<-2gv=gv") vim.keymap.set("x", "p", "\"_dP") +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "", "zz") + if package.config:sub(1, 1) == "\\" then vim.keymap.set("n", "oe", ":!explorer .", { desc = "[O]pen [E]xplorer in current working directory" }) vim.keymap.set("n", "ot", ":!wt -w 0 nt -d .", { desc = "[O]pen Windows [T]erminal in current working directory" }) vim.keymap.set("n", "oce", function() - local path = vim.api.nvim_buf_get_name(0) - local dir = path:sub(1, path:find('\\[^\\]*$')) - os.execute("explorer " .. dir) + -- local path = vim.api.nvim_buf_get_name(0) + -- local dir = path:sub(1, path:find('\\[^\\]*$')) + local dir = vim.fn.expand("%:p:h") + dir = string.gsub(dir, "/", "\\") + print(dir) + os.execute("explorer \"" .. dir .. "\"") end, { desc = "[O]pen [C]urrent buffer [Explorer]" }) end