mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
docs: Enable Syntax Highlighting for Code Snippits
This commit is contained in:
parent
693757bfd7
commit
4fb570e104
12 changed files with 234 additions and 124 deletions
|
|
@ -10,8 +10,10 @@ patterns.
|
|||
To use this highlighter, associate regular expressions with styles in the
|
||||
`ZSH_HIGHLIGHT_REGEXP` associative array, for example in `~/.zshrc`:
|
||||
|
||||
typeset -A ZSH_HIGHLIGHT_PATTERNS
|
||||
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
|
||||
```zsh
|
||||
typeset -A ZSH_HIGHLIGHT_PATTERNS
|
||||
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
|
||||
```
|
||||
|
||||
This will highlight "sudo" only as a complete word, i.e., "sudo cmd", but not
|
||||
"sudoedit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue