From ba16cf2fb2f2071499a2a19c264be942d2a3a5b6 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 12 Jul 2016 07:03:18 +0000 Subject: [PATCH] docs: s/myhighlighter/acme/g Makes the text easier to read ("_zsh_highlight_myhighlighter_highlighter" is a mouthful). --- docs/highlighters.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/highlighters.md b/docs/highlighters.md index 00738ba..d09da3e 100644 --- a/docs/highlighters.md +++ b/docs/highlighters.md @@ -49,21 +49,21 @@ highlighter's documentation for details and examples. How to implement a new highlighter ---------------------------------- -To create your own `myhighlighter` highlighter: +To create your own `acme` highlighter: * Create your script at - `highlighters/${myhighlighter}/${myhighlighter}-highlighter.zsh`. + `highlighters/${acme}/${acme}-highlighter.zsh`. -* Implement the `_zsh_highlight_myhighlighter_highlighter_predicate` function. +* Implement the `_zsh_highlight_acme_highlighter_predicate` function. This function must return 0 when the highlighter needs to be called and non-zero otherwise, for example: - _zsh_highlight_myhighlighter_highlighter_predicate() { + _zsh_highlight_acme_highlighter_predicate() { # Call this highlighter in SVN working copies [[ -d .svn ]] } -* Implement the `_zsh_highlight_myhighlighter_highlighter` function. +* Implement the `_zsh_highlight_acme_highlighter` function. This function does the actual syntax highlighting, by calling `_zsh_highlight_add_highlight` with the start and end of the region to be highlighted and the `ZSH_HIGHLIGHT_STYLES` key to use. Define the default @@ -71,15 +71,15 @@ To create your own `myhighlighter` highlighter: `: ${ZSH_HIGHLIGHT_STYLES[key]:=value}`, being sure to prefix the key with your highlighter name and a colon. For example: - : ${ZSH_HIGHLIGHT_STYLES[myhighlighter:aurora]:=fg=green} + : ${ZSH_HIGHLIGHT_STYLES[acme:aurora]:=fg=green} - _zsh_highlight_myhighlighter_highlighter() { + _zsh_highlight_acme_highlighter() { # Colorize the whole buffer with the 'aurora' style - _zsh_highlight_add_highlight 0 $#BUFFER myhighlighter:aurora + _zsh_highlight_add_highlight 0 $#BUFFER acme:aurora } * Activate your highlighter in `~/.zshrc`: - ZSH_HIGHLIGHT_HIGHLIGHTERS+=(myhighlighter) + ZSH_HIGHLIGHT_HIGHLIGHTERS+=(acme) * [Write tests](../tests/README.md).