Soft-Wrap Text in BBEdit

An oldie but goodie from John Gruber that I just discovered while looking for ways to soft-wrap text in BBEdit:

tell application "BBEdit"
    tell window 1
        if not (soft wrap text) then
            set soft wrap text to true
            set soft wrap mode to page guide
            set show page guide to true
        else if (soft wrap mode is page guide) then
            set soft wrap mode to window width
            set show page guide to false
        else
            set soft wrap text to false
        end if
    end tell
end tell

I use BBEdit all the time for editing text. LaunchBar fires the script for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax