This commit is contained in:
Miguel Palhas
2025-12-17 12:28:53 +00:00
parent 6313519050
commit 4a7bd72018
2 changed files with 81 additions and 15 deletions
+15 -2
View File
@@ -1,12 +1,25 @@
require "nvchad.mappings"
local map = vim.keymap.set
-- remove nvim-tree mappings (using mini.files instead)
vim.keymap.del("n", "<leader>e")
vim.keymap.del("n", "<C-n>")
-- add yours here
-- mini.files
map("n", "<leader>e", function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.api.nvim_buf_get_name(0))
end
end, { desc = "File explorer (current file)" })
local map = vim.keymap.set
map("n", "<leader>E", function()
local MiniFiles = require "mini.files"
if not MiniFiles.close() then
MiniFiles.open(vim.uv.cwd())
end
end, { desc = "File explorer (cwd)" })
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")