Skip to content

Commit 5171ec5

Browse files
committed
Document ZSH_HIGHLIGHT_MAXLENGTH.
Fixes #698.
1 parent ea3ae74 commit 5171ec5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/highlighters.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ Syntax highlighting is done by pluggable highlighters:
1818
[6]: highlighters/line.md
1919

2020

21+
Highlighter-independent settings
22+
--------------------------------
23+
24+
By default, all command lines are highlighted. However, it is possible to
25+
prevent command lines longer than a fixed number of characters from being
26+
highlighted by setting the variable `${ZSH_HIGHLIGHT_MAXLENGTH}` to the maximum
27+
length (in characters) of command lines to be highlighter. This is useful when
28+
editing very long comand lines (for example, with the [`fned`][fned] utility
29+
function). Example:
30+
31+
[fned]: http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#index-zed
32+
33+
```zsh
34+
ZSH_HIGHLIGHT_MAXLENGTH=512
35+
```
36+
37+
2138
How to activate highlighters
2239
----------------------------
2340

0 commit comments

Comments
 (0)