Popular recipes tagged "wrap" but not "text"http://code.activestate.com/recipes/tags/wrap-text/2012-06-07T14:31:44-07:00ActiveState Code RecipesMinimalistic Word Wrap using Regex (Python)
2012-06-07T14:31:44-07:00Alfehttp://code.activestate.com/recipes/users/4182236/http://code.activestate.com/recipes/578162-minimalistic-word-wrap-using-regex/
<p style="color: grey">
Python
recipe 578162
by <a href="/recipes/users/4182236/">Alfe</a>
(<a href="/recipes/tags/minimalistic/">minimalistic</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/wrap/">wrap</a>).
</p>
<p>I know there is the module textwrap and other recipes like <a href="http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/" rel="nofollow">http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/</a></p>
<p>But in some constellations my recipe for a very simple word wrap might come in handy nevertheless.</p>
Komodo JS Macro: Real auto word-wrap (JavaScript)
2012-04-10T17:38:13-07:00Furlohttp://code.activestate.com/recipes/users/4180513/http://code.activestate.com/recipes/578099-komodo-js-macro-real-auto-word-wrap/
<p style="color: grey">
JavaScript
recipe 578099
by <a href="/recipes/users/4180513/">Furlo</a>
(<a href="/recipes/tags/auto/">auto</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/wrap/">wrap</a>).
</p>
<p>This script will add real auto-wrap functionality to Komodo, ie. it will wrap text after reaching column 80 just in the same way as you would by pressing <Enter>.</p>
<p>You can bind a keyboard shortcut to macro, or trigger it on Komodo startup, or both. Either way, repeated pressing of binded shortcut (or running the macro) will switch it off and on again.</p>
<p>In fact, script only adds event listener, which fires a function (after each keypress), that checks if cursor position is not in column higher that 79 and, if needed, calls Komodo built-in function "Reflow paragraph" to reflow the paragraph.</p>
<p>This recipe was not created by me from scratch. I have just read David Brewer's feature request at <a href="http://code.activestate.com/lists/komodo-discuss/4965/">komodo-discuss</a>, used <a href="http://www.openkomodo.com/blogs/troyt/revenge-auto-wrap-type-type-type-ding">troyt's original code</a> for autowrap and tweaked/simplified it a little.</p>