Bulk Renamer
Bulk rename directory files in Sublime Text
Labels utilities
Details
Installs
- Total 7
- Win 2
- Mac 4
- Linux 1
| May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Bulk Renamer
Sublime Bulk Renamer (sbr) allows you to bring the power of Sublime Text to… rename files in a directory.
Heavily inspired by oil.nvim and nnn's batch renamer. If you haven't used those, a video is perhaps the best way to introduce it:
https://github.com/user-attachments/assets/d457768d-2ce0-40ad-8a40-f22da839e094
Features
- You can do basically anything that Sublime and Python's Pathlib support.
- Handles cycles and chains gracefully, so you can swap the name of two files without worrying about data loss or overridding them accidentally.
- This also allows you to quickly open Sublime Text to bulk rename the current directory from your terminal, for example (Linux/OSX):
subl --command 'sbr_bulk_rename_in_dir {"dirs": ["'"$(pwd)"'"]}'
Limitations
- Unlike oil.nvim, this package does not allow creating or deleting files. This is intentionally not considered and is very unlikely to get added later on.
- Since sbr uses the
#character for comments in the View that gets opened for renaming, the end state of a directory can't have any children whose name begin with#. Sorry! I might add escapes (\#) at some point if anyone really needs it.
Future work
- add confirmation prompt on exit (settings-based)
- add visual indicators of file vs dir, maybe with annotation with the original name
- bulk rename including subdirectories, with configurable default depth
- (maybe) add side bar menu item for files, to bulk rename parent dir