Awesome
Auto (Hard) Wrap for Sublime Text 2/3
<a href="https://packagecontrol.io/packages/AutoWrap"><img src="https://packagecontrol.herokuapp.com/downloads/AutoWrap.svg"></a> <a href="https://www.paypal.me/randy3k/5usd" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-blue.svg" /></a>
Automatic hard wrap beyond wrap width. It could be useful for text documents. Sublime-Wrap-Plus could be used together with AutoWrap for the best experience.
Installation
Usage
To toggle Auto Wrap
Type Auto Wrap
in command palette or Go to menu Edit -> Auto Wrap
.
Control wrap width
Wrap width is detected in the following order
auto_wrap_width
wrap_width
rulers
- default 80
Settings
To activate Auto Wrap for a specific syntax at start up
Put the following in your syntax specific preference.<br> Menu -> Preference -> Settings - More -> Syntax Specific - User
{
"auto_wrap" : true
}
You can also change auto_wrap_width
by
{
"auto_wrap_width" : 100
}
Long words
In default, long word will break into a new line. To disable this behavior, consider
{
"auto_wrap_break_long_word" : false
}
Break beyond wrap width only
If true, long sentence will break only if the cursor is beyond wrap width.
{
"auto_wrap_beyond_only" : true
}
Break patterns
Upon typing, AutoWrap searches for these characters (in regex, to be concatenate by |
) and a line would break at (right before) a matched location. Note that Backslash has to be double escaped.
{
# it is the default
"auto_wrap_break_patterns" : ["\\[", "\\(", "\\{", " ", "\\n"]
}