require "nvchad.mappings" local map = vim.keymap.set -- remove nvim-tree mappings (using mini.files instead) vim.keymap.del("n", "e") vim.keymap.del("n", "") -- mini.files map("n", "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)" }) map("n", "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", "") -- close current buffer map("n", "q", ":q") -- go back to normal mode map("i", "jj", "") map("i", "jk", "") --save file map("n", "", ":update") map("i", "", ":update") -- remove search highlight map("n", ",", ":noh")