Vimv: A Generic Bulk Rename Utility, Perfect For Lf

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 27

  • @BrodieRobertson
    @BrodieRobertson  4 года назад +3

    I keep seeing people in the comments mention something called vidir, I hadn't come across that one myself but maybe it'll be a better option. Let me know what you guys think, I'm not big on bulk renaming in the first place so this tool seems to just do the job.

  • @vlmath314
    @vlmath314 4 года назад +7

    vidir is also perfect for that. you can also delete a file and move it to an other folder entirly, even if the folder dont exists at the moment (will be created as needed)

    • @faerryn8708
      @faerryn8708 4 года назад +3

      It's in moreutils!
      www.archlinux.org/packages/community/x86_64/moreutils/

    • @BrodieRobertson
      @BrodieRobertson  4 года назад +1

      I did not know about more utils, that seems kind of cool

    • @vlmath314
      @vlmath314 4 года назад +1

      @@BrodieRobertson a vid on it in the future ?

  • @philippglira1518
    @philippglira1518 4 года назад +1

    That's a feature vifm has already built in. Even a little bit better, as it also shows the original file names in a split on the right side.

    • @BrodieRobertson
      @BrodieRobertson  4 года назад

      I know that ranger and vifim already have the feature but I'm an lf user and I wanted a way to also do the same thing.

    • @pippppooo
      @pippppooo 4 года назад +1

      @@BrodieRobertson I've also used lf for a long time and used vidir (github.com/trapd00r/vidir) for bulk renaming. However, I switched back to vifm for several reasons.

    • @rochr4
      @rochr4 4 года назад

      In ranger there is :bulkrename for normalizing exotic file names including spaces I use detox.

  • @salmanabedin1313
    @salmanabedin1313 4 года назад +1

    ViMv seems to be not working properly when it comes to names with spaces. It is splitting them in new lines. See if you can find a way to fix that. I've tried quoting the files variable. Apparently it is giving me the names right but I am failing to save the changes afterwards.
    P.S.: Give ViDir a shot. It's working perfectly. Here are the steps...
    1. yay -S vidir
    2. VISUAL=nvim (in your .profile/.xprofile)
    3. map b $vidir (in your lfrc)
    4. Now pressing b will open all the file names(including hidden files) of the directory you are browsing on a vim buffer

    • @BrodieRobertson
      @BrodieRobertson  4 года назад

      That's weird it seemed to be working just fine for me

  • @fan_juggler
    @fan_juggler 4 года назад

    For comparison, in vifm you just select files you want to rename using the visual mode (like in vim), then click cw (like in vim), it opens vim with the these filenames, you change and save-quit. Makes much more sense for vim users.

    • @yash1152
      @yash1152 2 года назад

      thanks for info

  • @dawitabate1595
    @dawitabate1595 4 года назад +1

    I had wrote a few lines of script in lf config script to add this functionality. It is pretty easy to write one. It had checks if the line count is not changed too. In-case you deleted a line Which by the way is very messy.

    • @BrodieRobertson
      @BrodieRobertson  4 года назад

      I don't tend to use the functionality to often so I just looked for the simplest solution.

  • @abhishekdeshmukh4134
    @abhishekdeshmukh4134 3 года назад +1

    Just a note: It doesn't work if you wanna exchange files' names

  • @umka7536
    @umka7536 4 года назад

    Actually, you don't need it. You can use just vim mode in shell. In Bash pressing of "v" in the normal mode opens VIM/NeoVim as your long commands editor. You can do all this there. And when you 'wq' all commands will be executed.
    Another useful tool is 'rename'. Uses 'sed' syntax including regex for renaming of files via substitution.
    I also use shell "v" for management of my long git commits. You can do ":r! git status" and then add/remove, stage or unstage your project files.

    • @BrodieRobertson
      @BrodieRobertson  4 года назад

      Your first point doesn't really help if I'm trying to do stuff from lf for example, I might checkout rename though

  • @MoreChannelNoise
    @MoreChannelNoise 4 года назад +1

    I think you normally add a link to the program/script, I don't see it. I easily got it though, although a goodle search came up with two on github, but I notice in the vid you use the one by thameera

  • @Vulto166
    @Vulto166 4 года назад

    I have to admit.
    This screefetch showing up every time you open up a terminal is very annoying to me.

  • @senninscorpion
    @senninscorpion 4 года назад

    Very interesting, I myself use vidir. It does the job well

  • @kj-marslander
    @kj-marslander 2 года назад

    you can pipe names to vimv using xargs. "find . -type f -name foobar | xargs vimv"