Under Development
stars

Text Wrapping#

NeoMutt provides several options to control how long lines are displayed in the Pager.

This guide covers the wrap width, format=flowed reflowing, word-boundary wrapping, line continuation markers, and tilde padding.

Variables#

Name

Type

Default

$markers

boolean

yes

$reflow_wrap

number

78

$smart_wrap

boolean

yes

$tilde

boolean

no

$wrap

number

0

Wrap Width ($wrap)#

$wrap controls the column at which NeoMutt wraps lines in the pager.

  • Positive value β€” wrap at exactly that column

  • Negative value β€” wrap leaving that many columns of space on the right

  • Zero (default) β€” wrap at the terminal width

Example: set wrap = 40#

Text is hard-wrapped at column 40:

Text Wrapping
It is a truth universally acknowledged,                                         
that a single man in possession of a                                            
good fortune, must be in want of a                                              
wife. However little known the feelings                                         
or views of such a man may be on his                                            
first entering a neighbourhood, this                                            
truth is so well fixed in the minds of                                          
the surrounding families, that he is                                            
considered as the rightful property of                                          
some one or other of their daughters.                                           
         |         |         |         |         |         |         |         |
       10|       20|       30|       40|       50|       60|       70|       80|

Example: set wrap = -10#

On an 80-column terminal, text wraps at column 70, leaving 10 columns empty on the right:

Text Wrapping
It is a truth universally acknowledged, that a single man in                    
possession of a good fortune, must be in want of a wife. However                
little known the feelings or views of such a man may be on his first            
entering a neighbourhood, this truth is so well fixed in the minds of           
the surrounding families, that he is considered as the rightful                 
property of some one or other of their daughters.                               
         |         |         |         |         |         |         |         |
       10|       20|       30|       40|       50|       60|       70|       80|

Example: set wrap = 0#

Text wraps at the full terminal width (80 columns shown):

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
good fortune, must be in want of a wife. However little known the feelings or   
views of such a man may be on his first entering a neighbourhood, this truth is 
so well fixed in the minds of the surrounding families, that he is considered   
as the rightful property of some one or other of their daughters.               
         |         |         |         |         |         |         |         |
       10|       20|       30|       40|       50|       60|       70|       80|

Reflow Wrap ($reflow_wrap)#

$reflow_wrap sets the paragraph width when reformatting format=flowed messages (requires $reflow_text to be set).

  • Positive value β€” paragraph width relative to the left margin

  • Negative value β€” paragraph width relative to the right margin

  • Zero β€” wrap at the terminal’s right margin

Important

Reflowed paragraphs are still subject to $wrap. If $reflow_wrap is wider than $wrap, each reflowed line will be split again by $wrap, producing uneven line lengths. For example, set reflow_wrap = 40 with set wrap = 30 produces alternating lines of 30 and 10 characters.

Example: set reflow_wrap = 40#

A format=flowed paragraph is reflowed to 40-character lines:

Text Wrapping
It is a truth universally acknowledged,                                        
that a single man in possession of a                                           
good fortune, must be in want of a wife.                                       
         |         |         |         |         |         |         |         |
       10|       20|       30|       40|       50|       60|       70|       80|

Example: set reflow_wrap = 72#

The same paragraph reflowed at 72 characters:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession         
of a good fortune, must be in want of a wife. However little known the          
feelings or views of such a man may be on his first entering a                  
neighbourhood, this truth is so well fixed in the minds of the                  
surrounding families, that he is considered as the rightful property of         
some one or other of their daughters.                                           
         |         |         |         |         |         |         |         |
       10|       20|       30|       40|       50|       60|       70|       80|

Smart Wrap ($smart_wrap)#

$smart_wrap controls whether long lines wrap at a word boundary or at the screen edge. It is enabled by default.

Example: set smart_wrap = yes (default)#

The line breaks at a space between words:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
good fortune, must be in want of a wife. However little known the feelings or   
views of such a man may be on his first entering a neighbourhood, this truth is 
so well fixed in the minds of the surrounding families, that he is considered as
the rightful property of some one or other of their daughters.                  

Example: set smart_wrap = no#

The line breaks exactly at the screen edge, splitting words mid-character:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a goo
d fortune, must be in want of a wife. However little known the feelings or views
of such a man may be on his first entering a neighbourhood, this truth is so wel
l fixed in the minds of the surrounding families, that he is considered as the r
ightful property of some one or other of their daughters.                       

Markers ($markers)#

$markers controls whether a + character is shown at the start of continuation lines when a line wraps in the pager. It is enabled by default.

Example: set markers = yes (default)#

Wrapped lines are prefixed with +:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
+good fortune, must be in want of a wife. However little known the feelings or  
+views of such a man may be on his first entering a neighbourhood, this truth   
+is so well fixed in the minds of the surrounding families, that he is          
+considered as the rightful property of some one or other of their daughters.   

Example: set markers = no#

No prefix on continuation lines:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
good fortune, must be in want of a wife. However little known the feelings or   
views of such a man may be on his first entering a neighbourhood, this truth    
is so well fixed in the minds of the surrounding families, that he is           
considered as the rightful property of some one or other of their daughters.    

Tip

$markers and $smart_wrap work together. A common combination is set smart_wrap = yes with set markers = no for clean word-wrapped output without visual clutter.

Tilde ($tilde)#

$tilde pads blank lines at the bottom of the pager with ~ characters, similar to Vim’s display of lines past the end of a file. It is disabled by default.

Example: set tilde = no (default)#

After the message ends, remaining screen lines are blank:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
good fortune, must be in want of a wife.                                        
                                                                                
                                                                                
                                                                                

Example: set tilde = yes#

Blank lines below the message are filled with ~:

Text Wrapping
It is a truth universally acknowledged, that a single man in possession of a    
good fortune, must be in want of a wife.                                        
~                                                                               
~                                                                               
~                                                                               

neomuttrc#

# Example NeoMutt config file for text wrapping.

# Wrap at 80 columns (the default wraps at terminal width)
set wrap = 0

# Reflow `format=flowed` paragraphs at 72 characters
set reflow_text = yes
set reflow_wrap = 72

# Wrap long lines at word boundaries
set smart_wrap = yes

# Don't show '+' markers on wrapped lines
set markers = no

# Pad blank lines below messages with '~'
set tilde = yes

# vim: filetype=neomuttrc

See Also#