fixing issues on nerd tree modifying the tree
This commit is contained in:
@@ -73,32 +73,32 @@ return {
|
|||||||
|
|
||||||
-- File Management keybindings
|
-- File Management keybindings
|
||||||
vim.keymap.set("n", "a", function() -- Add a new file
|
vim.keymap.set("n", "a", function() -- Add a new file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.create()
|
api.fs.create()
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "r", function() -- Rename file
|
vim.keymap.set("n", "r", function() -- Rename file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.rename()
|
api.fs.rename()
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "d", function() -- Delete file
|
vim.keymap.set("n", "d", function() -- Delete file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.remove()
|
api.fs.remove()
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "x", function() -- Cut (move) file
|
vim.keymap.set("n", "x", function() -- Cut (move) file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.cut()
|
api.fs.cut()
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "p", function() -- Paste file
|
vim.keymap.set("n", "p", function() -- Paste file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.paste()
|
api.fs.paste()
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "y", function() -- Copy file
|
vim.keymap.set("n", "y", function() -- Copy file
|
||||||
vim.cmd("set modifiable") -- Ensure modifiable mode is on
|
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
|
||||||
api.fs.copy.node()
|
api.fs.copy.node()
|
||||||
end, opts)
|
end, opts)
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user