Skip to content

Instantly share code, notes, and snippets.

@stnbu
Created May 10, 2018 19:48
Show Gist options
  • Save stnbu/0445a84828fdbca46960573b91182e58 to your computer and use it in GitHub Desktop.
Save stnbu/0445a84828fdbca46960573b91182e58 to your computer and use it in GitHub Desktop.
So all the right things magically happen, rename files instead of doing klunky things involving killing buffers...
;; from http://ergoemacs.org/emacs/rename_file_pattern.html
To rename multiple files in emacs, the most easy way is:
Alt+x dired to go to the directory.
Alt+x dired-toggle-read-only 【Ctrl+x Ctrl+q】.
Then, just edit the file names.
When done, wdired-finish-edit 【Ctrl+c Ctrl+c】 to commit the changes.
To abort, Alt+x wdired-abort-changes 【Ctrl+c Ctrl+k】.
You can use find replace when in edit mode. For example, Alt+x query-replace or Alt+x query-replace-regexp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment