ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Auto​Width

by sjpfenninger ST3

Sublime Text plugin to automatically adjust the text wrap width

Details

  • 0.1.1
  • github.​com
  • github.​com
  • 11 years ago
  • 42 minutes ago
  • 11 years ago

Installs

  • Total 2K
  • Win 1K
  • Mac 466
  • Linux 305
Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8
Windows 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

AutoWidth

A Sublime Text plugin to automatically adjust the text wrap width when the view becomes narrower than the pre-defined wrap width.

If you set a fixed wrap_width in the syntax specific settings for editing text (e.g. Markdown, reStructuredText), but sometimes have a window that's narrower than this wrap_width (for example when using several panes next to each other), this plugin will dynamically adjust the wrap_width to fit the view.

By default, the font size is also reduced by 1 when reducing wrap width. This behavior can be adjusted in the AutoWidth settings file, accessible in the Sublime Text preferences menu.

Installation

Tested on Sublime Text 3 only.

Via Package Control.

Use

Set "auto_width": true either in your global settings, or, more usefully, in syntax-specific settings. For example, consider these syntax-specific settings for Markdown:

{
    "draw_centered": true,
    "font_size": 14,
    "line_numbers": false,
    "wrap_width": 98,
    "auto_width": true
}

These settings will display Markdown text in a 98 character wide and centered column, without line numbers, and in a larger font.

With auto_width enabled, Sublime Text will also automatically adjust the wrap width downwards if necessary if the view becomes too narrow, and then reset it to its default specified in the settings file when the view is wide enough again.

Wrap width is adjusted whenever a view becomes active. If you resize a window you can force an adjust by pressing F10 (FN+F10 on OS X).

License

GNU GPL version 3