mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-24 20:33:04 +00:00
Merge branch 'temporary'
Two commits done in detached head state
This commit is contained in:
commit
9f6da82c9b
3 changed files with 9 additions and 7 deletions
11
README.md
11
README.md
|
@ -15,7 +15,7 @@ HSMW is **FAST** – highlighting 20 concurrent complex history entries does not
|
|||
# News
|
||||
|
||||
* 31-10-2016
|
||||
- New lines do not disturb the parser anymore, and are also highlighted with a dark color – [video](https://asciinema.org/a/91159)
|
||||
- Newlines do not disturb the parser anymore, and are also highlighted with a dark color – [video](https://asciinema.org/a/91159)
|
||||
|
||||
* 27-10-2016
|
||||
- New optimizations – **30%** speed up of syntax highlighting!
|
||||
|
@ -109,10 +109,11 @@ place you're doing your other `zgen load` calls in.
|
|||
## Zstyles
|
||||
|
||||
```zsh
|
||||
zstyle ":history-search-multi-word" page-size "8" # Number of entries to show, default is LINES/3
|
||||
zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold" # Color in which to highlight matched, searched text
|
||||
zstyle ":plugin:history-search-multi-word" synhl "yes" # Whether to perform syntax highlighting
|
||||
zstyle ":plugin:history-search-multi-word" active "underline" # Effect on active history entry. Try: standout, bold, bg=blue
|
||||
zstyle ":history-search-multi-word" page-size "8" # Number of entries to show (default is $LINES/3)
|
||||
zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold" # Color in which to highlight matched, searched text (default bg=17 on 256-color terminals)
|
||||
zstyle ":plugin:history-search-multi-word" synhl "yes" # Whether to perform syntax highlighting (default true)
|
||||
zstyle ":plugin:history-search-multi-word" active "underline" # Effect on active history entry. Try: standout, bold, bg=blue (default underline)
|
||||
zstyle ":plugin:history-search-multi-word" check-paths "yes" # Whether to check paths for existence and mark with magenta (default true)
|
||||
```
|
||||
|
||||
## Syntax highlighting
|
||||
|
|
|
@ -29,7 +29,7 @@ zmodload zsh/termcap 2>/dev/null
|
|||
|
||||
typeset -g __hsmw_hcw_index
|
||||
typeset -g __hsmw_hcw_widget_name __hsmw_hcw_restart __hsmw_hcw_call_count
|
||||
typeset -g __hsmw_page_size __hsmw_hl_color __hsmw_synhl __hsmw_active
|
||||
typeset -g __hsmw_page_size __hsmw_hl_color __hsmw_synhl __hsmw_active __hsmw_no_check_paths
|
||||
typeset -ga __hsmw_disp_list __hsmw_disp_list_newlines __hsmw_region_highlight_data
|
||||
typeset -gi __hsmw_page_start_idx __hsmw_prev_offset __hsmw_recedit_trap_executed
|
||||
typeset -gaU __hsmw_hcw_found
|
||||
|
@ -48,6 +48,7 @@ _hsmw_main() {
|
|||
zstyle -s ':history-search-multi-word' highlight-color __hsmw_hl_color || __hsmw_hl_color="fg=yellow,bold"
|
||||
zstyle -s ":plugin:history-search-multi-word" synhl __hsmw_synhl || __hsmw_synhl="yes"
|
||||
zstyle -s ":plugin:history-search-multi-word" active __hsmw_active || __hsmw_active="underline"
|
||||
zstyle -T ":plugin:history-search-multi-word" check-paths && __hsmw_no_check_paths=0 || __hsmw_no_check_paths=1
|
||||
[[ "$__hsmw_synhl" != "1" && "$__hsmw_synhl" != "yes" && "$__hsmw_synhl" != "true" ]] && __hsmw_synhl="no" || __hsmw_synhl="yes"
|
||||
-hsmw-highlight-init
|
||||
fi
|
||||
|
|
|
@ -552,7 +552,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
elif (( in_redirection == 2 )); then
|
||||
style=redirection
|
||||
else
|
||||
if -hsmw-highlight-check-path; then
|
||||
if (( __hsmw_no_check_paths == 0 )) && -hsmw-highlight-check-path; then
|
||||
# ADD
|
||||
reply+=("$start_pos $end_pos ${HSMW_HIGHLIGHT_STYLES[path]}")
|
||||
already_added=1
|
||||
|
|
Loading…
Reference in a new issue