Mastering CDEdit: Tips, Tricks, and Shortcuts
CDEdit is a powerful tool for quickly navigating and managing directories. This guide collects practical tips, useful shortcuts, and workflows to help you move faster and reduce friction when working with file systems.
Getting started: core concepts
- Navigation buffer: CDEdit keeps a history of visited directories — think of it like a smarter cd.
- Aliases: Save frequently visited paths for one-key jumps.
- Filters: Narrow visible entries by file type, name patterns, or modification time.
- Batch edits: Apply operations (rename, move, delete) to multiple selected entries.
Essential shortcuts
- j / k — move down / up the list.
- Enter — open directory or file.
- Backspace — go up one directory level.
- g / G — go to top / bottom of the list.
- / — start an incremental search; n to go to next match.
- a — add current directory to aliases/bookmarks.
- :rename — start inline rename for selected item(s).
- :move — move selected items to target path.
- :delete — delete selected items (confirm before executing).
- Tab — toggle multi-select mode.
- Ctrl+R — reload directory contents.
(Shortcuts may vary by version; check CDEdit’s help with ? or :help.)
Time-saving tricks
- Alias combinations: Use hierarchical aliases (e.g., work:project) to group related paths and jump between them quickly.
- Smart filters: Combine patterns — e.g.,
.md !draftto show Markdown files excluding drafts. - Preview pane: Enable preview for file content to avoid opening editors for quick checks.
- Command chaining: Use multiple colon commands in sequence (e.g.,
:select.log :delete) to run safe batch operations. - Temporary sessions: Launch CDEdit with a session name to keep a separate navigation history for different tasks.
Automation and scripting
- Use CDEdit’s CLI flags to start in a specific directory or restore a named session.
- Script common flows with shell wrappers. Example (bash):
Code
# open CDEdit in project dir and jump to ‘src’ cd /home/user/projects/myproj && cdit start –session myproj && cdit jump src
- Integrate with git: create a short command to open the repo root in CDEdit and show untracked/modified files via filters.
Safety best practices
- Dry-run first: When doing batch renames/moves, simulate operations where possible.
- Trash over delete: Prefer moving to trash/recycle bin instead of immediate deletion.
- Confirm destructive commands: Enable confirmation prompts for delete/move operations.
- Back up aliases and sessions periodically.
Advanced workflows
- Project switcher: Maintain per-project sessions with aliases, filters, and pinned files for rapid context switching.
- Review mode: Use filters to show only recently modified files and step through them with the preview pane for quick code reviews.
- Sync workflow: Combine CDEdit with rsync or file-sync services via custom commands to stage and push directory changes.
Troubleshooting common issues
- If directory view is stale, use Ctrl+R or
:reload. - If shortcuts conflict with terminal or OS keybindings, remap them in CDEdit’s config.
- For missing aliases after update, restore from your exported aliases file.
Further resources
- Use
:helpin CDEdit for version-specific commands and keybindings. - Export your configuration and keep it under version control to reproduce setups across machines.
Mastering CDEdit is mostly about building small, repeatable habits: use aliases, rely on filters and previews, automate routine moves, and always prefer safe operations. With those practices you’ll shave minutes — and sometimes hours — off common file-management tasks.
Leave a Reply