require('nvim-tree').setup({ hijack_netrw = true, hijack_directories = { enable = true, auto_open = true, }, view = { mappings = { list = { { key = "", action = "edit_in_place" }, { key = "", action = "toggle_file_info" }, } } }, remove_keymaps = { '' }, }) local function toggle_replace() local view = require('nvim-tree.view') if view.is_visible() then view.close() else require('nvim-tree').open_replacing_current_buffer() end end vim.keymap.set('n', '-', function() toggle_replace() end, { noremap = true, silent = true })