# 📖 Advanced Layer Renamer - User Guide

## 🚀 Quick Start

1. Select layers you want to rename (or use "Select All")
2. Configure your renaming options in the right panel
3. Click "Preview Changes" to see what will happen
4. Click "Rename Layers" to apply the changes

💡 Pro Tip: Always preview your changes before renaming to avoid mistakes!

## 🔧 Main Features

### 🔢 Numbering Options

- No numbering: Keep original names unchanged
- Sequential: Add simple numbers (1_layername, 2_layername)
- Leading zeros: Add padded numbers (01_layername, 02_layername)

### 📝 Basic Options

- Prefix/Suffix: Add text before/after layer names
- Find/Replace: Replace specific text in names
- Regex: Use regular expressions for advanced pattern matching
- Case Options:
  - `UPPERCASE`: "layer_name" → "LAYER_NAME"
  - `lowercase`: "Layer_Name" → "layer_name"
  - `Title Case`: "layer_name" → "Layer_Name"
  - `Capitalized`: "layer_name" → "Layer_name"

### ⚙️ Advanced Options

- Date Stamp: Add current date to layer names
- Remove Special Chars: Clean invalid characters
- Clean Whitespace: Remove extra spaces

## 💾 Templates Tab

Save your favorite renaming configurations:

- Save Template: Save current settings for future use
- Load Template: Apply saved settings
- Delete Template: Remove unwanted templates
- Quick Templates: Apply common naming conventions

## ⚡ Quick Template Examples

- Date Prefix: Adds current date (e.g., "20231201_roads")
- Clean Names: Removes special characters and cleans whitespace
- Project Standard: Uses leading zeros and clean whitespace

## ✅ Validation Tab

Check for potential naming issues:

- Invalid characters (< > : " / \ | ? *)
- Name length limits
- Empty or whitespace-only names
- Leading/trailing spaces

## 💡 Pro Tips

- Always preview before renaming
- Use templates for consistent project naming
- Validate names before sharing projects
- Combine multiple options for complex renaming
- Use regex for advanced pattern matching

## 🔄 Example Workflows

#### Workflow 1: Standard Project Naming

1. Select "Leading zeros" numbering
2. Add prefix "ProjectA_"
3. Enable "Clean extra whitespace"
4. Click "Preview Changes"
5. Click "Rename Layers"

Result: "01_ProjectA_roads", "02_ProjectA_rivers"

#### Workflow 2: Date-Stamped Layers

1. Click "📅 Date Prefix" quick template
2. Select date format
3. Click "Preview Changes"
4. Click "Rename Layers"

Result: "20231201_roads", "20231201_rivers"

#### Workflow 3: Clean Existing Names

1. Click "🧹 Clean Names" quick template
2. Review preview
3. Click "Rename Layers"

Result: Removes special chars and cleans whitespace

## ❓ Troubleshooting

- Nothing happens when clicking buttons: Make sure layers are selected
- Invalid regex error: Check your regular expression syntax
- Names not changing: Verify that your settings actually modify the names
- Templates not saving: Check write permissions in plugin directory

## 📧 Support

If you encounter issues or have suggestions, please contact the plugin developer.