-
Notifications
You must be signed in to change notification settings - Fork 118
Property research: maximum line length
This page includes research for two options discussed in issue #89.
A new option will force editors to show a vertical rules at certain column(s).
A max_line_length option (or similarly named option) will force either hard or soft line wrapping after the amount of characters specified.
- The editor should display vertical rulers at the given rulers columns.
- When typing, the editor automatically wraps the current word to a new line if it reaches the given limit.
For the first item:
- rulers
- line_width
For the second item:
- text_width
- line_width
- wrap_width
- max_line_length
- right_margin
- 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?
The setting is wrap_width.
The rulers setting allows you to provide an array of column numbers at which a vertical ruler will be displayed.
The setting is textwidth.
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.
The setting 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'.
- Variable
fill-column: "Column beyond which automatic line-wrapping should happen." - Used by
M-x fill-paragraphandauto-fill-modeamong others. - The
auto-fill-modeminor mode wraps long lines automatically when the user types a newline. It's possible for a script to enableauto-fill-modeon the user's behalf, but IIRC this is frowned upon in the Emacs community. - Although not included in Emacs itself, there is also the fill-column-indicator package in ELPA and Debian.
- 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 )
Notepad++ has a setting to display (multiple) "rulers" i.e. visual indicator(s) by means of a colored line. See Settings > Preferences... > Margins/Border/Edge > Vertical Edge Settings:
Add your column marker by indicating its position with a decimal number. You can define several column markers by using white space to separate the different numbers.
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.
Set maxLineLen to the line max width, and wrap to hard for real line break. See these buffer local properties here.
Not possible.
Settings, Editor, Margins and caret, right margin hint: visible line & hint column
TODO
EditorConfig Guidelines
extension adds support for guidelines .editorconfig property.
Set a value (e.g., 100) in "editor.rulers": [ 100 ]
The wiki is disabled from public edits due to spams. If you would like to request a change in wiki, please open a new discussion.