Property research: maximum line length
Clone this wiki locally
Option for setting a maximum length for each line
max_line_length option (or similarly named option) will force either hard or soft line wrapping after the amount of characters specified.
When the typing, the editor automatically wraps the current word to a new line if it reaches the given limit.
- How should line length be set when tabs are used?
- Should line be wrapped immediately once length is hit or once line is left/Enter is pressed?
- Should this be disable-able by the user in case they want to control this manually?
Support in Editors
Sublime Text 2
The setting is
rulers setting allows you to provide an array of column numbers at which a vertical ruler will be displayed.
The setting is
Maximum width of text that is being inserted. A longer line will be broken after white space to get this width. A zero value disables this. 'textwidth' is set to 0 when the 'paste' option is set. When 'textwidth' is zero, 'wrapmargin' may be used. See also 'formatoptions' and ins-textwidth. When 'formatexpr' is set it will be used to break the line. NOTE: This option is set to 0 when 'compatible' is set.
colorcolumn just displays a vertical line but doesn't enforce the width.
'colorcolumn' is a comma separated list of screen columns that are highlighted with ColorColumn hl-ColorColumn. Useful to align text. Will make screen redrawing slower. The screen column can be an absolute number, or a number preceded with '+' or '-', which is added to or subtracted from 'textwidth'.
fill-column: "Column beyond which automatic line-wrapping should happen."
- Used by
auto-fill-modeminor mode wraps long lines automatically when the user types a newline. It's possible for a script to enable
auto-fill-modeon the user's behalf, but IIRC this is frowned upon in the Emacs community.
- Document, Line Breaking: enables line breaking at boundary.
- Edit, Preferences, Editor, Features, Line breaking column: sets where the boundary is
- Edit, Preferences, Editor, Display, Column: sets at what column a vertical line indicator should be
Not possible. Can be manually done by TextFX plugin to rewrap selected text. ( TextFX -> TextFX Edit -> ReWrap Text to (72 or clipboard) width )
Has a "Display right margin at column:" preference to display what width we want the text to be. It doesn't support a mode to enforce that width though. Maybe trough plugins.
maxLineLen to the line max width, and
wrap to hard for real line break. See these buffer local properties here.
Settings, Editor, Margins and caret, right margin hint: visible line & hint column