Case-Aware Transformations
Renamify’s most powerful feature is its ability to understand and convert between different naming conventions automatically.
Supported Case Styles
Section titled “Supported Case Styles”When you provide a search and replace pattern, Renamify automatically applies the transformation to all detected case variants:
Default Case Styles
Section titled “Default Case Styles”- snake_case →
old_name
→new_name
- kebab-case →
old-name
→new-name
- camelCase →
oldName
→newName
- PascalCase →
OldName
→NewName
- SCREAMING_SNAKE_CASE →
OLD_NAME
→NEW_NAME
Additional Case Styles
Section titled “Additional Case Styles”- Title Case →
Old Name
→New Name
- Train-Case →
Old-Name
→New-Name
- dot.case →
old.name
→new.name
Contextual Separator Coercion
Section titled “Contextual Separator Coercion”Renamify includes intelligent contextual separator coercion that adapts the replacement style based on the surrounding code context:
- Context-aware replacement:
renamify_core::Engine
becomesrenamed_renaming_tool_core::Engine
(snake_case context) - Path-aware:
src/renamify/main.rs
becomessrc/renamed-renaming-tool/main.rs
(kebab-case for paths) - URL-aware:
https://github.com/user/renamify
becomeshttps://github.com/user/renamed-renaming-tool
- Module-aware:
renamify::core::apply()
becomesrenamed_renaming_tool::core::apply()
The coercion analyzes the immediate context around each match to determine the most appropriate separator style, making renaming feel more natural and reducing manual corrections.
Controlling Case Styles
Section titled “Controlling Case Styles”Use Only Specific Styles
Section titled “Use Only Specific Styles”# Only handle camelCase and snake_caserenamify plan old_name new_name --only-styles camel,snake
Exclude Specific Styles
Section titled “Exclude Specific Styles”# Use defaults but exclude SCREAMING_SNAKE_CASErenamify plan old_name new_name --exclude-styles screaming-snake
Include Additional Styles
Section titled “Include Additional Styles”# Add Title Case and dot.case to the defaultsrenamify plan old_name new_name --include-styles title,dot
Style Names Reference
Section titled “Style Names Reference”Style Name | Example |
---|---|
snake | snake_case |
kebab | kebab-case |
camel | camelCase |
pascal | PascalCase |
screaming-snake | SCREAMING_SNAKE_CASE |
title | Title Case |
train | Train-Case |
dot | dot.case |
Examples
Section titled “Examples”Basic Case Transformation
Section titled “Basic Case Transformation”renamify plan getUserName fetchUserProfile
This will find and replace:
getUserName
→fetchUserProfile
get_user_name
→fetch_user_profile
GetUserName
→FetchUserProfile
GET_USER_NAME
→FETCH_USER_PROFILE
get-user-name
→fetch-user-profile
Custom Style Selection
Section titled “Custom Style Selection”# Only transform camelCase and PascalCase (common in TypeScript/React)renamify plan oldComponent newComponent --only-styles camel,pascal
# Exclude SCREAMING_SNAKE_CASE (maybe it's used for constants you don't want to change)renamify plan apiKey secretKey --exclude-styles screaming-snake
Including Extra Styles
Section titled “Including Extra Styles”# Include title case for documentation or UI textrenamify plan user_profile account_settings --include-styles title
This would also transform:
User Profile
→Account Settings
Boundary Detection
Section titled “Boundary Detection”Renamify is smart about word boundaries to avoid partial matches:
✅ Good matches:
getUserName()
- function callconst getUserName
- variable declarationgetUserName:
- object propertyget_user_name.py
- filename
❌ Avoided:
getUserNameFromAPI
- part of a longer identifierprefixgetUserName
- not at word boundary