Emacs Dired rename many files

喜你入骨 提交于 2019-12-02 18:04:29

This can easily be done using dired:

  1. Enter a dired view of your directory

  2. Switch to writable dired mode (wdired-change-to-wdired-mode): C-xC-q

  3. Edit the file names listing as if it were a normal buffer (for example using a keyboard macro or a rectangular selection or query-replace). Here is a regexp-based solution:

    C-M-%\(VAR.\)_\(..\)RET\2_\1RET

  4. Finish editing (wdired-finish-edit): C-xC-s or C-cC-c

You're done!

You could also use Magnar Sveen's multiple-cursors from here, github link.

Switch to writable dired, select the files you want to rename, M-x mc/edit-lines. This should create multiple cursor each with its own kill history.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!