justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.19k stars 64 forks source link

`vidir` like functionality in dirvish #238

Closed kovasap closed 1 year ago

kovasap commented 1 year ago

I just learned about a cool tool called vidir that lets you rename files by editing their names in a vi buffer that looks very similar to a dirvish buffer. It seems like it would be very natural to replicate this functionality in dirvish itself. Has this ever been considered?

justinmk commented 1 year ago

Yes it was considered. The name "dirvish" is partially a reference to vidir and similar tools. Emacs dired has similar functionality.

But Dirvish intentionally doesn't try to add a magic layer. The goal is just to leverage Vim's shell + editing features. :Shdo and related mappings make it fairly ergonomic to "rename files by editing their names in a vi buffer", did you try that?

Example:

:Dirvish (or -)
[use "x" or visual-selection to select files]
[count].
Shdo! mv {} {}
[use `*` and `cgn` to rename files]
Z!