Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move files to subfolders more easily? #34

Open
sarnobat opened this issue Dec 26, 2020 · 5 comments
Open

Move files to subfolders more easily? #34

sarnobat opened this issue Dec 26, 2020 · 5 comments

Comments

@sarnobat
Copy link

sarnobat commented Dec 26, 2020

(This is more of a question / enhancement request than a bug)

I love this tool for deleting and renaming files and had dreamed it up almost exactly as it is before finding this.

The one missing thing for me to use this religiously is to easily move files to subfolders. I know you can use multiple terminals, but what would be ideal is to be able to move dir1/file1.txt to dir1/dir2/file2.txt in a single terminal (maybe using whitespace indentation, or just renaming with a slash in the name).

Could you possibly:

  • consider adding this, or explain how difficult it would be to implement
  • suggest any other tool that does something like this

Actually I noticed rename works as long as the target subdir dir1/dir2 exists, which is great. It's still a bit much typing rather than just moving a line. Also, if the subdir dir1/dir2 doesn't exist, the file is lost. Ideally it should just reject the move.

Great work and thank you regardless.

@abaldwin88
Copy link
Owner

Thanks! Always good to hear when people find a package helpful.

I like this idea. We'd probably want to stick it behind a --flag so users could opt into this functionality. It wouldn't be terribly hard to implement but not super easy either. Would require a fair amount of changes to engine.py. I don't see myself having enough spare time for the foreseeable future to implement but will review/merge a PR.

Regarding alternatives...

  • I have a half baked solution in a Vim plugin for jumping into subfolders to start a new roamer session. Different solution but it's attacking the same problem of making subdirs seamless. See development branch here: https://github.com/abaldwin88/roamer.vim

  • Might be worth checking out vidir and seeing if that approach works for you: https://github.com/trapd00r/vidir

@sarnobat
Copy link
Author

Thanks for the reply. Yes I anticipate the line-oriented nature of the tool would not be able to easily handle multi-line relationships. For now it's just good to have this enhancement request on record regardless of any time line.

I did later find vidir which does (and doesn't) do exactly the functionality that yours provides.

@curious-liberal
Copy link

@sarnobat There is a rather simple solution to this. I am using neovim however I believe this works with standard vim.

nvim .

Produces:

image

Here you should be able to do everything you wish to :)

@sarnobat
Copy link
Author

sarnobat commented May 8, 2023

@sarnobat There is a rather simple solution to this. I am using neovim however I believe this works with standard vim.

I think you're right, thanks for going through the trouble of capturing the screenshot.

I must confess I forgot exactly what my ideal use case was but I think this is something I should play with some more.

@curious-liberal
Copy link

The screenshot wasn't an issue :)

I'm yet to find something I can't do with Neovim in regards to this functionality and therefore I didn't contribute to this project. However I believe the project is very interesting and a good option for those wanting to make their first contribution on GitHub!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants