You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw that there is no "move" function on nvim-tree. Was that an oversight from me, or is there really no move?
Can this functionality be implemented utilising API?
It should be possible, as we can already cut and paste.
Is your feature request related to a problem? Please describe.
I wanted to move a file from something/else/file.lua to something/file.lua. You can achieve that by cutting and pasting, but why not have both in one step.
Describe the solution you'd like
Just a move function. The window for moving it to somewhere else could look the same as the rename but also show the path that can be altered.
Activity
j-ole commentedon Jun 22, 2023
It's on the wiki: https://github.com/nvim-tree/nvim-tree.lua/wiki/Recipes#nerdtree-style-copy-file-to
aneshodza commentedon Jun 22, 2023
But this is still a copy (it doesn't remove the old location). This function does a
cp, instead of anmvNow:
To move:
But the message I'm getting from this, is that the lack of a move is a design choice?
j-ole commentedon Jun 22, 2023
removing the
'-R'flag worksaneshodza commentedon Jun 22, 2023
But
cpis still a copy. I'm talking about having a built inmove_file_to. Maybe by just copying and slightly changingcopy_file_to.j-ole commentedon Jun 22, 2023
yes you can rename the function. I've updated the snippet.
aneshodza commentedon Jun 22, 2023
Alright, thanks! Im wondering why this isn't in per default.
alex-courtis commentedon Jun 25, 2023
Many thanks @joelpeapen