Native Auto Wrapper Configuration
🎯 Overview
Your Neovim is now configured with native auto wrapper functionality using built-in Neovim features - no additional packages required!
✨ Features
Automatic Text Wrapping
- Text files: Auto-wrap at 80 characters
- Code files: Auto-wrap comments at 100 characters
- Documentation: Auto-wrap at 78 characters
- Configuration files: Auto-wrap comments at 80 characters
Smart Formatting
- Break at word boundaries: Lines break at natural word boundaries
- Preserve indentation: Wrapped lines maintain proper indentation
- Visual indicators: Shows break indicators (↪) for wrapped lines
- Color column: Visual guide at specified text width
🎮 Keymaps
Text Wrapping Controls
| Keymap |
Description |
<leader>tw |
Toggle line wrapping |
<leader>tl |
Toggle line break |
<leader>tc |
Show 80 character column guide |
<leader>tC |
Hide column guide |
Text Formatting
| Keymap |
Description |
<leader>tf |
Format current paragraph |
<leader>tF |
Format entire file |
<leader>tf (visual) |
Format selected text |
Text Width Settings
| Keymap |
Description |
<leader>t80 |
Set text width to 80 characters |
<leader>t100 |
Set text width to 100 characters |
<leader>t120 |
Set text width to 120 characters |
<leader>t0 |
Disable text width (no wrapping) |
Auto-wrap Controls
| Keymap |
Description |
<leader>ta |
Enable auto-wrap text |
<leader>tA |
Disable auto-wrap text |
<leader>tc |
Enable auto-wrap comments |
<leader>tC |
Disable auto-wrap comments |
Indentation and Display
| Keymap |
Description |
<leader>ti |
Toggle break indent |
<leader>ts |
Show break indicator (↪) |
<leader>tS |
Hide break indicator |
📁 File Type Specific Settings
Text and Documentation Files
- File types:
text, markdown, gitcommit, mail
- Text width: 80 characters
- Auto-wrap: Enabled for all text
- Line break: At word boundaries
Code Files
- File types:
lua, javascript, typescript, python, java, cpp, c, rust, go
- Text width: 100 characters
- Auto-wrap: Comments only
- Format options: Smart comment wrapping
Documentation Files
- File types:
help, man
- Text width: 78 characters
- Auto-wrap: Enabled for all text
- Line break: At word boundaries
Configuration Files
- File types:
conf, config, ini, toml, yaml, json
- Text width: 80 characters
- Auto-wrap: Comments only
🔧 Native Neovim Settings
Core Settings
Format Options
📝 Usage Examples
1. Writing Documentation
3. Writing Git Commit Messages
🎨 Visual Features
Break Indicators
- Symbol:
↪ shows where lines are wrapped
- Toggle: Use
<leader>ts to show/hide
Color Column
- Guide: Visual line at text width
- Toggle: Use
<leader>tc to show/hide
Indentation
- Preserved: Wrapped lines maintain indentation
- Smart: Proper indentation for code blocks
🔍 Troubleshooting
Text Not Wrapping
- Check if wrapping is enabled:
:set wrap?
- Verify text width:
:set textwidth?
- Check format options:
:set formatoptions?
- Ensure format option 'c' is set:
:set formatoptions+=c
- Check file type:
:set filetype?
- Verify text width is set:
:set textwidth?
Indentation Issues
- Enable break indent:
:set breakindent
- Check break indent options:
:set breakindentopt?
- Verify smart indent:
:set smartindent?
🚀 Advanced Configuration
Custom File Type Settings
Add to your configuration:
Custom Break Indicator
Custom Color Column
✅ Benefits of Native Configuration
- No additional packages: Uses built-in Neovim features
- Fast and lightweight: No external dependencies
- Consistent behavior: Works the same across all Neovim installations
- Easy to customize: Simple Lua configuration
- Reliable: No plugin conflicts or compatibility issues
Your native auto wrapper is now fully configured and ready to use! 🎉